1. 03 Oct, 2017 5 commits
    • Yotam Gigi's avatar
      mlxsw: acl: Introduce ACL trap and forward action · 26787243
      Yotam Gigi authored
      Use trap/discard flex action to implement trap and forward. The action will
      later be used for multicast routing, as the multicast routing mechanism is
      done using ACL flexible actions in Spectrum hardware. Using that action, it
      will be possible to implement a trap-and-forward route.
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26787243
    • Yotam Gigi's avatar
      ipv4: ipmr: Don't forward packets already forwarded by hardware · a5bc9294
      Yotam Gigi authored
      Change the ipmr module to not forward packets if:
       - The packet is marked with the offload_mr_fwd_mark, and
       - Both input interface and output interface share the same parent ID.
      
      This way, a packet can go through partial multicast forwarding in the
      hardware, where it will be forwarded only to the devices that share the
      same parent ID (AKA, reside inside the same hardware). The kernel will
      forward the packet to all other interfaces.
      
      To do this, add the ipmr_offload_forward helper, which per skb, ingress VIF
      and egress VIF, returns whether the forwarding was offloaded to hardware.
      The ipmr_queue_xmit frees the skb and does not forward it if the result is
      a true value.
      
      All the forwarding path code compiles out when the CONFIG_NET_SWITCHDEV is
      not set.
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Reviewed-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a5bc9294
    • Yotam Gigi's avatar
      ipv4: ipmr: Add the parent ID field to VIF struct · 5d8b3e69
      Yotam Gigi authored
      In order to allow the ipmr module to do partial multicast forwarding
      according to the device parent ID, add the device parent ID field to the
      VIF struct. This way, the forwarding path can use the parent ID field
      without invoking switchdev calls, which requires the RTNL lock.
      
      When a new VIF is added, set the device parent ID field in it by invoking
      the switchdev_port_attr_get call.
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d8b3e69
    • Yotam Gigi's avatar
      skbuff: Add the offload_mr_fwd_mark field · abf4bb6b
      Yotam Gigi authored
      Similarly to the offload_fwd_mark field, the offload_mr_fwd_mark field is
      used to allow partial offloading of MFC multicast routes.
      
      Switchdev drivers can offload MFC multicast routes to the hardware by
      registering to the FIB notification chain. When one of the route output
      interfaces is not offload-able, i.e. has different parent ID, the route
      cannot be fully offloaded by the hardware. Examples to non-offload-able
      devices are a management NIC, dummy device, pimreg device, etc.
      
      Similar problem exists in the bridge module, as one bridge can hold
      interfaces with different parent IDs. At the bridge, the problem is solved
      by the offload_fwd_mark skb field.
      
      Currently, when a route cannot go through full offload, the only solution
      for a switchdev driver is not to offload it at all and let the packet go
      through slow path.
      
      Using the offload_mr_fwd_mark field, a driver can indicate that a packet
      was already forwarded by hardware to all the devices with the same parent
      ID as the input device. Further patches in this patch-set are going to
      enhance ipmr to skip multicast forwarding to devices with the same parent
      ID if a packets is marked with that field.
      
      The reason why the already existing "offload_fwd_mark" bit cannot be used
      is that a switchdev driver would want to make the distinction between a
      packet that has already gone through L2 forwarding but did not go through
      multicast forwarding, and a packet that has already gone through both L2
      and multicast forwarding.
      
      For example: when a packet is ingressing from a switchport enslaved to a
      bridge, which is configured with multicast forwarding, the following
      scenarios are possible:
       - The packet can be trapped to the CPU due to exception while multicast
         forwarding (for example, MTU error). In that case, it had already gone
         through L2 forwarding in the hardware, thus A switchdev driver would
         want to set the skb->offload_fwd_mark and not the
         skb->offload_mr_fwd_mark.
       - The packet can also be trapped due to a pimreg/dummy device used as one
         of the output interfaces. In that case, it can go through both L2 and
         (partial) multicast forwarding inside the hardware, thus a switchdev
         driver would want to set both the skb->offload_fwd_mark and
         skb->offload_mr_fwd_mark.
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellaox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      abf4bb6b
    • Arjun Vynipadath's avatar
      cxgb4: Update comment for min_mtu · a047fbae
      Arjun Vynipadath authored
      We have lost a comment for minimum mtu value set for netdevice with
      'commit d894be57 ("ethernet: use net core MTU range checking in
      more drivers"). Updating it accordingly.
      Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a047fbae
  2. 02 Oct, 2017 35 commits