Subject: Re: [PATCH net-next v5 6/7] vxlan: Add tx-vlan offload support.

From: Sergei Shtylyov <[email-masked]>
Date: Thu, 01 Aug 2013 17:11:47 +0400

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 <[email-masked]>
> ---
> 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(-)

> 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
[...]
> @@ -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