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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTikwGQFByOZGgCCjTJySPa8QYndZ903CFmOkS1Ha@mail.gmail.com>
Date:	Fri, 7 Jan 2011 12:14:51 -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 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.

Also, can't we enable NETIF_F_GRO in vlan_features?  It will be set
initially by register_netdevice() but if we change the flags it gets
blown away.
--
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