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]
Date:	Tue, 10 Mar 2015 02:21:54 +0000
From:	"fugang.duan@...escale.com" <fugang.duan@...escale.com>
To:	Michael Grzeschik <m.grzeschik@...gutronix.de>
CC:	"davem@...emloft.net" <davem@...emloft.net>,
	"Frank.Li@...escale.com" <Frank.Li@...escale.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"kernel@...gutronix.de" <kernel@...gutronix.de>
Subject: RE: [PATCH] net: fec: fix rxvlan feature

From: Michael Grzeschik <m.grzeschik@...gutronix.de> Sent: Tuesday, March 10, 2015 12:56 AM
> To: Duan Fugang-B38611
> Cc: davem@...emloft.net; Li Frank-B20596; netdev@...r.kernel.org;
> kernel@...gutronix.de
> Subject: [PATCH] net: fec: fix rxvlan feature
> 
> The patch 1b7bde6d659d30f171259cc2dfba8e5dab34e735
> "net: fec: implement rx_copybreak to improve rx performance"
> changed the code path for the vlan check in fec_enet_rx_queue:
> 
>  @@ -1417,62 +1486,48 @@ fec_enet_rx_queue(struct net_device *ndev, int
> budget, u16 queue_id)
>  		/* If this is a VLAN packet remove the VLAN Tag */
>  		vlan_packet_rcvd = false;
>  		if ((ndev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
>  			fep->bufdesc_ex && (ebdp->cbd_esc & BD_ENET_RX_VLAN)) {
>  			/* Push and remove the vlan tag */
>                          struct vlan_hdr *vlan_header =
>                                          (struct vlan_hdr *) (data +
> ETH_HLEN);
>                          vlan_tag = ntohs(vlan_header->h_vlan_TCI);
>  -                       pkt_len -= VLAN_HLEN;
> 
>                          vlan_packet_rcvd = true;  +
>  +                       skb_copy_to_linear_data_offset(skb, VLAN_HLEN,
>  +                                                      data, (2 *
> ETH_ALEN));
>  +                       skb_pull(skb, VLAN_HLEN);
>                  }
> 
> With the call of skb_copy_to_linear_data_offset the code here is doing
> more than previously and is breaking the rxvlan feature. This patch
> removes this call to fix it.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index 9bb6220..77dd539 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1479,8 +1479,6 @@ fec_enet_rx_queue(struct net_device *ndev, int
> budget, u16 queue_id)
> 
>  			vlan_packet_rcvd = true;
> 
> -			skb_copy_to_linear_data_offset(skb, VLAN_HLEN,
> -						       data, (2 * ETH_ALEN));
>  			skb_pull(skb, VLAN_HLEN);
>  		}
> 
> --
> 2.1.4

The change doesn't work for enet VLAN.

I remember the current enet VLAN can work for some cases like run PTP VALN case.
I don't know why it cannot work for your test.

Regards,
Andy
--
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