Subject: Re: [PATCH net-next] stmmac: Add vlan rx for better GRO performance.

From: Sergei Shtylyov <[email-masked]>
Date: Tue, 14 Jan 2014 22:14:09 +0300

Hello.

On 01/14/2014 08:34 PM, Vince Bridgers wrote:

> GRO requires VLANs to be removed before aggregation can occur.
> The Synopsys EMAC does not strip VLAN tags so this must be
> done by the driver.

> Signed-off-by: Vince Bridgers <[email-masked]>
> ---
>   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |   18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)

> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index b8e3a4c..e3ff84e 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1951,6 +1951,22 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
>   	return NETDEV_TX_OK;
>   }
>
> +static inline void stmmac_rx_vlan(struct net_device *dev, struct sk_buff *skb)
> +{
> +	struct ethhdr *ehdr;
> +	u16 vlanid;

    Empty line after declarations wouldn't hurt.

> +	if ((dev->features & NETIF_F_HW_VLAN_CTAG_RX) ==
> +		NETIF_F_HW_VLAN_CTAG_RX &&

    Line should start right below the second paren on the previousl line.

> +		!__vlan_get_tag(skb, &vlanid)) {

    This one too.

WBR, Sergei