netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Gross <jesse@nicira.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] sky2: convert to new VLAN model
Date: Sun, 9 Jan 2011 10:50:36 -0500	[thread overview]
Message-ID: <AANLkTimMHxOVTDm7+8qnoRjHb1BOvDOjDqyHCgHKocTD@mail.gmail.com> (raw)
In-Reply-To: <20110107092758.7dc1152f@nehalam>

On Fri, Jan 7, 2011 at 12:27 PM, Stephen Hemminger
<shemminger@vyatta.com> wrote:
> On Fri, 7 Jan 2011 12:14:51 -0500
> Jesse Gross <jesse@nicira.com> wrote:
>
>> On Thu, Jan 6, 2011 at 11:41 PM, Stephen Hemminger
>> <shemminger@vyatta.com> wrote:
>> > +/* Features available on VLAN with transmit tag stripped */
>> > +#define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO)
>> > +
>> > +static void sky2_vlan_mode(struct net_device *dev)
>> >  {
>> > -       if (onoff) {
>> > +       struct sky2_port *sky2 = netdev_priv(dev);
>> > +       struct sky2_hw *hw = sky2->hw;
>> > +       u16 port = sky2->port;
>> > +
>> > +       if (dev->features & NETIF_F_HW_VLAN_RX)
>> >                sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T),
>> >                             RX_VLAN_STRIP_ON);
>> > +       else
>> > +               sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T),
>> > +                            RX_VLAN_STRIP_OFF);
>> > +
>> > +       if (dev->features & NETIF_F_HW_VLAN_TX) {
>> >                sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
>> >                             TX_VLAN_TAG_ON);
>> > +               dev->vlan_features = dev->features & VLAN_FEAT;
>> >        } else {
>> > -               sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T),
>> > -                            RX_VLAN_STRIP_OFF);
>> >                sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
>> >                             TX_VLAN_TAG_OFF);
>> > +               dev->vlan_features = dev->features & NETIF_F_HIGHDMA;
>>
>> Hmm, the chip supports SG only when TX vlan is on and HIGHDMA only
>> when it is off?  Currently skb_needs_linearize() assumes that when not
>> using vlan acceleration, the DMA engine doesn't care about the
>> presence of a vlan tag and directly uses dev->features.
>
> The chip supports checksum offload only if TX_VLAN is enabled.
> Scatter/gather without checksum offload is not allowed by kernel
> because checksum offload is needed for sendfile.

OK, it sounds like skb_needs_linearize() needs to be more intelligent.
 I will send a patch for that shortly.

  reply	other threads:[~2011-01-09 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07  4:41 [PATCH 2/2] sky2: convert to new VLAN model Stephen Hemminger
2011-01-07 17:14 ` Jesse Gross
2011-01-07 17:27   ` Stephen Hemminger
2011-01-09 15:50     ` Jesse Gross [this message]
2011-01-08  4:13   ` [PATCH 2/2] sky2: convert to new VLAN model (v0.2) Stephen Hemminger
2011-01-09 16:13     ` Jesse Gross
2011-01-09 23:54       ` David Miller

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=AANLkTimMHxOVTDm7+8qnoRjHb1BOvDOjDqyHCgHKocTD@mail.gmail.com \
    --to=jesse@nicira.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.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).