Re: [PATCH net-next v5 6/7] vxlan: Add tx-vlan offload support.
From: Pravin Shelar <hidden>
Date: 2013-08-01 17:24:40
On Thu, Aug 1, 2013 at 6:11 AM, Sergei Shtylyov [off-list ref] wrote:
Hello. On 01-08-2013 3:14, Pravin B Shelar wrote:quoted
Following patch allows transmit side vlan offload for vxlan devices.quoted
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
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
@@ -1123,13 +1124,25 @@ int vxlan_xmit_skb(struct net *net, structvxlan_sock *vs,[...]quoted
+ 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.
ok. I will update the patch.
WBR, Sergei