diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-07-20 04:54:35 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 13:47:56 -0700 |
commit | 892ef5d85259e193505d553c10237fd5dc9a3d0d (patch) | |
tree | 9d755e3311ce8592b8b23cf5928431f107e7902c /drivers/net/cxgb3/sge.c | |
parent | dc437974af52e78f2736543dfee94cc385dae6e9 (diff) | |
download | linux-892ef5d85259e193505d553c10237fd5dc9a3d0d.tar.gz linux-892ef5d85259e193505d553c10237fd5dc9a3d0d.tar.bz2 linux-892ef5d85259e193505d553c10237fd5dc9a3d0d.zip |
cxgb3: do vlan cleanup
- unify vlan and nonvlan rx path
- kill pi->vlan_grp and vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/sge.c')
-rw-r--r-- | drivers/net/cxgb3/sge.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 76bf5892b962..d6fa1777a343 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c @@ -2028,28 +2028,11 @@ static void rx_eth(struct adapter *adap, struct sge_rspq *rq, skb_checksum_none_assert(skb); skb_record_rx_queue(skb, qs - &adap->sge.qs[pi->first_qset]); - if (unlikely(p->vlan_valid)) { - struct vlan_group *grp = pi->vlan_grp; - + if (p->vlan_valid) { qs->port_stats[SGE_PSTAT_VLANEX]++; - if (likely(grp)) - if (lro) - vlan_gro_receive(&qs->napi, grp, - ntohs(p->vlan), skb); - else { - if (unlikely(pi->iscsic.flags)) { - unsigned short vtag = ntohs(p->vlan) & - VLAN_VID_MASK; - skb->dev = vlan_group_get_device(grp, - vtag); - cxgb3_process_iscsi_prov_pack(pi, skb); - } - __vlan_hwaccel_rx(skb, grp, ntohs(p->vlan), - rq->polling); - } - else - dev_kfree_skb_any(skb); - } else if (rq->polling) { + __vlan_hwaccel_put_tag(skb, ntohs(p->vlan)); + } + if (rq->polling) { if (lro) napi_gro_receive(&qs->napi, skb); else { @@ -2147,14 +2130,8 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs, skb_record_rx_queue(skb, qs - &adap->sge.qs[pi->first_qset]); - if (unlikely(cpl->vlan_valid)) { - struct vlan_group *grp = pi->vlan_grp; - - if (likely(grp != NULL)) { - vlan_gro_frags(&qs->napi, grp, ntohs(cpl->vlan)); - return; - } - } + if (cpl->vlan_valid) + __vlan_hwaccel_put_tag(skb, ntohs(cpl->vlan)); napi_gro_frags(&qs->napi); } |