* [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers
@ 2018-11-08 23:17 Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 1/9] cxgb4: use __vlan_hwaccel helpers Michał Mirosław
` (9 more replies)
0 siblings, 10 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:17 UTC (permalink / raw)
To: netdev
Cc: Ajit Khaparde, Alexey Kuznetsov, bridge, Cong Wang, coreteam,
David S. Miller, Florian Westphal, Hideaki YOSHIFUJI,
Jamal Hadi Salim, Jiri Pirko, Jozsef Kadlecsik, linux-rdma,
Mirko Lindner, netfilter-devel, Nikolay Aleksandrov,
Pablo Neira Ayuso, Roopa Prabhu, Sathya Perla, Somnath Kotur,
Sriharsha Basavapatna
This series removes from networking core and driver code an assumption
about how VLAN tag presence is stored in an skb. This will allow to free
up overloading of VLAN.CFI bit to incidate tag's presence.
Michał Mirosław (9):
cxgb4: use __vlan_hwaccel helpers
nfnetlink/queue: use __vlan_hwaccel helpers
net/core: use __vlan_hwaccel helpers
8021q: use __vlan_hwaccel helpers
bridge: use __vlan_hwaccel helpers
ipv4/tunnel: use __vlan_hwaccel helpers
benet: use __vlan_hwaccel helpers
mlx4: use __vlan_hwaccel helpers
sky2: use __vlan_hwaccel helpers
drivers/infiniband/hw/cxgb4/cm.c | 2 +-
drivers/net/ethernet/emulex/benet/be_main.c | 13 +++++++++----
drivers/net/ethernet/marvell/sky2.c | 6 ++----
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +-
net/8021q/vlan_core.c | 2 +-
net/bridge/br_netfilter_hooks.c | 15 +++++++++------
net/bridge/br_private.h | 2 +-
net/bridge/br_vlan.c | 6 +++---
net/core/dev.c | 8 +++++---
net/core/skbuff.c | 2 +-
net/ipv4/ip_tunnel_core.c | 2 +-
net/netfilter/nfnetlink_queue.c | 5 +++--
net/sched/act_vlan.c | 2 +-
13 files changed, 38 insertions(+), 29 deletions(-)
--
2.19.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH net-next 1/9] cxgb4: use __vlan_hwaccel helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
@ 2018-11-08 23:18 ` Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 3/9] net/core: " Michał Mirosław
` (8 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:18 UTC (permalink / raw)
To: netdev
Cc: Steve Wise, linux-rdma, Ajit Khaparde, Alexey Kuznetsov, bridge,
Cong Wang, coreteam, David S. Miller, Florian Westphal,
Hideaki YOSHIFUJI, Jamal Hadi Salim, Jiri Pirko,
Jozsef Kadlecsik, Mirko Lindner, netfilter-devel,
Nikolay Aleksandrov, Pablo Neira Ayuso, Roopa Prabhu,
Sathya Perla, Somnath Kotur
Use __vlan_hwaccel_put_tag() to set vlan tag and proto fields.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/infiniband/hw/cxgb4/cm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 615413bd3e8d..8ed01e07c463 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -3944,7 +3944,7 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb)
} else {
vlan_eh = (struct vlan_ethhdr *)(req + 1);
iph = (struct iphdr *)(vlan_eh + 1);
- skb->vlan_tci = ntohs(cpl->vlan);
+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(cpl->vlan));
}
if (iph->version != 0x4)
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next 3/9] net/core: use __vlan_hwaccel helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 1/9] cxgb4: use __vlan_hwaccel helpers Michał Mirosław
@ 2018-11-08 23:18 ` Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 2/9] nfnetlink/queue: " Michał Mirosław
` (7 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:18 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
Ajit Khaparde, Alexey Kuznetsov, bridge, coreteam,
Florian Westphal, Hideaki YOSHIFUJI, Jozsef Kadlecsik,
linux-rdma, Mirko Lindner, netfilter-devel, Nikolay Aleksandrov,
Pablo Neira Ayuso, Roopa Prabhu, Sathya Perla, Somnath Kotur,
Sriharsha Basavapatna
This removes assumptions about VLAN_TAG_PRESENT bit.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
net/core/dev.c | 8 +++++---
net/core/skbuff.c | 2 +-
net/sched/act_vlan.c | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 0ffcbdd55fa9..bf7e0a471186 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4889,7 +4889,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc,
* and set skb->priority like in vlan_do_receive()
* For the time being, just ignore Priority Code Point
*/
- skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(skb);
}
type = skb->protocol;
@@ -5386,7 +5386,9 @@ static struct list_head *gro_list_prepare(struct napi_struct *napi,
}
diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev;
- diffs |= p->vlan_tci ^ skb->vlan_tci;
+ diffs |= skb_vlan_tag_present(p) ^ skb_vlan_tag_present(skb);
+ if (skb_vlan_tag_present(p))
+ diffs |= p->vlan_tci ^ skb->vlan_tci;
diffs |= skb_metadata_dst_cmp(p, skb);
diffs |= skb_metadata_differs(p, skb);
if (maclen == ETH_HLEN)
@@ -5652,7 +5654,7 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
__skb_pull(skb, skb_headlen(skb));
/* restore the reserve we had after netdev_alloc_skb_ip_align() */
skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN - skb_headroom(skb));
- skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(skb);
skb->dev = napi->dev;
skb->skb_iif = 0;
skb->encapsulation = 0;
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index b4ee5c8b928f..5bb5eb500605 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -5123,7 +5123,7 @@ int skb_vlan_pop(struct sk_buff *skb)
int err;
if (likely(skb_vlan_tag_present(skb))) {
- skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(skb);
} else {
if (unlikely(!eth_type_vlan(skb->protocol)))
return 0;
diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index ba677d54a7af..93fdaf707313 100644
--- a/net/sched/act_vlan.c
+++ b/net/sched/act_vlan.c
@@ -63,7 +63,7 @@ static int tcf_vlan_act(struct sk_buff *skb, const struct tc_action *a,
/* extract existing tag (and guarantee no hw-accel tag) */
if (skb_vlan_tag_present(skb)) {
tci = skb_vlan_tag_get(skb);
- skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(skb);
} else {
/* in-payload vlan tag, pop it */
err = __skb_vlan_pop(skb, &tci);
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next 2/9] nfnetlink/queue: use __vlan_hwaccel helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 1/9] cxgb4: use __vlan_hwaccel helpers Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 3/9] net/core: " Michał Mirosław
@ 2018-11-08 23:18 ` Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 5/9] bridge: " Michał Mirosław
` (6 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:18 UTC (permalink / raw)
To: netdev
Cc: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
netfilter-devel, coreteam, Ajit Khaparde, Alexey Kuznetsov,
bridge, Cong Wang, David S. Miller, Hideaki YOSHIFUJI,
Jamal Hadi Salim, Jiri Pirko, linux-rdma, Mirko Lindner,
Nikolay Aleksandrov, Roopa Prabhu, Sathya Perla, Somnath Kotur,
Sriharsha Basavapatna
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
net/netfilter/nfnetlink_queue.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 43041f087eb3..1ce30efe6854 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -1148,8 +1148,9 @@ static int nfqa_parse_bridge(struct nf_queue_entry *entry,
if (!tb[NFQA_VLAN_TCI] || !tb[NFQA_VLAN_PROTO])
return -EINVAL;
- entry->skb->vlan_tci = ntohs(nla_get_be16(tb[NFQA_VLAN_TCI]));
- entry->skb->vlan_proto = nla_get_be16(tb[NFQA_VLAN_PROTO]);
+ __vlan_hwaccel_put_tag(entry->skb,
+ nla_get_be16(tb[NFQA_VLAN_PROTO]),
+ ntohs(nla_get_be16(tb[NFQA_VLAN_TCI])));
}
if (nfqa[NFQA_L2HDR]) {
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next 5/9] bridge: use __vlan_hwaccel helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
` (2 preceding siblings ...)
2018-11-08 23:18 ` [PATCH net-next 2/9] nfnetlink/queue: " Michał Mirosław
@ 2018-11-08 23:18 ` Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 4/9] 8021q: " Michał Mirosław
` (5 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:18 UTC (permalink / raw)
To: netdev
Cc: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
Roopa Prabhu, Nikolay Aleksandrov, netfilter-devel, coreteam,
bridge, Ajit Khaparde, Alexey Kuznetsov, Cong Wang,
David S. Miller, Hideaki YOSHIFUJI, Jamal Hadi Salim, Jiri Pirko,
linux-rdma, Mirko Lindner, Sathya Perla, Somnath Kotur,
Sriharsha Basavapatna
This removes assumption than vlan_tci != 0 when tag is present.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
net/bridge/br_netfilter_hooks.c | 15 +++++++++------
net/bridge/br_private.h | 2 +-
net/bridge/br_vlan.c | 6 +++---
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
index b1b5e8516724..c9383c470a83 100644
--- a/net/bridge/br_netfilter_hooks.c
+++ b/net/bridge/br_netfilter_hooks.c
@@ -671,10 +671,8 @@ static int br_nf_push_frag_xmit(struct net *net, struct sock *sk, struct sk_buff
return 0;
}
- if (data->vlan_tci) {
- skb->vlan_tci = data->vlan_tci;
- skb->vlan_proto = data->vlan_proto;
- }
+ if (data->vlan_proto)
+ __vlan_hwaccel_put_tag(skb, data->vlan_proto, data->vlan_tci);
skb_copy_to_linear_data_offset(skb, -data->size, data->mac, data->size);
__skb_push(skb, data->encap_size);
@@ -740,8 +738,13 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff
data = this_cpu_ptr(&brnf_frag_data_storage);
- data->vlan_tci = skb->vlan_tci;
- data->vlan_proto = skb->vlan_proto;
+ if (skb_vlan_tag_present(skb)) {
+ data->vlan_tci = skb->vlan_tci;
+ data->vlan_proto = skb->vlan_proto;
+ } else {
+ data->vlan_proto = 0;
+ }
+
data->encap_size = nf_bridge_encap_header_len(skb);
data->size = ETH_HLEN + data->encap_size;
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 2920e06a5403..67105c66584a 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -905,7 +905,7 @@ static inline int br_vlan_get_tag(const struct sk_buff *skb, u16 *vid)
int err = 0;
if (skb_vlan_tag_present(skb)) {
- *vid = skb_vlan_tag_get(skb) & VLAN_VID_MASK;
+ *vid = skb_vlan_tag_get_id(skb);
} else {
*vid = 0;
err = -EINVAL;
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index 8c9297a01947..a7e869da21bf 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -420,7 +420,7 @@ struct sk_buff *br_handle_vlan(struct net_bridge *br,
}
if (v->flags & BRIDGE_VLAN_INFO_UNTAGGED)
- skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(skb);
if (p && (p->flags & BR_VLAN_TUNNEL) &&
br_handle_egress_vlan_tunnel(skb, v)) {
@@ -493,8 +493,8 @@ static bool __allowed_ingress(const struct net_bridge *br,
__vlan_hwaccel_put_tag(skb, br->vlan_proto, pvid);
else
/* Priority-tagged Frame.
- * At this point, We know that skb->vlan_tci had
- * VLAN_TAG_PRESENT bit and its VID field was 0x000.
+ * At this point, we know that skb->vlan_tci VID
+ * field was 0.
* We update only VID field and preserve PCP field.
*/
skb->vlan_tci |= pvid;
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next 4/9] 8021q: use __vlan_hwaccel helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
` (3 preceding siblings ...)
2018-11-08 23:18 ` [PATCH net-next 5/9] bridge: " Michał Mirosław
@ 2018-11-08 23:18 ` Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 7/9] benet: " Michał Mirosław
` (4 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:18 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Ajit Khaparde, Alexey Kuznetsov, bridge,
Cong Wang, coreteam, Florian Westphal, Hideaki YOSHIFUJI,
Jamal Hadi Salim, Jiri Pirko, Jozsef Kadlecsik, linux-rdma,
Mirko Lindner, netfilter-devel, Nikolay Aleksandrov,
Pablo Neira Ayuso, Roopa Prabhu, Sathya Perla, Somnath Kotur,
Sriharsha Basavapatna
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
net/8021q/vlan_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 4f60e86f4b8d..dd39489c829a 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -57,7 +57,7 @@ bool vlan_do_receive(struct sk_buff **skbp)
}
skb->priority = vlan_get_ingress_priority(vlan_dev, skb->vlan_tci);
- skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(skb);
rx_stats = this_cpu_ptr(vlan_dev_priv(vlan_dev)->vlan_pcpu_stats);
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next 7/9] benet: use __vlan_hwaccel helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
` (4 preceding siblings ...)
2018-11-08 23:18 ` [PATCH net-next 4/9] 8021q: " Michał Mirosław
@ 2018-11-08 23:18 ` Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 6/9] ipv4/tunnel: " Michał Mirosław
` (3 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:18 UTC (permalink / raw)
To: netdev
Cc: Sathya Perla, Ajit Khaparde, Sriharsha Basavapatna,
Somnath Kotur, Alexey Kuznetsov, bridge, Cong Wang, coreteam,
David S. Miller, Florian Westphal, Hideaki YOSHIFUJI,
Jamal Hadi Salim, Jiri Pirko, Jozsef Kadlecsik, linux-rdma,
Mirko Lindner, netfilter-devel, Nikolay Aleksandrov,
Pablo Neira Ayuso, Roopa
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/net/ethernet/emulex/benet/be_main.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index c5ad7a4f4d83..80b2bd3747ce 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1049,30 +1049,35 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,
struct be_wrb_params
*wrb_params)
{
+ bool insert_vlan = false;
u16 vlan_tag = 0;
skb = skb_share_check(skb, GFP_ATOMIC);
if (unlikely(!skb))
return skb;
- if (skb_vlan_tag_present(skb))
+ if (skb_vlan_tag_present(skb)) {
vlan_tag = be_get_tx_vlan_tag(adapter, skb);
+ insert_vlan = true;
+ }
if (qnq_async_evt_rcvd(adapter) && adapter->pvid) {
- if (!vlan_tag)
+ if (!insert_vlan) {
vlan_tag = adapter->pvid;
+ insert_vlan = true;
+ }
/* f/w workaround to set skip_hw_vlan = 1, informs the F/W to
* skip VLAN insertion
*/
BE_WRB_F_SET(wrb_params->features, VLAN_SKIP_HW, 1);
}
- if (vlan_tag) {
+ if (insert_vlan) {
skb = vlan_insert_tag_set_proto(skb, htons(ETH_P_8021Q),
vlan_tag);
if (unlikely(!skb))
return skb;
- skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(skb);
}
/* Insert the outer VLAN, if any */
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next 6/9] ipv4/tunnel: use __vlan_hwaccel helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
` (5 preceding siblings ...)
2018-11-08 23:18 ` [PATCH net-next 7/9] benet: " Michał Mirosław
@ 2018-11-08 23:18 ` Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 8/9] mlx4: " Michał Mirosław
` (2 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:18 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
Ajit Khaparde, bridge, Cong Wang, coreteam, Florian Westphal,
Jamal Hadi Salim, Jiri Pirko, Jozsef Kadlecsik, linux-rdma,
Mirko Lindner, netfilter-devel, Nikolay Aleksandrov,
Pablo Neira Ayuso, Roopa Prabhu, Sathya Perla, Somnath Kotur,
Sriharsha Basavapatna
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
net/ipv4/ip_tunnel_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index dde671e97829..f45b96d715f0 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -120,7 +120,7 @@ int __iptunnel_pull_header(struct sk_buff *skb, int hdr_len,
}
skb_clear_hash_if_not_l4(skb);
- skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(skb);
skb_set_queue_mapping(skb, 0);
skb_scrub_packet(skb, xnet);
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next 8/9] mlx4: use __vlan_hwaccel helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
` (6 preceding siblings ...)
2018-11-08 23:18 ` [PATCH net-next 6/9] ipv4/tunnel: " Michał Mirosław
@ 2018-11-08 23:18 ` Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 9/9] sky2: " Michał Mirosław
2018-11-09 4:45 ` [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers David Miller
9 siblings, 0 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:18 UTC (permalink / raw)
To: netdev
Cc: Tariq Toukan, linux-rdma, Ajit Khaparde, Alexey Kuznetsov,
bridge, Cong Wang, coreteam, David S. Miller, Florian Westphal,
Hideaki YOSHIFUJI, Jamal Hadi Salim, Jiri Pirko,
Jozsef Kadlecsik, Mirko Lindner, netfilter-devel,
Nikolay Aleksandrov, Pablo Neira Ayuso, Roopa Prabhu,
Sathya Perla, Somnath Kotur
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index db00bf1c23f5..fd09ba98c0a6 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -875,7 +875,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
skb->data_len = length;
napi_gro_frags(&cq->napi);
} else {
- skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(skb);
skb_clear_hash(skb);
}
next:
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH net-next 9/9] sky2: use __vlan_hwaccel helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
` (7 preceding siblings ...)
2018-11-08 23:18 ` [PATCH net-next 8/9] mlx4: " Michał Mirosław
@ 2018-11-08 23:18 ` Michał Mirosław
2018-11-09 4:45 ` [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers David Miller
9 siblings, 0 replies; 14+ messages in thread
From: Michał Mirosław @ 2018-11-08 23:18 UTC (permalink / raw)
To: netdev
Cc: Mirko Lindner, Stephen Hemminger, Ajit Khaparde,
Alexey Kuznetsov, bridge, Cong Wang, coreteam, David S. Miller,
Florian Westphal, Hideaki YOSHIFUJI, Jamal Hadi Salim,
Jiri Pirko, Jozsef Kadlecsik, linux-rdma, netfilter-devel,
Nikolay Aleksandrov, Pablo Neira Ayuso, Roopa Prabhu,
Sathya Perla, Somnath Kotur
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/net/ethernet/marvell/sky2.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 697d9b374f5e..c7cd0081058e 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -2485,13 +2485,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2,
skb->ip_summed = re->skb->ip_summed;
skb->csum = re->skb->csum;
skb_copy_hash(skb, re->skb);
- skb->vlan_proto = re->skb->vlan_proto;
- skb->vlan_tci = re->skb->vlan_tci;
+ __vlan_hwaccel_copy_tag(skb, re->skb);
pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr,
length, PCI_DMA_FROMDEVICE);
- re->skb->vlan_proto = 0;
- re->skb->vlan_tci = 0;
+ __vlan_hwaccel_clear_tag(re->skb);
skb_clear_hash(re->skb);
re->skb->ip_summed = CHECKSUM_NONE;
skb_put(skb, length);
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
` (8 preceding siblings ...)
2018-11-08 23:18 ` [PATCH net-next 9/9] sky2: " Michał Mirosław
@ 2018-11-09 4:45 ` David Miller
2018-11-11 15:26 ` Tariq Toukan
9 siblings, 1 reply; 14+ messages in thread
From: David Miller @ 2018-11-09 4:45 UTC (permalink / raw)
To: mirq-linux
Cc: netdev, ajit.khaparde, kuznet, bridge, xiyou.wangcong, coreteam,
fw, yoshfuji, jhs, jiri, kadlec, linux-rdma, mlindner,
netfilter-devel, nikolay, pablo, roopa, sathya.perla,
somnath.kotur, sriharsha.basavapatna, stephen, swise, tariqt
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: Fri, 09 Nov 2018 00:17:58 +0100
> This series removes from networking core and driver code an assumption
> about how VLAN tag presence is stored in an skb. This will allow to free
> up overloading of VLAN.CFI bit to incidate tag's presence.
This looks good, series applied.
Thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers
2018-11-09 4:45 ` [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers David Miller
@ 2018-11-11 15:26 ` Tariq Toukan
2018-11-11 16:12 ` mirq-linux
0 siblings, 1 reply; 14+ messages in thread
From: Tariq Toukan @ 2018-11-11 15:26 UTC (permalink / raw)
To: David Miller, mirq-linux
Cc: netdev, ajit.khaparde, kuznet, bridge, xiyou.wangcong, coreteam,
fw, yoshfuji, jhs, jiri, kadlec, linux-rdma, mlindner,
netfilter-devel, nikolay@cumulusnetworks.com
On 09/11/2018 6:45 AM, David Miller wrote:
> From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> Date: Fri, 09 Nov 2018 00:17:58 +0100
>
>> This series removes from networking core and driver code an assumption
>> about how VLAN tag presence is stored in an skb. This will allow to free
>> up overloading of VLAN.CFI bit to incidate tag's presence.
>
> This looks good, series applied.
>
> Thanks.
>
Hi Michal,
We started seeing the compilation errors below, they look related to
this series.
Thanks,
Tariq
02:15:09 net/8021q/vlan_core.c: In function 'vlan_do_receive':
02:15:09 net/8021q/vlan_core.c:60:2: error: implicit declaration of
function '__vlan_hwaccel_clear_tag'; did you mean
'__vlan_hwaccel_get_tag'? [-Werror=implicit-function-declaration]
02:15:09 __vlan_hwaccel_clear_tag(skb);
02:15:09 ^~~~~~~~~~~~~~~~~~~~~~~~
02:15:09 __vlan_hwaccel_get_tag
02:15:09 cc1: some warnings being treated as errors
02:15:09 make[4]: *** [scripts/Makefile.build:293:
net/8021q/vlan_core.o] Error 1
02:15:09 make[4]: *** Waiting for unfinished jobs....
02:15:11 make[3]: *** [scripts/Makefile.build:518: net/8021q] Error 2
02:15:11 make[3]: *** Waiting for unfinished jobs....
02:15:14 make[2]: *** [Makefile:1060: net] Error 2
02:15:14 make[2]: *** Waiting for unfinished jobs....
02:15:36 drivers/net/ethernet/mellanox/mlx4/en_rx.c: In function
'mlx4_en_process_rx_cq':
02:15:36 drivers/net/ethernet/mellanox/mlx4/en_rx.c:878:4: error:
implicit declaration of function '__vlan_hwaccel_clear_tag'; did you
mean '__vlan_hwaccel_get_tag'? [-Werror=implicit-function-declaration]
02:15:36 __vlan_hwaccel_clear_tag(skb);
02:15:36 ^~~~~~~~~~~~~~~~~~~~~~~~
02:15:36 __vlan_hwaccel_get_tag
02:15:36 cc1: some warnings being treated as errors
02:15:37 make[7]: *** [scripts/Makefile.build:293:
drivers/net/ethernet/mellanox/mlx4/en_rx.o] Error 1
02:15:37 make[7]: *** Waiting for unfinished jobs....
02:15:37 make[6]: *** [scripts/Makefile.build:518:
drivers/net/ethernet/mellanox/mlx4] Error 2
02:15:37 make[6]: *** Waiting for unfinished jobs....
02:15:39 drivers/net/ethernet/mellanox/mlx5/core/en_stats.c: In function
'mlx5e_grp_sw_update_stats':
02:15:39 drivers/net/ethernet/mellanox/mlx5/core/en_stats.c:216:1:
warning: the frame size of 1200 bytes is larger than 1024 bytes
[-Wframe-larger-than=]
02:15:39 }
02:15:39 ^
02:15:49 make[5]: *** [scripts/Makefile.build:518:
drivers/net/ethernet/mellanox] Error 2
02:15:49 make[4]: *** [scripts/Makefile.build:518: drivers/net/ethernet]
Error 2
02:15:49 make[3]: *** [scripts/Makefile.build:518: drivers/net] Error 2
02:15:49 make[2]: *** [Makefile:1060: drivers] Error 2
02:15:49 make[1]: *** [scripts/package/Makefile:63: binrpm-pkg] Error 2
02:15:49 make: *** [Makefile:1399: binrpm-pkg] Error 2
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers
2018-11-11 15:26 ` Tariq Toukan
@ 2018-11-11 16:12 ` mirq-linux
2018-11-11 16:16 ` mirq-linux
0 siblings, 1 reply; 14+ messages in thread
From: mirq-linux @ 2018-11-11 16:12 UTC (permalink / raw)
To: Tariq Toukan
Cc: ajit.khaparde, somnath.kotur, linux-rdma, bridge, coreteam,
kadlec, kuznet, pablo, jiri, swise, nikolay, roopa, jhs,
sathya.perla, xiyou.wangcong, mlindner,
sriharsha.basavapatna@broadcom.com
On Sun, Nov 11, 2018 at 03:26:29PM +0000, Tariq Toukan wrote:
>
>
> On 09/11/2018 6:45 AM, David Miller wrote:
> > From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > Date: Fri, 09 Nov 2018 00:17:58 +0100
> >
> >> This series removes from networking core and driver code an assumption
> >> about how VLAN tag presence is stored in an skb. This will allow to free
> >> up overloading of VLAN.CFI bit to incidate tag's presence.
> >
> > This looks good, series applied.
> >
> > Thanks.
> >
>
> Hi Michal,
>
> We started seeing the compilation errors below, they look related to
> this series.
Do you have the previous series applied that introduced __vlan_hwaccel_clear_tag()?
It was applied to net-next before I sent this series.
I did a allmodconfig build of net-next and saw no failures (apart from
OVS that is fixed already).
Best Regards,
Michał Mirosław
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers
2018-11-11 16:12 ` mirq-linux
@ 2018-11-11 16:16 ` mirq-linux
0 siblings, 0 replies; 14+ messages in thread
From: mirq-linux @ 2018-11-11 16:16 UTC (permalink / raw)
To: Tariq Toukan
Cc: ajit.khaparde, somnath.kotur, linux-rdma, bridge, coreteam,
kadlec, kuznet, pablo, jiri, swise, nikolay, roopa, jhs,
sathya.perla, xiyou.wangcong, mlindner,
sriharsha.basavapatna@broadcom.com
On Sun, Nov 11, 2018 at 05:12:43PM +0100, mirq-linux@rere.qmqm.pl wrote:
> On Sun, Nov 11, 2018 at 03:26:29PM +0000, Tariq Toukan wrote:
> > On 09/11/2018 6:45 AM, David Miller wrote:
> > > From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > > Date: Fri, 09 Nov 2018 00:17:58 +0100
> > >> This series removes from networking core and driver code an assumption
> > >> about how VLAN tag presence is stored in an skb. This will allow to free
> > >> up overloading of VLAN.CFI bit to incidate tag's presence.
> > >
> > > This looks good, series applied.
> > >
> > > Thanks.
> > Hi Michal,
> >
> > We started seeing the compilation errors below, they look related to
> > this series.
>
> Do you have the previous series applied that introduced __vlan_hwaccel_clear_tag()?
> It was applied to net-next before I sent this series.
>
> I did a allmodconfig build of net-next and saw no failures (apart from
> OVS that is fixed already).
The prerequisite commit in net-next is:
7025abb2e447b ("Merge branch 'vlan-prepare-for-removal-of-VLAN_TAG_PRESENT'")
Best Regards,
Michał Mirosław
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-11-11 16:16 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08 23:17 [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 1/9] cxgb4: use __vlan_hwaccel helpers Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 3/9] net/core: " Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 2/9] nfnetlink/queue: " Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 5/9] bridge: " Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 4/9] 8021q: " Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 7/9] benet: " Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 6/9] ipv4/tunnel: " Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 8/9] mlx4: " Michał Mirosław
2018-11-08 23:18 ` [PATCH net-next 9/9] sky2: " Michał Mirosław
2018-11-09 4:45 ` [PATCH net-next 0/9] Use __vlan_hwaccel_*() helpers David Miller
2018-11-11 15:26 ` Tariq Toukan
2018-11-11 16:12 ` mirq-linux
2018-11-11 16:16 ` mirq-linux
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).