1. 19 5月, 2021 1 次提交
    • I
      ipv4: Add a sysctl to control multipath hash fields · ce5c9c20
      Ido Schimmel 提交于
      A subsequent patch will add a new multipath hash policy where the packet
      fields used for multipath hash calculation are determined by user space.
      This patch adds a sysctl that allows user space to set these fields.
      
      The packet fields are represented using a bitmask and are common between
      IPv4 and IPv6 to allow user space to use the same numbering across both
      protocols. For example, to hash based on standard 5-tuple:
      
       # sysctl -w net.ipv4.fib_multipath_hash_fields=0x0037
       net.ipv4.fib_multipath_hash_fields = 0x0037
      
      The kernel rejects unknown fields, for example:
      
       # sysctl -w net.ipv4.fib_multipath_hash_fields=0x1000
       sysctl: setting key "net.ipv4.fib_multipath_hash_fields": Invalid argument
      
      More fields can be added in the future, if needed.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: NDavid Ahern <dsahern@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce5c9c20
  2. 28 4月, 2021 1 次提交
  3. 27 4月, 2021 1 次提交
  4. 24 4月, 2021 1 次提交
  5. 20 4月, 2021 1 次提交
  6. 17 4月, 2021 2 次提交
  7. 16 4月, 2021 1 次提交
    • J
      ethtool: add FEC statistics · be85dbfe
      Jakub Kicinski 提交于
      Similarly to pause statistics add stats for FEC.
      
      The IEEE standard mandates two sets of counters:
       - 30.5.1.1.17 aFECCorrectedBlocks
       - 30.5.1.1.18 aFECUncorrectableBlocks
      where block is a block of bits FEC operates on.
      Each of these counters is defined per lane (PCS instance).
      
      Multiple vendors provide number of corrected _bits_ rather
      than/as well as blocks.
      
      This set adds the 2 standard-based block counters and a extra
      one for corrected bits.
      
      Counters are exposed to user space via netlink in new attributes.
      Each attribute carries an array of u64s, first element is
      the total count, and the following ones are a per-lane break down.
      
      Much like with pause stats the operation will not fail when driver
      does not implement the get_fec_stats callback (nor can the driver
      fail the operation by returning an error). If stats can't be
      reported the relevant attributes will be empty.
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be85dbfe
  8. 15 4月, 2021 2 次提交
    • N
      doc: move seg6_flowlabel to seg6-sysctl.rst · 292ecd9f
      Nicolas Dichtel 提交于
      Let's have all seg6 sysctl at the same place.
      
      Fixes: a6dc6670 ("ipv6: sr: Add documentation for seg_flowlabel sysctl")
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      292ecd9f
    • P
      net/mlx5: E-Switch, let user to enable disable metadata · 7bf481d7
      Parav Pandit 提交于
      Currently each packet inserted in eswitch is tagged with a internal
      metadata to indicate source vport. Metadata tagging is not always
      needed. Metadata insertion is needed for multi-port RoCE, failover
      between representors and stacked devices. In many other cases,
      metadata enablement is not needed.
      
      Metadata insertion slows down the packet processing rate of the E-switch
      when it is in switchdev mode.
      
      Below table show performance gain with metadata disabled for VXLAN
      offload rules in both SMFS and DMFS steering mode on ConnectX-5 device.
      
      ----------------------------------------------
      | steering | metadata | pkt size | rx pps    |
      | mode     |          |          | (million) |
      ----------------------------------------------
      | smfs     | disabled | 128Bytes | 42        |
      ----------------------------------------------
      | smfs     | enabled  | 128Bytes | 36        |
      ----------------------------------------------
      | dmfs     | disabled | 128Bytes | 42        |
      ----------------------------------------------
      | dmfs     | enabled  | 128Bytes | 36        |
      ----------------------------------------------
      
      Hence, allow user to disable metadata using driver specific devlink
      parameter. Metadata setting of the eswitch is applicable only for the
      switchdev mode.
      
      Example to show and disable metadata before changing eswitch mode:
      $ devlink dev param show pci/0000:06:00.0 name esw_port_metadata
      pci/0000:06:00.0:
        name esw_port_metadata type driver-specific
          values:
            cmode runtime value true
      
      $ devlink dev param set pci/0000:06:00.0 \
      	  name esw_port_metadata value false cmode runtime
      
      $ devlink dev eswitch set pci/0000:06:00.0 mode switchdev
      Signed-off-by: NParav Pandit <parav@nvidia.com>
      Reviewed-by: NRoi Dayan <roid@nvidia.com>
      Reviewed-by: NVu Pham <vuhuong@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      ---
      changelog:
      v1->v2:
       - added performance numbers in commit log
       - updated commit log and documentation for switchdev mode
       - added explicit note on when user can disable metadata in
         documentation
      7bf481d7
  9. 12 4月, 2021 1 次提交
  10. 07 4月, 2021 2 次提交
  11. 06 4月, 2021 1 次提交
    • X
      net: x25: Queue received packets in the drivers instead of per-CPU queues · 514e1150
      Xie He 提交于
      X.25 Layer 3 (the Packet Layer) expects layer 2 to provide a reliable
      datalink service such that no packets are reordered or dropped. And
      X.25 Layer 2 (the LAPB layer) is indeed designed to provide such service.
      
      However, this reliability is not preserved when a driver calls "netif_rx"
      to deliver the received packets to layer 3, because "netif_rx" will put
      the packets into per-CPU queues before they are delivered to layer 3.
      If there are multiple CPUs, the order of the packets may not be preserved.
      The per-CPU queues may also drop packets if there are too many.
      
      Therefore, we should not call "netif_rx" to let it queue the packets.
      Instead, we should use our own queue that won't reorder or drop packets.
      
      This patch changes all X.25 drivers to use their own queues instead of
      calling "netif_rx". The patch also documents this requirement in the
      "x25-iface" documentation.
      
      Cc: Martin Schiller <ms@dev.tdt.de>
      Signed-off-by: NXie He <xie.he.0141@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      514e1150
  12. 02 4月, 2021 1 次提交
    • O
      net: document a side effect of ip_local_reserved_ports · a7a80b17
      Otto Hollmann 提交于
      If there is overlapp between ip_local_port_range and ip_local_reserved_ports with a huge reserved block, it will affect probability of selecting ephemeral ports, see file net/ipv4/inet_hashtables.c:723
      
          int __inet_hash_connect(
          ...
                  for (i = 0; i < remaining; i += 2, port += 2) {
                          if (unlikely(port >= high))
                                  port -= remaining;
                          if (inet_is_local_reserved_port(net, port))
                                  continue;
      
          E.g. if there is reserved block of 10000 ports, two ports right after this block will be 5000 more likely selected than others.
          If this was intended, we can/should add note into documentation as proposed in this commit, otherwise we should think about different solution. One option could be mapping table of continuous port ranges. Second option could be letting user to modify step (port+=2) in above loop, e.g. using new sysctl parameter.
      Signed-off-by: NOtto Hollmann <otto.hollmann@suse.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7a80b17
  13. 01 4月, 2021 1 次提交
    • J
      ethtool: support FEC settings over netlink · 1e5d1f69
      Jakub Kicinski 提交于
      Add FEC API to netlink.
      
      This is not a 1-to-1 conversion.
      
      FEC settings already depend on link modes to tell user which
      modes are supported. Take this further an use link modes for
      manual configuration. Old struct ethtool_fecparam is still
      used to talk to the drivers, so we need to translate back
      and forth. We can revisit the internal API if number of FEC
      encodings starts to grow.
      
      Enforce only one active FEC bit (by using a bit position
      rather than another mask).
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e5d1f69
  14. 31 3月, 2021 1 次提交
  15. 30 3月, 2021 1 次提交
  16. 26 3月, 2021 1 次提交
  17. 25 3月, 2021 1 次提交
    • P
      docs: nf_flowtable: update documentation with enhancements · 143490cd
      Pablo Neira Ayuso 提交于
      This patch updates the flowtable documentation to describe recent
      enhancements:
      
      - Offload action is available after the first packets go through the
        classic forwarding path.
      - IPv4 and IPv6 are supported. Only TCP and UDP layer 4 are supported at
        this stage.
      - Tuple has been augmented to track VLAN id and PPPoE session id.
      - Bridge and IP forwarding integration, including bridge VLAN filtering
        support.
      - Hardware offload support.
      - Describe the [OFFLOAD] and [HW_OFFLOAD] tags in the conntrack table
        listing.
      - Replace 'flow offload' by 'flow add' in example rulesets (preferred
        syntax).
      - Describe existing cache limitations.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      143490cd
  18. 21 3月, 2021 1 次提交
  19. 18 3月, 2021 5 次提交
  20. 17 3月, 2021 13 次提交
  21. 15 3月, 2021 1 次提交