netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: yuehaibing@huawei.com
Cc: j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net,
	jiri@resnulli.us, jay.vosburgh@canonical.com,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v2] bonding: Add vlan tx offload to hw_enc_features
Date: Thu, 08 Aug 2019 22:02:29 -0700 (PDT)	[thread overview]
Message-ID: <20190808.220229.26286305923067210.davem@davemloft.net> (raw)
In-Reply-To: <20190807021959.58572-1-yuehaibing@huawei.com>

From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 7 Aug 2019 10:19:59 +0800

> As commit 30d8177e8ac7 ("bonding: Always enable vlan tx offload")
> said, we should always enable bonding's vlan tx offload, pass the
> vlan packets to the slave devices with vlan tci, let them to handle
> vlan implementation.
> 
> Now if encapsulation protocols like VXLAN is used, skb->encapsulation
> may be set, then the packet is passed to vlan device which based on
> bonding device. However in netif_skb_features(), the check of
> hw_enc_features:
> 
> 	 if (skb->encapsulation)
>                  features &= dev->hw_enc_features;
> 
> clears NETIF_F_HW_VLAN_CTAG_TX/NETIF_F_HW_VLAN_STAG_TX. This results
> in same issue in commit 30d8177e8ac7 like this:
> 
> vlan_dev_hard_start_xmit
>   -->dev_queue_xmit
>     -->validate_xmit_skb
>       -->netif_skb_features //NETIF_F_HW_VLAN_CTAG_TX is cleared
>       -->validate_xmit_vlan
>         -->__vlan_hwaccel_push_inside //skb->tci is cleared
> ...
>  --> bond_start_xmit
>    --> bond_xmit_hash //BOND_XMIT_POLICY_ENCAP34
>      --> __skb_flow_dissect // nhoff point to IP header
>         -->  case htons(ETH_P_8021Q)
>              // skb_vlan_tag_present is false, so
>              vlan = __skb_header_pointer(skb, nhoff, sizeof(_vlan),
>              //vlan point to ip header wrongly
> 
> Fixes: b2a103e6d0af ("bonding: convert to ndo_fix_features")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>

Applied and queued up for -stable.

      reply	other threads:[~2019-08-09  5:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07  2:19 [PATCH v2] bonding: Add vlan tx offload to hw_enc_features YueHaibing
2019-08-09  5:02 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190808.220229.26286305923067210.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andy@greyhouse.net \
    --cc=j.vosburgh@gmail.com \
    --cc=jay.vosburgh@canonical.com \
    --cc=jiri@resnulli.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vfalico@gmail.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).