Searched hist:a5bc9294d70fe85729bb343eef281ccbe78ff119 (Results 1 – 1 of 1) sorted by relevance
/linux/net/ipv4/ |
H A D | ipmr.c | diff a5bc9294d70fe85729bb343eef281ccbe78ff119 Tue Oct 03 09:58:08 CEST 2017 Yotam Gigi <yotamg@mellanox.com> ipv4: ipmr: Don't forward packets already forwarded by hardware
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: Yotam Gigi <yotamg@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|