Re: [PATCH net-next v5 6/7] vxlan: Add tx-vlan offload support.
From: Sergei Shtylyov <hidden>
Date: 2013-08-01 13:11:42
Hello. On 01-08-2013 3:14, Pravin B Shelar wrote:
Following patch allows transmit side vlan offload for vxlan devices.
Signed-off-by: Pravin B Shelar <redacted> --- v2-v3: - Set NETIF_F_HW_VLAN_STAG_TX feature. - Added WARN on vlan tag push. - Fixed hw_features. --- drivers/net/vxlan.c | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-)
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index f9c7c75..2f35a2b 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c
[...]
quoted hunk ↗ jump to hunk
@@ -1123,13 +1124,25 @@ int vxlan_xmit_skb(struct net *net, struct vxlan_sock *vs,
[...]
+ if (vlan_tx_tag_present(skb)) {
+ if (unlikely(!__vlan_put_tag(skb,
+ skb->vlan_proto,
+ vlan_tx_tag_get(skb)))) {
+ WARN_ON(1);
+ return -ENOMEM;
+ }if (WARN_ON(!__vlan_put_tag(skb, skb->vlan_proto, vlan_tx_tag_get(skb)))) return -ENOMEM; should be equivalent. WBR, Sergei