lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimMHxOVTDm7+8qnoRjHb1BOvDOjDqyHCgHKocTD@mail.gmail.com>
Date:	Sun, 9 Jan 2011 10:50:36 -0500
From:	Jesse Gross <jesse@...ira.com>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] sky2: convert to new VLAN model

On Fri, Jan 7, 2011 at 12:27 PM, Stephen Hemminger
<shemminger@...tta.com> wrote:
> On Fri, 7 Jan 2011 12:14:51 -0500
> Jesse Gross <jesse@...ira.com> wrote:
>
>> On Thu, Jan 6, 2011 at 11:41 PM, Stephen Hemminger
>> <shemminger@...tta.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ