[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTindxJD1a5UPV+6vWbDEeMUTy1QgPs1X8pT-b69D@mail.gmail.com>
Date: Fri, 22 Oct 2010 15:24:00 +0200
From: Michał Mirosław <mirqus@...il.com>
To: Jesse Gross <jesse@...ira.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
Peter Waskiewicz <peter.p.waskiewicz.jr@...el.com>,
Emil Tantilov <emil.s.tantilov@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: Re: [PATCH v2 10/14] ixgbe: Update ixgbe to use new vlan accleration.
2010/10/21 Jesse Gross <jesse@...ira.com>:
> Make the ixgbe driver use the new vlan accleration model.
[...]
> --- a/drivers/net/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ixgbe/ixgbe_main.c
> @@ -954,17 +954,13 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector,
> bool is_vlan = (status & IXGBE_RXD_STAT_VP);
> u16 tag = le16_to_cpu(rx_desc->wb.upper.vlan);
>
> - if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) {
> - if (adapter->vlgrp && is_vlan && (tag & VLAN_VID_MASK))
> - vlan_gro_receive(napi, adapter->vlgrp, tag, skb);
> - else
> - napi_gro_receive(napi, skb);
> - } else {
> - if (adapter->vlgrp && is_vlan && (tag & VLAN_VID_MASK))
> - vlan_hwaccel_rx(skb, adapter->vlgrp, tag);
> - else
> - netif_rx(skb);
> - }
> + if (is_vlan && (tag & VLAN_VID_MASK))
> + __vlan_hwaccel_put_tag(skb, tag);
I know that this is carried over from the driver, but why tag == 0 is
treated differently here? VID0 is somewhat special, as normally it
means 802.1p packet, but i.e. in embedded world people are using it as
normal VID. It would be nice to have this handled consistently in the
VLAN core - deliver to base dev (tag stripped) if vlan 0 is not
configured and to vlan dev if it is.
> +
> + if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL))
> + napi_gro_receive(napi, skb);
> + else
> + netif_rx(skb);
> }
>
> /**
Best Regards,
Michał Mirosław
--
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