Skip to content
  1. Jul 10, 2019
    • Jose Abreu's avatar
      net: stmmac: Fix descriptors address being in > 32 bits address space · 06a80a7d
      Jose Abreu authored
      Commit a993db88 ("net: stmmac: Enable support for > 32 Bits
      addressing in XGMAC"), introduced support for > 32 bits addressing in
      XGMAC but the conversion of descriptors to dma_addr_t was left out.
      
      As some devices assing coherent memory in regions > 32 bits we need to
      set lower and upper value of descriptors address when initializing DMA
      channels.
      
      Luckly, this was working for me because I was assigning CMA to < 4GB
      address space for performance reasons.
      
      Fixes: a993db88
      
       ("net: stmmac: Enable support for > 32 Bits addressing in XGMAC")
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      06a80a7d
    • Jose Abreu's avatar
      net: stmmac: Implement RX Coalesce Frames setting · d429b66e
      Jose Abreu authored
      
      
      Add support for coalescing RX path by specifying number of frames which
      don't need to have interrupt on completion bit set.
      
      This is only available when RX Watchdog is enabled.
      
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d429b66e
    • Michael Chan's avatar
      bnxt_en: Add page_pool_destroy() during RX ring cleanup. · 12479f62
      Michael Chan authored
      Add page_pool_destroy() in bnxt_free_rx_rings() during normal RX ring
      cleanup, as Ilias has informed us that the following commit has been
      merged:
      
      1da4bbef ("net: core: page_pool: add user refcnt and reintroduce page_pool_destroy")
      
      The special error handling code to call page_pool_free() can now be
      removed.  bnxt_free_rx_rings() will always be called during normal
      shutdown or any error paths.
      
      Fixes: 322b87ca
      
       ("bnxt_en: add page_pool support")
      Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
      Cc: Andy Gospodarek <gospo@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Acked-by: default avatarAndy Gospodarek <gospo@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12479f62
    • David S. Miller's avatar
      Merge branch 'net-sched-Introduce-tc-connection-tracking' · 216dcb05
      David S. Miller authored
      
      
      Paul Blakey says:
      
      ====================
      net/sched: Introduce tc connection tracking
      
      This patch series add connection tracking capabilities in tc sw datapath.
      It does so via a new tc action, called act_ct, and new tc flower classifier matching
      on conntrack state, mark and label.
      
      Usage is as follows:
      $ tc qdisc add dev ens1f0_0 ingress
      $ tc qdisc add dev ens1f0_1 ingress
      
      $ tc filter add dev ens1f0_0 ingress \
        prio 1 chain 0 proto ip \
        flower ip_proto tcp ct_state -trk \
        action ct zone 2 pipe \
        action goto chain 2
      $ tc filter add dev ens1f0_0 ingress \
        prio 1 chain 2 proto ip \
        flower ct_state +trk+new \
        action ct zone 2 commit mark 0xbb nat src addr 5.5.5.7 pipe \
        action mirred egress redirect dev ens1f0_1
      $ tc filter add dev ens1f0_0 ingress \
        prio 1 chain 2 proto ip \
        flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \
        action ct nat pipe \
        action mirred egress redirect dev ens1f0_1
      
      $ tc filter add dev ens1f0_1 ingress \
        prio 1 chain 0 proto ip \
        flower ip_proto tcp ct_state -trk \
        action ct zone 2 pipe \
        action goto chain 1
      $ tc filter add dev ens1f0_1 ingress \
        prio 1 chain 1 proto ip \
        flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \
        action ct nat pipe \
        action mirred egress redirect dev ens1f0_0
      
      The pattern used in the design here closely resembles OvS, as the plan is to also offload
      OvS conntrack rules to tc. OvS datapath rules uses it's recirculation mechanism to send
      specific packets to conntrack, and return with the new conntrack state (ct_state) on some other recirc_id
      to be matched again (we use goto chain for this).
      
      This results in the following OvS datapath rules:
      
      recirc_id(0),in_port(ens1f0_0),ct_state(-trk),... actions:ct(zone=2),recirc(2)
      recirc_id(2),in_port(ens1f0_0),ct_state(+new+trk),ct_mark(0xbb),... actions:ct(commit,zone=2,nat(src=5.5.5.7),mark=0xbb),ens1f0_1
      recirc_id(2),in_port(ens1f0_0),ct_state(+est+trk),ct_mark(0xbb),... actions:ct(zone=2,nat),ens1f0_1
      
      recirc_id(1),in_port(ens1f0_1),ct_state(-trk),... actions:ct(zone=2),recirc(1)
      recirc_id(1),in_port(ens1f0_1),ct_state(+est+trk),... actions:ct(zone=2,nat),ens1f0_0
      
      Changelog:
      	See individual patches.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      216dcb05
    • Paul Blakey's avatar
      tc-tests: Add tc action ct tests · 6e52fca3
      Paul Blakey authored
      
      
      Add 13 tests ensuring the command line is doing what is supposed to do.
      
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <mleitner@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6e52fca3
    • Paul Blakey's avatar
      net/sched: cls_flower: Add matching on conntrack info · e0ace68a
      Paul Blakey authored
      
      
      New matches for conntrack mark, label, zone, and state.
      
      Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarYossi Kuperman <yossiku@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0ace68a
    • Paul Blakey's avatar
      net/flow_dissector: add connection tracking dissection · 75a56758
      Paul Blakey authored
      
      
      Retreives connection tracking zone, mark, label, and state from
      a SKB.
      
      Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      75a56758
    • Paul Blakey's avatar
      net/sched: Introduce action ct · b57dc7c1
      Paul Blakey authored
      
      
      Allow sending a packet to conntrack module for connection tracking.
      
      The packet will be marked with conntrack connection's state, and
      any metadata such as conntrack mark and label. This state metadata
      can later be matched against with tc classifers, for example with the
      flower classifier as below.
      
      In addition to committing new connections the user can optionally
      specific a zone to track within, set a mark/label and configure nat
      with an address range and port range.
      
      Usage is as follows:
      $ tc qdisc add dev ens1f0_0 ingress
      $ tc qdisc add dev ens1f0_1 ingress
      
      $ tc filter add dev ens1f0_0 ingress \
        prio 1 chain 0 proto ip \
        flower ip_proto tcp ct_state -trk \
        action ct zone 2 pipe \
        action goto chain 2
      $ tc filter add dev ens1f0_0 ingress \
        prio 1 chain 2 proto ip \
        flower ct_state +trk+new \
        action ct zone 2 commit mark 0xbb nat src addr 5.5.5.7 pipe \
        action mirred egress redirect dev ens1f0_1
      $ tc filter add dev ens1f0_0 ingress \
        prio 1 chain 2 proto ip \
        flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \
        action ct nat pipe \
        action mirred egress redirect dev ens1f0_1
      
      $ tc filter add dev ens1f0_1 ingress \
        prio 1 chain 0 proto ip \
        flower ip_proto tcp ct_state -trk \
        action ct zone 2 pipe \
        action goto chain 1
      $ tc filter add dev ens1f0_1 ingress \
        prio 1 chain 1 proto ip \
        flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \
        action ct nat pipe \
        action mirred egress redirect dev ens1f0_0
      
      Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarYossi Kuperman <yossiku@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      
      Changelog:
      V5->V6:
      	Added CONFIG_NF_DEFRAG_IPV6 in handle fragments ipv6 case
      V4->V5:
      	Reordered nf_conntrack_put() in tcf_ct_skb_nfct_cached()
      V3->V4:
      	Added strict_start_type for act_ct policy
      V2->V3:
      	Fixed david's comments: Removed extra newline after rcu in tcf_ct_params , and indent of break in act_ct.c
      V1->V2:
      	Fixed parsing of ranges TCA_CT_NAT_IPV6_MAX as 'else' case overwritten ipv4 max
      	Refactored NAT_PORT_MIN_MAX range handling as well
      	Added ipv4/ipv6 defragmentation
      	Removed extra skb pull push of nw offset in exectute nat
      	Refactored tcf_ct_skb_network_trim after pull
      	Removed TCA_ACT_CT define
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b57dc7c1
    • David S. Miller's avatar
      Merge branch 'devlink-Introduce-PCI-PF-VF-ports-and-attributes' · f108c887
      David S. Miller authored
      Parav Pandit says:
      
      ====================
      devlink: Introduce PCI PF, VF ports and attributes
      
      This patchset carry forwards the work initiated in [1] and discussion
      futher concluded at [2].
      
      To improve visibility of representor netdevice, its association with
      PF or VF, physical port, two new devlink port flavours are added as
      PCI PF and PCI VF ports.
      
      A sample eswitch view can be seen below, which will be futher extended to
      mdev subdevices of a PCI function in future.
      
      Patch-1 moves physical port's attribute to new structure
      Patch-2 enhances netlink response to consider port flavour
      Patch-3,4 extends devlink port attributes and port flavour
      Patch-5 extends mlx5 driver to register devlink ports for PF, VF and
      physical link.
      
                                      +---+      +---+
                                    vf|   |      |   | pf
                                      +-+-+      +-+-+
      physical link <---------+         |          |
                              |         |          |
                              |         |          |
                            +-+-+     +-+-+      +-+-+
                            | 1 |     | 2 |      | 3 |
                         +--+---+-----+---+------+---+--+
                         |  physical   vf         pf    |
                         |  port       port       port  |
                         |                              |
                         |             eswitch          |
                         |                              |
                         +------------------------------+
      
      [1] https://www.spinics.net/lists/netdev/msg555797.html
      [2] https://marc.info/?l=linux-netdev&m=155354609408485&w=2
      
      
      
      Changelog:
      v5->v6:
       - Fixed port flavour check order for PCI PF vs other flavours in
         netlink response.
       - Changed 'physical' to 'phys'.
      v4->v5:
       - Split first patch to two patches to handle netlink response in
         separate patch.
       - Corrected typo 'otwerwise' to 'otherwise' in patches 3 and 4.
      v3->v4:
       - Addressed comments from Jiri.
       - Split first patch to two patches.
       - Renamed phys_port to physical to be consistent with pci_pf.
       - Removed port_number from __devlink_port_attrs_set and moved
         assignment to caller function.
       - Used capital letter while moving old comment to new structure.
       - Removed helper function is_devlink_phy_port_num_supported().
      v2->v3:
       - Made port_number and split_port_number applicable only to
         physical port flavours.
      v1->v2:
       - Updated new APIs and mlx5 driver to drop port_number for PF, VF
         attributes
       - Updated port_number comment for its usage
       - Limited putting port_number to physical ports
      ====================
      
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f108c887
    • Parav Pandit's avatar
      net/mlx5e: Register devlink ports for physical link, PCI PF, VFs · f60f315d
      Parav Pandit authored
      
      
      Register devlink port of physical port, PCI PF and PCI VF flavour
      for each PF, VF when a given devlink instance is in switchdev mode.
      
      Implement ndo_get_devlink_port callback API to make use of registered
      devlink ports.
      This eliminates ndo_get_phys_port_name() and ndo_get_port_parent_id()
      callbacks. Hence, remove them.
      
      An example output with 2 VFs, without a PF and single uplink port is
      below.
      
      $devlink port show
      pci/0000:06:00.0/65535: type eth netdev ens2f0 flavour physical
      pci/0000:05:00.0/1: type eth netdev eth1 flavour pcivf pfnum 0 vfnum 0
      pci/0000:05:00.0/2: type eth netdev eth2 flavour pcivf pfnum 0 vfnum 1
      
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f60f315d
    • Parav Pandit's avatar
      devlink: Introduce PCI VF port flavour and port attribute · e41b6bf3
      Parav Pandit authored
      
      
      In an eswitch, PCI VF may have port which is normally represented using
      a representor netdevice.
      To have better visibility of eswitch port, its association with VF,
      and its representor netdevice, introduce a PCI VF port flavour.
      
      When devlink port flavour is PCI VF, fill up PCI VF attributes of
      the port.
      
      Extend port name creation using PCI PF and VF number scheme on best
      effort basis, so that vendor drivers can skip defining their own scheme.
      
      $ devlink port show
      pci/0000:05:00.0/0: type eth netdev eth0 flavour pcipf pfnum 0
      pci/0000:05:00.0/1: type eth netdev eth1 flavour pcivf pfnum 0 vfnum 0
      pci/0000:05:00.0/2: type eth netdev eth2 flavour pcivf pfnum 0 vfnum 1
      
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e41b6bf3
    • Parav Pandit's avatar
      devlink: Introduce PCI PF port flavour and port attribute · 98fd2d65
      Parav Pandit authored
      
      
      In an eswitch, PCI PF may have port which is normally represented
      using a representor netdevice.
      To have better visibility of eswitch port, its association with
      PF and a representor netdevice, introduce a PCI PF port
      flavour and port attriute.
      
      When devlink port flavour is PCI PF, fill up PCI PF attributes of the
      port.
      
      Extend port name creation using PCI PF number on best effort basis.
      So that vendor drivers can skip defining their own scheme.
      
      $ devlink port show
      pci/0000:05:00.0/0: type eth netdev eth0 flavour pcipf pfnum 0
      
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      98fd2d65
    • Parav Pandit's avatar
      devlink: Return physical port fields only for applicable port flavours · a2c6b87d
      Parav Pandit authored
      
      
      Physical port number and split group fields are applicable only to
      physical port flavours such as PHYSICAL, CPU and DSA.
      Hence limit returning those values in netlink response to such port
      flavours.
      
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2c6b87d
    • Parav Pandit's avatar
      devlink: Refactor physical port attributes · 378ef01b
      Parav Pandit authored
      
      
      To support additional devlink port flavours and to support few common
      and few different port attributes, move physical port attributes to a
      different structure.
      
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      378ef01b
  2. Jul 09, 2019