Thread (16 messages) 16 messages, 6 authors, 2018-03-07

Re: [RFC net-next 2/6] driver: net: bonding: allow registration of tc offload callbacks in bond

flat view

From: Jiri Pirko <jiri@resnulli.us>
Date: 2018-03-07 10:57:29

Mon, Mar 05, 2018 at 02:28:30PM CET, john.hurley@netronome.com wrote:
quoted hunk ↗ jump to hunk
Allow drivers to register netdev callbacks for tc offload in linux bonds.
If a netdev has registered and is a slave of a given bond, then any tc
rules offloaded to the bond will be relayed to it if both the bond and the
slave permit hw offload.

Because the bond itself is not offloaded, just the rules, we don't care
about whether the bond ports are on the same device or whether some of
slaves are representor ports and some are not.

Signed-off-by: John Hurley <redacted>
---
drivers/net/bonding/bond_main.c | 195 +++++++++++++++++++++++++++++++++++++++-
include/net/bonding.h           |   7 ++
2 files changed, 201 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index e6415f6..d9e41cf 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
[...]

+EXPORT_SYMBOL_GPL(tc_setup_cb_bond_register);
Please, no "bond" specific calls from drivers. That would be wrong.
The idea behing block callbacks was that anyone who is interested could
register to receive those. In this case, slave device is interested.
So it should register to receive block callbacks in the same way as if
the block was directly on top of the slave device. The only thing you
need to handle is to propagate block bind/unbind from master down to the
slaves.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help