[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210617161435.8853-1-vadym.kochan@plvision.eu>
Date: Thu, 17 Jun 2021 19:14:35 +0300
From: Vadym Kochan <vadym.kochan@...ision.eu>
To: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Vladimir Oltean <olteanv@...il.com>,
Serhiy Boiko <serhiy.boiko@...ision.eu>,
Volodymyr Mytnyk <volodymyr.mytnyk@...ision.eu>
Cc: Vadym Kochan <vadym.kochan@...ision.eu>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Boris Sukholitko <boris.sukholitko@...adcom.com>
Subject: [PATCH net-next] net/sched: cls_flower: fix resetting of ether proto mask
In case of matching 'protocol' the rule does not work:
tc filter add dev $DEV ingress prio 1 protocol $PROTO flower skip_sw action drop
so clear the ether proto mask only for CVLAN case.
The issue was observed by testing on Marvell Prestera Switchdev driver
with recent 'flower' offloading feature.
Fixes: 0dca2c7404a9 ("net/sched: cls_flower: Remove match on n_proto")
CC: Boris Sukholitko <boris.sukholitko@...adcom.com>
Signed-off-by: Vadym Kochan <vadym.kochan@...ision.eu>
---
RFC -> PATCH:
Removed extra empty line.
net/sched/cls_flower.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index 2e704c7a105a..3e1b0012bce4 100644
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -1534,10 +1534,12 @@ static int fl_set_key(struct net *net, struct nlattr **tb,
mask->basic.n_proto = cpu_to_be16(0);
} else {
key->basic.n_proto = ethertype;
+ mask->basic.n_proto = cpu_to_be16(~0);
}
}
} else {
key->basic.n_proto = ethertype;
+ mask->basic.n_proto = cpu_to_be16(~0);
}
}
--
2.17.1
Powered by blists - more mailing lists