From: Ben Hutchings <bhutchings@solarflare.com>
To: Andrew Gallatin <gallatin@myri.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 1/1] vlan: restore offload use on vlan transmit
Date: Thu, 6 Dec 2012 23:43:47 +0000 [thread overview]
Message-ID: <1354837427.2828.88.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <1354827296-12009-2-git-send-email-gallatin@myri.com>
On Thu, 2012-12-06 at 15:54 -0500, Andrew Gallatin wrote:
> This patch copies the vlan device's dev->features to its
> dev->vlan_features, which allows packets to arrive at
> vlan_dev_hard_start_xmit() with their offloads intact.
>
> When a packet destined for a vlan interface is transmitted, it passes
> through dev_hard_start_xmit() (and netif_skb_features()) twice. First
> on its way to vlan_dev_hard_start_xmit(), and then again on its way to
> the backing device's xmit handler. If the vlan device does not setup
> its dev->vlan_features, then netif_skb_features() will strip the
> features on the first trip through it (on the way to
> vlan_dev_hard_start_xmit()).
>
> Signed-off-by: Andrew Gallatin <gallatin@myri.com>
> ---
> net/8021q/vlan_dev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index 4a6d31a..9d4b3c9 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -559,6 +559,7 @@ static int vlan_dev_init(struct net_device *dev)
>
> dev->features |= real_dev->vlan_features | NETIF_F_LLTX;
> dev->gso_max_size = real_dev->gso_max_size;
> + dev->vlan_features = dev->features;
To repeat myself: no, this will result in the features being transferred
to VLAN devices stacked on top of this one (to an arbitrary depth!).
Ben.
> /* ipv6 shared card related stuff */
> dev->dev_id = real_dev->dev_id;
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2012-12-06 23:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 20:54 [PATCH net-next 0/1] fix vlan transmit performance Andrew Gallatin
2012-12-06 20:54 ` [PATCH net-next 1/1] vlan: restore offload use on vlan transmit Andrew Gallatin
2012-12-06 23:43 ` Ben Hutchings [this message]
2012-12-06 23:42 ` [PATCH net-next 0/1] fix vlan transmit performance Ben Hutchings
2012-12-07 0:10 ` Andrew Gallatin
2012-12-07 17:32 ` Andrew Gallatin
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=1354837427.2828.88.camel@bwh-desktop.uk.solarflarecom.com \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=gallatin@myri.com \
--cc=netdev@vger.kernel.org \
/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