Message ID | 20220630083405.41631-2-thomas.liu@ucloud.cn |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,v3,1/2] netdev: clear auto_classified if netdev reopens of type system | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/intel-ovs-compilation | success | test: success |
On 2022-06-30 11:34 AM, Tao Liu wrote: > Bond master netdev may be created without a classification type, due > to routing or tunneling code. > > If bond master is not attached to ovs, the ingress block on slaves shoud > not be updated. > > Simple reproducer: > tc q ls dev net3 ingress > ip a add 10.1.1.1/30 dev bond0 > ip l set net3 master bond0 > tc q ls dev net3 ingress > > Fixes: d22f8927c3c9 ("netdev-linux: monitor and offload LAG slaves to TC") > Signed-off-by: Tao Liu <thomas.liu@ucloud.cn> > --- > lib/netdev-linux.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c > index 9d12502..b9e0c99 100644 > --- a/lib/netdev-linux.c > +++ b/lib/netdev-linux.c > @@ -682,7 +682,10 @@ netdev_linux_update_lag(struct rtnetlink_change *change) > return; > } > > - if (is_netdev_linux_class(master_netdev->netdev_class)) { > + /* If bond master is not attached to ovs, ingress block on slaves > + * shoud not be updated. */ > + if (!master_netdev->auto_classified && > + is_netdev_linux_class(master_netdev->netdev_class)) { > block_id = netdev_get_block_id(master_netdev); > if (!block_id) { > netdev_close(master_netdev); Acked-by: Roi Dayan <roid@nvidia.com>
On 7/13/22 10:15, Roi Dayan wrote: > > > On 2022-06-30 11:34 AM, Tao Liu wrote: >> Bond master netdev may be created without a classification type, due >> to routing or tunneling code. >> >> If bond master is not attached to ovs, the ingress block on slaves shoud >> not be updated. >> >> Simple reproducer: >> tc q ls dev net3 ingress >> ip a add 10.1.1.1/30 dev bond0 >> ip l set net3 master bond0 >> tc q ls dev net3 ingress >> >> Fixes: d22f8927c3c9 ("netdev-linux: monitor and offload LAG slaves to TC") >> Signed-off-by: Tao Liu <thomas.liu@ucloud.cn> >> --- >> lib/netdev-linux.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c >> index 9d12502..b9e0c99 100644 >> --- a/lib/netdev-linux.c >> +++ b/lib/netdev-linux.c >> @@ -682,7 +682,10 @@ netdev_linux_update_lag(struct rtnetlink_change *change) >> return; >> } >> - if (is_netdev_linux_class(master_netdev->netdev_class)) { >> + /* If bond master is not attached to ovs, ingress block on slaves >> + * shoud not be updated. */ >> + if (!master_netdev->auto_classified && >> + is_netdev_linux_class(master_netdev->netdev_class)) { >> block_id = netdev_get_block_id(master_netdev); >> if (!block_id) { >> netdev_close(master_netdev); > > Acked-by: Roi Dayan <roid@nvidia.com> Thanks! Applied and backported down to 2.13. Best regards, Ilya Maximets.
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 9d12502..b9e0c99 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -682,7 +682,10 @@ netdev_linux_update_lag(struct rtnetlink_change *change) return; } - if (is_netdev_linux_class(master_netdev->netdev_class)) { + /* If bond master is not attached to ovs, ingress block on slaves + * shoud not be updated. */ + if (!master_netdev->auto_classified && + is_netdev_linux_class(master_netdev->netdev_class)) { block_id = netdev_get_block_id(master_netdev); if (!block_id) { netdev_close(master_netdev);
Bond master netdev may be created without a classification type, due to routing or tunneling code. If bond master is not attached to ovs, the ingress block on slaves shoud not be updated. Simple reproducer: tc q ls dev net3 ingress ip a add 10.1.1.1/30 dev bond0 ip l set net3 master bond0 tc q ls dev net3 ingress Fixes: d22f8927c3c9 ("netdev-linux: monitor and offload LAG slaves to TC") Signed-off-by: Tao Liu <thomas.liu@ucloud.cn> --- lib/netdev-linux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)