Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v3 5/5] bonding: handle NETIF_F_HW_NETFUNC_OFFLOAD flag to bonding feature mask
@ 2015-01-23  4:33 roopa
  0 siblings, 0 replies; only message in thread
From: roopa @ 2015-01-23  4:33 UTC (permalink / raw)
  To: jiri, sfeldma, jhs, bcrl, tgraf, john.fastabend, stephen,
	vyasevic, ronen.arad
  Cc: netdev, davem, shm, gospo, Roopa Prabhu

From: Roopa Prabhu <roopa@cumulusnetworks.com>

We want bond to pick up the offload flag if any of its slaves have it.

NETIF_F_HW_NETFUNC_OFFLOAD flag is added to the mask, so that
netdev_increment_features does not ignore it.

If this needs to be under CONFIG_NET_SWITCHDEV, I can do so.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
 drivers/net/bonding/bond_main.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 184c434..4304194 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -979,7 +979,11 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
 	netdev_features_t mask;
 	struct slave *slave;
 
-	mask = features;
+	/* If any slave has the offload feature flag set,
+	 * set the offload flag on the bond.
+	 */
+	mask = features | NETIF_F_HW_NETFUNC_OFFLOAD;
+
 	features &= ~NETIF_F_ONE_FOR_ALL;
 	features |= NETIF_F_ALL_FOR_ALL;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-23  4:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23  4:33 [PATCH net-next v3 5/5] bonding: handle NETIF_F_HW_NETFUNC_OFFLOAD flag to bonding feature mask roopa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox