* [PATCH nf-next 1/2] netfilter: flowtable: add vlan match offload support
@ 2021-04-01 7:50 wenxu
2021-04-01 7:50 ` [PATCH nf-next 2/2] netfilter: flowtable: add vlan pop action " wenxu
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: wenxu @ 2021-04-01 7:50 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
From: wenxu <wenxu@ucloud.cn>
This patch support vlan_id, vlan_priority and vlan_proto match
for flowtable offload
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
include/net/netfilter/nf_flow_table.h | 2 ++
net/netfilter/nf_flow_table_offload.c | 39 +++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/include/net/netfilter/nf_flow_table.h b/include/net/netfilter/nf_flow_table.h
index 4d991c1..b36b553a 100644
--- a/include/net/netfilter/nf_flow_table.h
+++ b/include/net/netfilter/nf_flow_table.h
@@ -21,6 +21,8 @@ struct nf_flow_key {
struct flow_dissector_key_control control;
struct flow_dissector_key_control enc_control;
struct flow_dissector_key_basic basic;
+ struct flow_dissector_key_vlan vlan;
+ struct flow_dissector_key_vlan cvlan;
union {
struct flow_dissector_key_ipv4_addrs ipv4;
struct flow_dissector_key_ipv6_addrs ipv6;
diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
index 7d0d128..ee882127 100644
--- a/net/netfilter/nf_flow_table_offload.c
+++ b/net/netfilter/nf_flow_table_offload.c
@@ -78,6 +78,18 @@ static void nf_flow_rule_lwt_match(struct nf_flow_match *match,
match->dissector.used_keys |= enc_keys;
}
+static void nf_flow_rule_vlan_match(struct flow_dissector_key_vlan *key,
+ struct flow_dissector_key_vlan *mask,
+ u16 vlan_id, __be16 n_proto)
+{
+ key->vlan_id = vlan_id & VLAN_VID_MASK;
+ mask->vlan_id = VLAN_VID_MASK;
+ key->vlan_priority = (vlan_id & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
+ mask->vlan_priority = 0x7;
+ key->vlan_tpid = n_proto;
+ mask->vlan_tpid = 0xffff;
+}
+
static int nf_flow_rule_match(struct nf_flow_match *match,
const struct flow_offload_tuple *tuple,
struct dst_entry *other_dst)
@@ -85,6 +97,7 @@ static int nf_flow_rule_match(struct nf_flow_match *match,
struct nf_flow_key *mask = &match->mask;
struct nf_flow_key *key = &match->key;
struct ip_tunnel_info *tun_info;
+ bool vlan_encap = false;
NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_META, meta);
NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_CONTROL, control);
@@ -126,6 +139,32 @@ static int nf_flow_rule_match(struct nf_flow_match *match,
match->dissector.used_keys |= BIT(key->control.addr_type);
mask->basic.n_proto = 0xffff;
+ if (tuple->encap_num > 0 && !(tuple->in_vlan_ingress & BIT(0)) &&
+ tuple->encap[0].proto == htons(ETH_P_8021Q)) {
+ NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_VLAN, vlan);
+ nf_flow_rule_vlan_match(&key->vlan, &mask->vlan,
+ tuple->encap[0].id,
+ key->basic.n_proto);
+ vlan_encap = true;
+ }
+
+ if (tuple->encap_num > 1 && !(tuple->in_vlan_ingress & BIT(1)) &&
+ tuple->encap[1].proto == htons(ETH_P_8021Q)) {
+ if (vlan_encap) {
+ NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_CVLAN,
+ cvlan);
+ nf_flow_rule_vlan_match(&key->cvlan, &mask->cvlan,
+ tuple->encap[1].id,
+ key->basic.n_proto);
+ } else {
+ NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_VLAN,
+ vlan);
+ nf_flow_rule_vlan_match(&key->vlan, &mask->vlan,
+ tuple->encap[1].id,
+ key->basic.n_proto);
+ }
+ }
+
switch (tuple->l4proto) {
case IPPROTO_TCP:
key->tcp.flags = 0;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH nf-next 2/2] netfilter: flowtable: add vlan pop action offload support
2021-04-01 7:50 [PATCH nf-next 1/2] netfilter: flowtable: add vlan match offload support wenxu
@ 2021-04-01 7:50 ` wenxu
2021-04-01 8:18 ` [PATCH nf-next 1/2] netfilter: flowtable: add vlan match " Pablo Neira Ayuso
2021-04-01 13:59 ` kernel test robot
2 siblings, 0 replies; 5+ messages in thread
From: wenxu @ 2021-04-01 7:50 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
From: wenxu <wenxu@ucloud.cn>
This patch add vlan pop action offload in the flowtable
offload.
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
net/netfilter/nf_flow_table_offload.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
index ee882127..e097273 100644
--- a/net/netfilter/nf_flow_table_offload.c
+++ b/net/netfilter/nf_flow_table_offload.c
@@ -621,6 +621,7 @@ static void flow_offload_decap_tunnel(const struct flow_offload *flow,
struct nf_flow_rule *flow_rule)
{
const struct flow_offload_tuple *other_tuple;
+ const struct flow_offload_tuple *tuple;
int i;
flow_offload_decap_tunnel(flow, dir, flow_rule);
@@ -630,6 +631,20 @@ static void flow_offload_decap_tunnel(const struct flow_offload *flow,
flow_offload_eth_dst(net, flow, dir, flow_rule) < 0)
return -1;
+ tuple = &flow->tuplehash[dir].tuple;
+
+ for (i = 0; i < tuple->encap_num; i++) {
+ struct flow_action_entry *entry;
+
+ if (tuple->in_vlan_ingress & BIT(i))
+ continue;
+
+ if (tuple->encap[i].proto == htons(ETH_P_8021Q)) {
+ entry = flow_action_entry_next(flow_rule);
+ entry->id = FLOW_ACTION_VLAN_POP;
+ }
+ }
+
other_tuple = &flow->tuplehash[!dir].tuple;
for (i = 0; i < other_tuple->encap_num; i++) {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH nf-next 1/2] netfilter: flowtable: add vlan match offload support
2021-04-01 7:50 [PATCH nf-next 1/2] netfilter: flowtable: add vlan match offload support wenxu
2021-04-01 7:50 ` [PATCH nf-next 2/2] netfilter: flowtable: add vlan pop action " wenxu
@ 2021-04-01 8:18 ` Pablo Neira Ayuso
2021-04-02 2:37 ` wenxu
2021-04-01 13:59 ` kernel test robot
2 siblings, 1 reply; 5+ messages in thread
From: Pablo Neira Ayuso @ 2021-04-01 8:18 UTC (permalink / raw)
To: wenxu; +Cc: netfilter-devel
On Thu, Apr 01, 2021 at 03:50:10PM +0800, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
>
> This patch support vlan_id, vlan_priority and vlan_proto match
> for flowtable offload
No driver in tree is using this code.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH nf-next 1/2] netfilter: flowtable: add vlan match offload support
2021-04-01 7:50 [PATCH nf-next 1/2] netfilter: flowtable: add vlan match offload support wenxu
2021-04-01 7:50 ` [PATCH nf-next 2/2] netfilter: flowtable: add vlan pop action " wenxu
2021-04-01 8:18 ` [PATCH nf-next 1/2] netfilter: flowtable: add vlan match " Pablo Neira Ayuso
@ 2021-04-01 13:59 ` kernel test robot
2 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-04-01 13:59 UTC (permalink / raw)
To: wenxu, pablo; +Cc: kbuild-all, netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 16026 bytes --]
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on nf-next/master]
url: https://github.com/0day-ci/linux/commits/wenxu-ucloud-cn/netfilter-flowtable-add-vlan-match-offload-support/20210401-155259
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: x86_64-randconfig-s021-20210401 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-279-g6d5d9b42-dirty
# https://github.com/0day-ci/linux/commit/346de57353f34fbf24607af67862662212333f95
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review wenxu-ucloud-cn/netfilter-flowtable-add-vlan-match-offload-support/20210401-155259
git checkout 346de57353f34fbf24607af67862662212333f95
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
net/netfilter/nf_flow_table_offload.c:46:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] keyid @@ got unsigned int @@
net/netfilter/nf_flow_table_offload.c:46:32: sparse: expected restricted __be32 [usertype] keyid
net/netfilter/nf_flow_table_offload.c:46:32: sparse: got unsigned int
net/netfilter/nf_flow_table_offload.c:56:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] src @@ got unsigned int @@
net/netfilter/nf_flow_table_offload.c:56:44: sparse: expected restricted __be32 [usertype] src
net/netfilter/nf_flow_table_offload.c:56:44: sparse: got unsigned int
net/netfilter/nf_flow_table_offload.c:58:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] dst @@ got unsigned int @@
net/netfilter/nf_flow_table_offload.c:58:44: sparse: expected restricted __be32 [usertype] dst
net/netfilter/nf_flow_table_offload.c:58:44: sparse: got unsigned int
>> net/netfilter/nf_flow_table_offload.c:90:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] vlan_tpid @@ got int @@
net/netfilter/nf_flow_table_offload.c:90:25: sparse: expected restricted __be16 [usertype] vlan_tpid
net/netfilter/nf_flow_table_offload.c:90:25: sparse: got int
net/netfilter/nf_flow_table_offload.c:123:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] src @@ got unsigned int @@
net/netfilter/nf_flow_table_offload.c:123:32: sparse: expected restricted __be32 [usertype] src
net/netfilter/nf_flow_table_offload.c:123:32: sparse: got unsigned int
net/netfilter/nf_flow_table_offload.c:125:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] dst @@ got unsigned int @@
net/netfilter/nf_flow_table_offload.c:125:32: sparse: expected restricted __be32 [usertype] dst
net/netfilter/nf_flow_table_offload.c:125:32: sparse: got unsigned int
net/netfilter/nf_flow_table_offload.c:140:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] n_proto @@ got int @@
net/netfilter/nf_flow_table_offload.c:140:29: sparse: expected restricted __be16 [usertype] n_proto
net/netfilter/nf_flow_table_offload.c:140:29: sparse: got int
net/netfilter/nf_flow_table_offload.c:184:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] src @@ got int @@
net/netfilter/nf_flow_table_offload.c:184:22: sparse: expected restricted __be16 [usertype] src
net/netfilter/nf_flow_table_offload.c:184:22: sparse: got int
net/netfilter/nf_flow_table_offload.c:186:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] dst @@ got int @@
net/netfilter/nf_flow_table_offload.c:186:22: sparse: expected restricted __be16 [usertype] dst
net/netfilter/nf_flow_table_offload.c:186:22: sparse: got int
net/netfilter/nf_flow_table_offload.c:249:30: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 const [usertype] *value @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:249:30: sparse: expected restricted __be32 const [usertype] *value
net/netfilter/nf_flow_table_offload.c:249:30: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:249:36: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:249:36: sparse: expected restricted __be32 const [usertype] *mask
net/netfilter/nf_flow_table_offload.c:249:36: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:254:30: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 const [usertype] *value @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:254:30: sparse: expected restricted __be32 const [usertype] *value
net/netfilter/nf_flow_table_offload.c:254:30: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:254:36: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:254:36: sparse: expected restricted __be32 const [usertype] *mask
net/netfilter/nf_flow_table_offload.c:254:36: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:308:30: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 const [usertype] *value @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:308:30: sparse: expected restricted __be32 const [usertype] *value
net/netfilter/nf_flow_table_offload.c:308:30: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:308:36: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:308:36: sparse: expected restricted __be32 const [usertype] *mask
net/netfilter/nf_flow_table_offload.c:308:36: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:314:30: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 const [usertype] *value @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:314:30: sparse: expected restricted __be32 const [usertype] *value
net/netfilter/nf_flow_table_offload.c:314:30: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:314:36: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:314:36: sparse: expected restricted __be32 const [usertype] *mask
net/netfilter/nf_flow_table_offload.c:314:36: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:325:20: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/netfilter/nf_flow_table_offload.c:325:20: sparse: expected unsigned int [usertype] mask
net/netfilter/nf_flow_table_offload.c:325:20: sparse: got restricted __be32
net/netfilter/nf_flow_table_offload.c:343:37: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:343:37: sparse: expected restricted __be32 const [usertype] *mask
net/netfilter/nf_flow_table_offload.c:343:37: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:352:20: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/netfilter/nf_flow_table_offload.c:352:20: sparse: expected unsigned int [usertype] mask
net/netfilter/nf_flow_table_offload.c:352:20: sparse: got restricted __be32
net/netfilter/nf_flow_table_offload.c:370:37: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:370:37: sparse: expected restricted __be32 const [usertype] *mask
net/netfilter/nf_flow_table_offload.c:370:37: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:392:20: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/netfilter/nf_flow_table_offload.c:392:20: sparse: expected unsigned int [usertype] mask
net/netfilter/nf_flow_table_offload.c:392:20: sparse: got restricted __be32
net/netfilter/nf_flow_table_offload.c:409:60: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:409:60: sparse: expected restricted __be32 const [usertype] *mask
net/netfilter/nf_flow_table_offload.c:409:60: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:417:20: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/netfilter/nf_flow_table_offload.c:417:20: sparse: expected unsigned int [usertype] mask
net/netfilter/nf_flow_table_offload.c:417:20: sparse: got restricted __be32
net/netfilter/nf_flow_table_offload.c:434:60: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:434:60: sparse: expected restricted __be32 const [usertype] *mask
net/netfilter/nf_flow_table_offload.c:434:60: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:469:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] port @@ got restricted __be32 [usertype] @@
net/netfilter/nf_flow_table_offload.c:469:22: sparse: expected unsigned int [assigned] [usertype] port
net/netfilter/nf_flow_table_offload.c:469:22: sparse: got restricted __be32 [usertype]
net/netfilter/nf_flow_table_offload.c:470:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/netfilter/nf_flow_table_offload.c:470:22: sparse: expected unsigned int [usertype] mask
net/netfilter/nf_flow_table_offload.c:470:22: sparse: got restricted __be32
net/netfilter/nf_flow_table_offload.c:475:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] port @@ got restricted __be32 [usertype] @@
net/netfilter/nf_flow_table_offload.c:475:22: sparse: expected unsigned int [assigned] [usertype] port
net/netfilter/nf_flow_table_offload.c:475:22: sparse: got restricted __be32 [usertype]
net/netfilter/nf_flow_table_offload.c:476:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/netfilter/nf_flow_table_offload.c:476:22: sparse: expected unsigned int [usertype] mask
net/netfilter/nf_flow_table_offload.c:476:22: sparse: got restricted __be32
net/netfilter/nf_flow_table_offload.c:483:30: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 const [usertype] *value @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:483:30: sparse: expected restricted __be32 const [usertype] *value
net/netfilter/nf_flow_table_offload.c:483:30: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:483:37: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:483:37: sparse: expected restricted __be32 const [usertype] *mask
net/netfilter/nf_flow_table_offload.c:483:37: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:499:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] port @@ got restricted __be32 [usertype] @@
net/netfilter/nf_flow_table_offload.c:499:22: sparse: expected unsigned int [assigned] [usertype] port
net/netfilter/nf_flow_table_offload.c:499:22: sparse: got restricted __be32 [usertype]
net/netfilter/nf_flow_table_offload.c:500:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/netfilter/nf_flow_table_offload.c:500:22: sparse: expected unsigned int [usertype] mask
net/netfilter/nf_flow_table_offload.c:500:22: sparse: got restricted __be32
net/netfilter/nf_flow_table_offload.c:505:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] port @@ got restricted __be32 [usertype] @@
net/netfilter/nf_flow_table_offload.c:505:22: sparse: expected unsigned int [assigned] [usertype] port
net/netfilter/nf_flow_table_offload.c:505:22: sparse: got restricted __be32 [usertype]
net/netfilter/nf_flow_table_offload.c:506:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/netfilter/nf_flow_table_offload.c:506:22: sparse: expected unsigned int [usertype] mask
net/netfilter/nf_flow_table_offload.c:506:22: sparse: got restricted __be32
net/netfilter/nf_flow_table_offload.c:513:30: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 const [usertype] *value @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:513:30: sparse: expected restricted __be32 const [usertype] *value
net/netfilter/nf_flow_table_offload.c:513:30: sparse: got unsigned int *
net/netfilter/nf_flow_table_offload.c:513:37: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __be32 const [usertype] *mask @@ got unsigned int * @@
net/netfilter/nf_flow_table_offload.c:513:37: sparse: expected restricted __be32 const [usertype] *mask
vim +90 net/netfilter/nf_flow_table_offload.c
80
81 static void nf_flow_rule_vlan_match(struct flow_dissector_key_vlan *key,
82 struct flow_dissector_key_vlan *mask,
83 u16 vlan_id, __be16 n_proto)
84 {
85 key->vlan_id = vlan_id & VLAN_VID_MASK;
86 mask->vlan_id = VLAN_VID_MASK;
87 key->vlan_priority = (vlan_id & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
88 mask->vlan_priority = 0x7;
89 key->vlan_tpid = n_proto;
> 90 mask->vlan_tpid = 0xffff;
91 }
92
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41671 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH nf-next 1/2] netfilter: flowtable: add vlan match offload support
2021-04-01 8:18 ` [PATCH nf-next 1/2] netfilter: flowtable: add vlan match " Pablo Neira Ayuso
@ 2021-04-02 2:37 ` wenxu
0 siblings, 0 replies; 5+ messages in thread
From: wenxu @ 2021-04-02 2:37 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
On 4/1/2021 4:18 PM, Pablo Neira Ayuso wrote:
> On Thu, Apr 01, 2021 at 03:50:10PM +0800, wenxu@ucloud.cn wrote:
>> From: wenxu <wenxu@ucloud.cn>
>>
>> This patch support vlan_id, vlan_priority and vlan_proto match
>> for flowtable offload
> No driver in tree is using this code.
I think mlx5_core driver can support match this code in FT offload
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-02 2:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-01 7:50 [PATCH nf-next 1/2] netfilter: flowtable: add vlan match offload support wenxu
2021-04-01 7:50 ` [PATCH nf-next 2/2] netfilter: flowtable: add vlan pop action " wenxu
2021-04-01 8:18 ` [PATCH nf-next 1/2] netfilter: flowtable: add vlan match " Pablo Neira Ayuso
2021-04-02 2:37 ` wenxu
2021-04-01 13:59 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).