1. 27 Jul, 2018 18 commits
    • Gal Pressman's avatar
      net/mlx5e: Vxlan, replace ports radix-tree with hash table · d30d8cde
      Gal Pressman authored
      The VXLAN database is accessed in the data path for each VXLAN TX skb in
      order to check whether the UDP port is being offloaded or not.
      The number of elements in the database is relatively small, we can
      simplify the radix-tree to a hash table and speedup the lookup process.
      
      Measuring mlx5e_vxlan_lookup_port execution time:
      
                        Radix Tree   Hash Table
       --------------- ------------ ------------
        Single Stream   161 ns       79  ns (51% improvement)
        Multi Stream    259 ns       136 ns (47% improvement)
      
      Measuring UDP stream packet rate, single fully utilized TX core:
      Radix Tree: 498,300 PPS
      Hash Table: 555,468 PPS (11% improvement)
      Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      d30d8cde
    • Gal Pressman's avatar
      net/mlx5e: Vxlan, check maximum number of UDP ports · 22a65aa8
      Gal Pressman authored
      The NIC has a limited number of offloaded VXLAN UDP ports (usually 4).
      Instead of letting the firmware fail when trying to add more ports than
      it can handle, let the driver check it on its own.
      Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      22a65aa8
    • Gal Pressman's avatar
      net/mlx5e: Vxlan, reflect 4789 UDP port default addition to software database · a082c4f4
      Gal Pressman authored
      The hardware offloads 4789 UDP port (default VXLAN port) automatically.
      Add it to the software database as well in order to reflect the hardware
      state appropriately.
      Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      a082c4f4
    • Jiri Pirko's avatar
      net: sched: don't dump chains only held by actions · 1f3ed383
      Jiri Pirko authored
      In case a chain is empty and not explicitly created by a user,
      such chain should not exist. The only exception is if there is
      an action "goto chain" pointing to it. In that case, don't show the
      chain in the dump. Track the chain references held by actions and
      use them to find out if a chain should or should not be shown
      in chain dump.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f3ed383
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next · 7a49d3d4
      David S. Miller authored
      Steffen Klassert says:
      
      ====================
      pull request (net-next): ipsec-next 2018-07-27
      
      1) Extend the output_mark to also support the input direction
         and masking the mark values before applying to the skb.
      
      2) Add a new lookup key for the upcomming xfrm interfaces.
      
      3) Extend the xfrm lookups to match xfrm interface IDs.
      
      4) Add virtual xfrm interfaces. The purpose of these interfaces
         is to overcome the design limitations that the existing
         VTI devices have.
      
        The main limitations that we see with the current VTI are the
        following:
      
        VTI interfaces are L3 tunnels with configurable endpoints.
        For xfrm, the tunnel endpoint are already determined by the SA.
        So the VTI tunnel endpoints must be either the same as on the
        SA or wildcards. In case VTI tunnel endpoints are same as on
        the SA, we get a one to one correlation between the SA and
        the tunnel. So each SA needs its own tunnel interface.
      
        On the other hand, we can have only one VTI tunnel with
        wildcard src/dst tunnel endpoints in the system because the
        lookup is based on the tunnel endpoints. The existing tunnel
        lookup won't work with multiple tunnels with wildcard
        tunnel endpoints. Some usecases require more than on
        VTI tunnel of this type, for example if somebody has multiple
        namespaces and every namespace requires such a VTI.
      
        VTI needs separate interfaces for IPv4 and IPv6 tunnels.
        So when routing to a VTI, we have to know to which address
        family this traffic class is going to be encapsulated.
        This is a lmitation because it makes routing more complex
        and it is not always possible to know what happens behind the
        VTI, e.g. when the VTI is move to some namespace.
      
        VTI works just with tunnel mode SAs. We need generic interfaces
        that ensures transfomation, regardless of the xfrm mode and
        the encapsulated address family.
      
        VTI is configured with a combination GRE keys and xfrm marks.
        With this we have to deal with some extra cases in the generic
        tunnel lookup because the GRE keys on the VTI are actually
        not GRE keys, the GRE keys were just reused for something else.
        All extensions to the VTI interfaces would require to add
        even more complexity to the generic tunnel lookup.
      
        So to overcome this, we developed xfrm interfaces with the
        following design goal:
      
        It should be possible to tunnel IPv4 and IPv6 through the same
        interface.
      
        No limitation on xfrm mode (tunnel, transport and beet).
      
        Should be a generic virtual interface that ensures IPsec
        transformation, no need to know what happens behind the
        interface.
      
        Interfaces should be configured with a new key that must match a
        new policy/SA lookup key.
      
        The lookup logic should stay in the xfrm codebase, no need to
        change or extend generic routing and tunnel lookups.
      
        Should be possible to use IPsec hardware offloads of the underlying
        interface.
      
      5) Remove xfrm pcpu policy cache. This was added after the flowcache
         removal, but it turned out to make things even worse.
         From Florian Westphal.
      
      6) Allow to update the set mark on SA updates.
         From Nathan Harold.
      
      7) Convert some timestamps to time64_t.
         From Arnd Bergmann.
      
      8) Don't check the offload_handle in xfrm code,
         it is an opaque data cookie for the driver.
         From Shannon Nelson.
      
      9) Remove xfrmi interface ID from flowi. After this pach
         no generic code is touched anymore to do xfrm interface
         lookups. From Benedict Wong.
      
      10) Allow to update the xfrm interface ID on SA updates.
          From Nathan Harold.
      
      11) Don't pass zero to ERR_PTR() in xfrm_resolve_and_create_bundle.
          From YueHaibing.
      
      12) Return more detailed errors on xfrm interface creation.
          From Benedict Wong.
      
      13) Use PTR_ERR_OR_ZERO instead of IS_ERR + PTR_ERR.
          From the kbuild test robot.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7a49d3d4
    • kbuild test robot's avatar
      xfrm: fix ptr_ret.cocci warnings · c6f5e017
      kbuild test robot authored
      net/xfrm/xfrm_interface.c:692:1-3: WARNING: PTR_ERR_OR_ZERO can be used
      
       Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
      
      Generated by: scripts/coccinelle/api/ptr_ret.cocci
      
      Fixes: 44e2b838 ("xfrm: Return detailed errors from xfrmi_newlink")
      CC: Benedict Wong <benedictwong@google.com>
      Signed-off-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      c6f5e017
    • David S. Miller's avatar
      Merge tag 'mlx5e-updates-2018-07-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · ecbcd689
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5e-updates-2018-07-26 (XDP redirect)
      
      This series from Tariq adds the support for device-out XDP redirect.
      
      Start with a simple RX and XDP cleanups:
      - Replace call to MPWQE free with dealloc in interface down flow
      - Do not recycle RX pages in interface down flow
      - Gather all XDP pre-requisite checks in a single function
      - Restrict the combination of large MTU and XDP
      
      Since now XDP logic is going to be called from TX side as well,
      generic XDP TX logic is not RX only anymore, for that Tariq creates
      a new xdp.c file and moves XDP related code into it, and generalizes
      the code to support XDP TX for XDP redirect, such as the xdp tx sq
      structures and xdp counters.
      
      XDP redirect support:
      Add implementation for the ndo_xdp_xmit callback.
      
      Dedicate a new set of XDP-SQ instances to satisfy the XDP_REDIRECT
      requests.  These instances are totally separated from the existing
      XDP-SQ objects that satisfy local XDP_TX actions.
      
      Performance tests:
      
      xdp_redirect_map from ConnectX-5 to ConnectX-5.
      CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
      Packet-rate of 64B packets.
      
      Single queue: 7 Mpps.
      Multi queue: 55 Mpps.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ecbcd689
    • Jakub Kicinski's avatar
      netdevsim: make debug dirs' dentries static · f61b6db3
      Jakub Kicinski authored
      The root directories of netdevsim should only be used by the core
      to create per-device subdirectories, so limit their visibility to
      the core file.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f61b6db3
    • David S. Miller's avatar
      Merge branch 'docs-net-Convert-netdev-FAQ-to-RST' · 472f5975
      David S. Miller authored
      Tobin C. Harding says:
      
      ====================
      docs: net: Convert netdev-FAQ to RST
      
      Jon answered all the tree questions on v1 so if you will please take
      this through your tree that would be awesome.
      
      v2:
       - Fix typo 'canonical_path_format' (thanks Edward)
       - Add patch fixing references netdev-FAQ
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      472f5975
    • Tobin C. Harding's avatar
      docs: Update references to netdev-FAQ · 287f4fa9
      Tobin C. Harding authored
      File 'Documentation/networking/netdev-FAQ.txt' has been converted to RST
      format.  We should update all links/references to point to the new file.
      
      Update references to netdev-FAQ
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      287f4fa9
    • Tobin C. Harding's avatar
      docs: net: Convert netdev-FAQ to restructured text · 96398ddf
      Tobin C. Harding authored
      Preferred kernel docs format is now restructured text.  Convert
      netdev-FAQ.txt to restructured text.
      
       - Add SPDX license identifier.
      
       - Change file heading 'Information you need to know about netdev' to
        'netdev FAQ' to better suit displayed index (in HTML).
      
       - Change question/answer layout to suit rst.  Copy format in
         Documentation/bpf/bpf_devel_QA.rst
      
       - Fix indentation of code snippets
      
       - If multiple consecutive URLs appear put them in a list (to maintain
        whitespace).
      
       - Use uniform spelling of 'bug fix' throughout document (not bugfix or
         bug-fix).
      
       - Add double back ticks to 'net' and 'net-next' when referring to the
         trees.
      
       - Use rst references for Documentation/ links.
      
       - Add rst label 'netdev-FAQ' for referencing by other docs files.
      
       - Remove stale entry from Documentation/networking/00-INDEX
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96398ddf
    • Tobin C. Harding's avatar
      docs: Add rest label the_canonical_patch_format · f58252cd
      Tobin C. Harding authored
      In preparation to convert Documentation/network/netdev-FAQ.rst to
      restructured text format.  We would like to be able to reference 'the
      canonical patch format' section.
      
      Add rest label: 'the_canonical_patch_format'.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f58252cd
    • Jia-Ju Bai's avatar
      net: adaptec: Replace mdelay() with msleep() in starfire_init_one() · d8ad2f31
      Jia-Ju Bai authored
      starfire_init_one() is never called in atomic context.
      It calls mdelay() to busily wait, which is not necessary.
      mdelay() can be replaced with msleep().
      
      This is found by a static analysis tool named DCNS written by myself.
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d8ad2f31
    • Jia-Ju Bai's avatar
      isdn: hisax: config: Replace GFP_ATOMIC with GFP_KERNEL · 055d624f
      Jia-Ju Bai authored
      hisax_cs_new() and hisax_cs_setup() are never called in atomic context.
      They call kmalloc() and kzalloc() with GFP_ATOMIC, which is not necessary.
      GFP_ATOMIC can be replaced with GFP_KERNEL.
      
      This is found by a static analysis tool named DCNS written by myself.
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      055d624f
    • Jia-Ju Bai's avatar
      isdn: hisax: callc: Replace GFP_ATOMIC with GFP_KERNEL in init_PStack() · 87935aa7
      Jia-Ju Bai authored
      init_PStack() is never called in atomic context.
      It calls kmalloc() with GFP_ATOMIC, which is not necessary.
      GFP_ATOMIC can be replaced with GFP_KERNEL.
      
      This is found by a static analysis tool named DCNS written by myself.
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87935aa7
    • Jia-Ju Bai's avatar
      isdn: mISDN: netjet: Replace GFP_ATOMIC with GFP_KERNEL in nj_probe() · 9d8009de
      Jia-Ju Bai authored
      nj_probe() is never called in atomic context.
      It calls kzalloc() with GFP_ATOMIC, which is not necessary.
      GFP_ATOMIC can be replaced with GFP_KERNEL.
      
      This is found by a static analysis tool named DCNS written by myself.
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d8009de
    • Jia-Ju Bai's avatar
      isdn: mISDN: hfcpci: Replace GFP_ATOMIC with GFP_KERNEL in hfc_probe() · 8c957d66
      Jia-Ju Bai authored
      hfc_probe() is never called in atomic context.
      It calls kzalloc() with GFP_ATOMIC, which is not necessary.
      GFP_ATOMIC can be replaced with GFP_KERNEL.
      
      This is found by a static analysis tool named DCNS written by myself.
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c957d66
    • YueHaibing's avatar
      net: hns: make hns_dsaf_roce_reset non static · ff7b9126
      YueHaibing authored
      hns_dsaf_roce_reset is exported and used in hns_roce_hw_v1.c
      In commit 336a443b ("net: hns: Make many functions static") I make
      it static wrongly.
      
      drivers/infiniband/hw/hns/hns_roce_hw_v1.o: In function `hns_roce_v1_reset':
      hns_roce_hw_v1.c:(.text+0x37ac): undefined reference to `hns_dsaf_roce_reset'
      hns_roce_hw_v1.c:(.text+0x37cc): undefined reference to `hns_dsaf_roce_reset'
      
      Fixes: 336a443b ("net: hns: Make many functions static")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff7b9126
  2. 26 Jul, 2018 22 commits
    • Tariq Toukan's avatar
      net/mlx5e: TX, Use function to access sq_dma object in fifo · 8ee48233
      Tariq Toukan authored
      Use designated function mlx5e_dma_get() to get
      the mlx5e_sq_dma object to be pushed into fifo.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Reviewed-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      8ee48233
    • Tariq Toukan's avatar
      net/mlx5e: TX, Move DB fields in TXQ-SQ struct · 9a3956da
      Tariq Toukan authored
      Pointers in DB are static, move them to read-only area so they
      do not share a cacheline with fields modified in datapath.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      9a3956da
    • Tariq Toukan's avatar
      net/mlx5e: RX, Prefetch the xdp_frame data area · d3398a4f
      Tariq Toukan authored
      A loaded XDP program might write to the xdp_frame data area,
      prefetchw() it to avoid a potential cache miss.
      
      Performance tests:
      ConnectX-5, XDP_TX packet rate, single ring.
      CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
      
      Before: 13,172,976 pps
      After:  13,456,248 pps
      2% gain.
      
      Fixes: 22f45398 ("net/mlx5e: Support XDP over Striding RQ")
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      d3398a4f
    • Tariq Toukan's avatar
      net/mlx5e: Add support for XDP_REDIRECT in device-out side · 58b99ee3
      Tariq Toukan authored
      Add implementation for the ndo_xdp_xmit callback.
      
      Dedicate a new set of XDP-SQ instances to satisfy the XDP_REDIRECT
      requests.  These instances are totally separated from the existing
      XDP-SQ objects that satisfy local XDP_TX actions.
      
      Performance tests:
      
      xdp_redirect_map from ConnectX-5 to ConnectX-5.
      CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
      Packet-rate of 64B packets.
      
      Single queue: 7 Mpps.
      Multi queue: 55 Mpps.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      58b99ee3
    • Tariq Toukan's avatar
      net/mlx5e: Re-order fields of struct mlx5e_xdpsq · dac0d15f
      Tariq Toukan authored
      In the downstream patch that adds support to XDP_REDIRECT-out,
      the XDP xmit frame function doesn't share the same run context as
      the NAPI that polls the XDP-SQ completion queue.
      
      Hence, need to re-order the XDP-SQ fields to avoid cacheline
      false-sharing.
      
      Take redirect_flush and doorbell out of DB, into separated
      cachelines.
      
      Add a cacheline breaker within the stats struct.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      dac0d15f
    • Tariq Toukan's avatar
      net/mlx5e: Refactor XDP counters · 890388ad
      Tariq Toukan authored
      Separate the XDP counters into two sets:
      (1) One set reside in the RQ stats, and they monitor XDP stats
      in the RQ side.
      (2) Another set is per XDP-SQ, and they monitor XDP stats that
      are related to XDP transmit flow.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      890388ad
    • Tariq Toukan's avatar
      net/mlx5e: Make XDP xmit functions more generic · c94e4f11
      Tariq Toukan authored
      Convert the XDP xmit functions to use the generic xdp_frame API
      in XDP_TX flow.
      Same functions will be used later in this series to transmit
      the XDP redirect-out packets as well.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      c94e4f11
    • Tariq Toukan's avatar
      net/mlx5e: Add counter for XDP redirect in RX · 86690b4b
      Tariq Toukan authored
      Add per-ring and total stats for received packets that
      goes into XDP redirection.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      86690b4b
    • Tariq Toukan's avatar
      net/mlx5e: Move XDP related code into new XDP files · 159d2131
      Tariq Toukan authored
      Take XDP code out of the general EN header and RX file into
      new XDP files.
      
      Currently, XDP-SQ resides only within an RQ and used from a
      single flow (XDP_TX) triggered upon RX completions.
      In a downstream patch, additional type of XDP-SQ instances will be
      presented and used for the XDP_REDIRECT flow, totally unrelated to
      the RX context.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      159d2131
    • Tariq Toukan's avatar
      net/mlx5e: Restrict the combination of large MTU and XDP · a26a5bdf
      Tariq Toukan authored
      Add checks in control path upon an MTU change or an XDP program set,
      to prevent reaching cases where large MTU and XDP are set simultaneously.
      
      This is to make sure we allow XDP only with the linear RX memory scheme,
      i.e. a received packet is not scattered to different pages.
      Change mlx5e_rx_get_linear_frag_sz() accordingly, so that we make sure
      the XDP configuration can really be set, instead of assuming that it is.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      a26a5bdf
    • Tariq Toukan's avatar
      net/mlx5e: Gather all XDP pre-requisite checks in a single function · 0ec13877
      Tariq Toukan authored
      Dedicate a function to all checks done when setting an XDP program.
      Take indications from priv instead of netdev features.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      0ec13877
    • Tariq Toukan's avatar
      net/mlx5e: Do not recycle RX pages in interface down flow · cb5189d1
      Tariq Toukan authored
      Keep all page-pool recycle calls within NAPI context.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      cb5189d1
    • Tariq Toukan's avatar
      net/mlx5e: Replace call to MPWQE free with dealloc in interface down flow · afab995e
      Tariq Toukan authored
      No need to expose the MPWQE free function to control path.
      The dealloc function already exposed, use it.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Reviewed-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      afab995e
    • David S. Miller's avatar
      Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 6a8fab17
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      10GbE Intel Wired LAN Driver Updates 2018-07-26
      
      This series contains updates to ixgbe and igb.
      
      Tony fixes ixgbe to add checks to ensure jumbo frames or LRO get enabled
      after an XDP program is loaded.
      
      Shannon Nelson adds the missing security configuration registers to the
      ixgbe register dump, which will help in debugging.
      
      Christian Grönke fixes an issue in igb that occurs on SGMII based SPF
      mdoules, by reverting changes from 2 previous patches.  The issue was
      that initialization would fail on the fore mentioned modules because the
      driver would try to reset the PHY before obtaining the PHY address of
      the SGMII attached PHY.
      
      Venkatesh Srinivas replaces wmb() with dma_wmb() for doorbell writes,
      which avoids SFENCEs before the doorbell writes.
      
      Alex cleans up and refactors ixgbe Tx/Rx shutdown to reduce time needed
      to stop the device.  The code refactor allows us to take the completion
      time into account when disabling queues, so that on some platforms with
      higher completion times, would not result in receive queues disabled
      messages.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6a8fab17
    • Jiri Pirko's avatar
      net: sched: unmark chain as explicitly created on delete · c921d7db
      Jiri Pirko authored
      Once user manually deletes the chain using "chain del", the chain cannot
      be marked as explicitly created anymore.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Fixes: 32a4f5ec ("net: sched: introduce chain object to uapi")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c921d7db
    • Doron Roberts-Kedes's avatar
      tls: Skip zerocopy path for ITER_KVEC · 0a26cf3f
      Doron Roberts-Kedes authored
      The zerocopy path ultimately calls iov_iter_get_pages, which defines the
      step function for ITER_KVECs as simply, return -EFAULT. Taking the
      non-zerocopy path for ITER_KVECs avoids the unnecessary fallback.
      
      See https://lore.kernel.org/lkml/20150401023311.GL29656@ZenIV.linux.org.uk/T/#u
      for a discussion of why zerocopy for vmalloc data is not a good idea.
      
      Discovered while testing NBD traffic encrypted with ktls.
      
      Fixes: c46234eb ("tls: RX path for ktls")
      Signed-off-by: default avatarDoron Roberts-Kedes <doronrk@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a26cf3f
    • Gustavo A. R. Silva's avatar
      net: sched: cls_api: fix dead code in switch · 2ed9db30
      Gustavo A. R. Silva authored
      Code at line 1850 is unreachable. Fix this by removing the break
      statement above it, so the code for case RTM_GETCHAIN can be
      properly executed.
      
      Addresses-Coverity-ID: 1472050 ("Structurally dead code")
      Fixes: 32a4f5ec ("net: sched: introduce chain object to uapi")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ed9db30
    • Guillaume Nault's avatar
      l2tp: remove ->recv_payload_hook · 2b139e6b
      Guillaume Nault authored
      The tunnel reception hook is only used by l2tp_ppp for skipping PPP
      framing bytes. This is a session specific operation, but once a PPP
      session sets ->recv_payload_hook on its tunnel, all frames received by
      the tunnel will enter pppol2tp_recv_payload_hook(), including those
      targeted at Ethernet sessions (an L2TPv3 tunnel can multiplex PPP and
      Ethernet sessions).
      
      So this mechanism is wrong, and uselessly complex. Let's just move this
      functionality to the pppol2tp rx handler and drop ->recv_payload_hook.
      Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b139e6b
    • YueHaibing's avatar
      tipc: add missing dev_put() on error in tipc_enable_l2_media · 63135ee0
      YueHaibing authored
      when tipc_own_id failed to obtain node identity,dev_put should
      be call before return -EINVAL.
      
      Fixes: 682cd3cf ("tipc: confgiure and apply UDP bearer MTU on running links")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      63135ee0
    • Vakul Garg's avatar
      net/tls: Removed redundant checks for non-NULL · 201876b3
      Vakul Garg authored
      Removed checks against non-NULL before calling kfree_skb() and
      crypto_free_aead(). These functions are safe to be called with NULL
      as an argument.
      Signed-off-by: default avatarVakul Garg <vakul.garg@nxp.com>
      Acked-by: default avatarDave Watson <davejwatson@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      201876b3
    • Vinicius Costa Gomes's avatar
      cbs: Add support for the graft function · 990e35ec
      Vinicius Costa Gomes authored
      This will allow to install a child qdisc under cbs. The main use case
      is to install ETF (Earliest TxTime First) qdisc under cbs, so there's
      another level of control for time-sensitive traffic.
      Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      990e35ec
    • YueHaibing's avatar
      net: hns: Make many functions static · 336a443b
      YueHaibing authored
      Fixes the following sparse warning:
      
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:73:20: warning: symbol 'hns_ae_get_handle' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:332:6: warning: symbol 'hns_ae_stop' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:360:6: warning: symbol 'hns_ae_toggle_ring_irq' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:580:6: warning: symbol 'hns_ae_update_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:663:6: warning: symbol 'hns_ae_get_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:695:6: warning: symbol 'hns_ae_get_strings' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:728:5: warning: symbol 'hns_ae_get_sset_count' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:774:6: warning: symbol 'hns_ae_update_led_status' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:786:5: warning: symbol 'hns_ae_cpld_set_led_id' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:798:6: warning: symbol 'hns_ae_get_regs' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:823:5: warning: symbol 'hns_ae_get_regs_len' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c:342:6: warning: symbol 'hns_gmac_update_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:934:12: warning: symbol 'hns_mac_get_vaddr' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:953:5: warning: symbol 'hns_mac_get_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:343:6: warning: symbol 'hns_dsaf_srst_chns' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:366:1: warning: symbol 'hns_dsaf_srst_chns_acpi' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:373:6: warning: symbol 'hns_dsaf_roce_srst' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:387:6: warning: symbol 'hns_dsaf_roce_srst_acpi' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:571:5: warning: symbol 'hns_mac_get_sfp_prsnt' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:589:5: warning: symbol 'hns_mac_get_sfp_prsnt_acpi' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:31:12: warning: symbol 'g_dsaf_mode_match' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:45:5: warning: symbol 'hns_dsaf_get_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:962:6: warning: symbol 'hns_dsaf_tcam_addr_get' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2087:6: warning: symbol 'hns_dsaf_port_work_rate_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2837:5: warning: symbol 'hns_dsaf_roce_reset' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:76:5: warning: symbol 'hns_ppe_common_get_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:107:6: warning: symbol 'hns_ppe_common_free_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:340:6: warning: symbol 'hns_ppe_uninit_ex' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c:708:5: warning: symbol 'hns_rcb_get_ring_num' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c:744:14: warning: symbol 'hns_rcb_common_get_vaddr' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c:314:6: warning: symbol 'hns_xgmac_update_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:1303:6: warning: symbol 'hns_nic_update_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:1585:6: warning: symbol 'hns_nic_poll_controller' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:1938:6: warning: symbol 'hns_set_multicast_list' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:1960:6: warning: symbol 'hns_nic_set_rx_mode' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:661:6: warning: symbol 'hns_get_ringparam' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:811:6: warning: symbol 'hns_get_channels' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:828:6: warning: symbol 'hns_get_ethtool_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:886:6: warning: symbol 'hns_get_strings' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:976:5: warning: symbol 'hns_get_sset_count' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:1010:5: warning: symbol 'hns_phy_led_set' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:1032:5: warning: symbol 'hns_set_phys_id' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:1106:6: warning: symbol 'hns_get_regs' was not declared. Should it be static?
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      336a443b