diff options
author | Ravi Gunasekaran <r-gunasekaran@ti.com> | 2023-06-14 14:47:10 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-22 02:47:05 +0300 |
commit | e748d0fd66abc4b1c136022e4e053004fce2b792 (patch) | |
tree | 33db1aa25e4b38d758af8a1940a3467fc5a3730d /net/hsr/hsr_device.c | |
parent | ff9b63c80b087bac495b337882a5880b130401c0 (diff) | |
download | linux-e748d0fd66abc4b1c136022e4e053004fce2b792.tar.xz |
net: hsr: Disable promiscuous mode in offload mode
When port-to-port forwarding for interfaces in HSR node is enabled,
disable promiscuous mode since L2 frame forward happens at the
offloaded hardware.
Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230614114710.31400-1-r-gunasekaran@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/hsr/hsr_device.c')
-rw-r--r-- | net/hsr/hsr_device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index 5a236aae2366..306f942c3b28 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -531,6 +531,11 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2], if (res) goto err_add_master; + /* HSR forwarding offload supported in lower device? */ + if ((slave[0]->features & NETIF_F_HW_HSR_FWD) && + (slave[1]->features & NETIF_F_HW_HSR_FWD)) + hsr->fwd_offloaded = true; + res = register_netdevice(hsr_dev); if (res) goto err_unregister; |