netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Gross <jesse@nicira.com>
To: jeffrey.t.kirsher@intel.com
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
	"Duyck, Alexander H" <alexander.h.duyck@intel.com>
Subject: Re: [PATCH 1/2] ixgb: Don't check for vlan group on transmit.
Date: Fri, 5 Nov 2010 12:56:30 -0700	[thread overview]
Message-ID: <AANLkTin62WWL+cnLVNaOYmcvL28rfkUDVCVqiimSPZ=e@mail.gmail.com> (raw)
In-Reply-To: <1288984304.3091.11.camel@jtkirshe-MOBL1>

On Fri, Nov 5, 2010 at 12:11 PM, Jeff Kirsher
<jeffrey.t.kirsher@intel.com> wrote:
> On Sat, 2010-10-30 at 11:49 -0700, Jesse Gross wrote:
>> On transmit, the ixgb driver will only use vlan acceleration if a
>> vlan group is configured.  This can lead to tags getting dropped
>> when bridging because the networking core assumes that a driver
>> that claims vlan acceleration support can do it at all times.  This
>> change should have been part of commit eab6d18d "vlan: Don't check for
>> vlan group before vlan_tx_tag_present." but was missed.
>>
>> Signed-off-by: Jesse Gross <jesse@nicira.com>
>> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
>> CC: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
>> ---
>>  drivers/net/ixgb/ixgb_main.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
>> index caa8192..d18194e 100644
>> --- a/drivers/net/ixgb/ixgb_main.c
>> +++ b/drivers/net/ixgb/ixgb_main.c
>> @@ -1498,7 +1498,7 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
>>                       DESC_NEEDED)))
>>               return NETDEV_TX_BUSY;
>>
>> -     if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
>> +     if (vlan_tx_tag_present(skb)) {
>>               tx_flags |= IXGB_TX_FLAGS_VLAN;
>>               vlan_id = vlan_tx_tag_get(skb);
>>       }
>
> After further review, NAK because this will cause a bug.  With this
> patch it would be possible to overrun the buffers, so the correct fix is
> to increase max_frame_size by VLAN_TAG_SIZE in ixgb/igb_change_mtu.

Hmm, I didn't see any other place where it made changes to the
handling of packets on transmit if a vlan group is configured.  Maybe
the buffer is extended when a group is registered and stripping is
enabled?

In any case, you might want to check the other Intel drivers for
similar problems.  I did a pass and made a mass conversion of this
type a little while ago.  Those changes have already been merged, I
just missed this one by accident.

  reply	other threads:[~2010-11-05 19:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-30 18:49 [PATCH 1/2] ixgb: Don't check for vlan group on transmit Jesse Gross
2010-10-30 18:49 ` [PATCH 2/2] igb: Don't depend on vlan group for receive size Jesse Gross
2010-11-03 14:55   ` Jeff Kirsher
2010-11-03 14:55 ` [PATCH 1/2] ixgb: Don't check for vlan group on transmit Jeff Kirsher
2010-11-05 19:11 ` Jeff Kirsher
2010-11-05 19:56   ` Jesse Gross [this message]
2010-11-05 20:06     ` Jeff Kirsher
2010-11-05 22:30       ` Duyck, Alexander H
2010-11-08 19:59         ` Jesse Gross
2010-11-30 22:33           ` Jesse Gross
2010-11-30 22:52             ` Tantilov, Emil S
2010-12-01 17:40             ` Duyck, Alexander H

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='AANLkTin62WWL+cnLVNaOYmcvL28rfkUDVCVqiimSPZ=e@mail.gmail.com' \
    --to=jesse@nicira.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.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;
as well as URLs for NNTP newsgroup(s).