@@ -1202,6 +1202,10 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
1202
1202
BUG_ON (qidx >= pi -> nqsets );
1203
1203
txq = & adapter -> sge .ethtxq [pi -> first_qset + qidx ];
1204
1204
1205
+ if (pi -> vlan_id && !skb_vlan_tag_present (skb ))
1206
+ __vlan_hwaccel_put_tag (skb , cpu_to_be16 (ETH_P_8021Q ),
1207
+ pi -> vlan_id );
1208
+
1205
1209
/*
1206
1210
* Take this opportunity to reclaim any TX Descriptors whose DMA
1207
1211
* transfers have completed.
@@ -1570,6 +1574,7 @@ static void do_gro(struct sge_eth_rxq *rxq, const struct pkt_gl *gl,
1570
1574
{
1571
1575
struct adapter * adapter = rxq -> rspq .adapter ;
1572
1576
struct sge * s = & adapter -> sge ;
1577
+ struct port_info * pi ;
1573
1578
int ret ;
1574
1579
struct sk_buff * skb ;
1575
1580
@@ -1586,8 +1591,9 @@ static void do_gro(struct sge_eth_rxq *rxq, const struct pkt_gl *gl,
1586
1591
skb -> truesize += skb -> data_len ;
1587
1592
skb -> ip_summed = CHECKSUM_UNNECESSARY ;
1588
1593
skb_record_rx_queue (skb , rxq -> rspq .idx );
1594
+ pi = netdev_priv (skb -> dev );
1589
1595
1590
- if (pkt -> vlan_ex ) {
1596
+ if (pkt -> vlan_ex && ! pi -> vlan_id ) {
1591
1597
__vlan_hwaccel_put_tag (skb , cpu_to_be16 (ETH_P_8021Q ),
1592
1598
be16_to_cpu (pkt -> vlan ));
1593
1599
rxq -> stats .vlan_ex ++ ;
@@ -1620,6 +1626,7 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
1620
1626
struct sge_eth_rxq * rxq = container_of (rspq , struct sge_eth_rxq , rspq );
1621
1627
struct adapter * adapter = rspq -> adapter ;
1622
1628
struct sge * s = & adapter -> sge ;
1629
+ struct port_info * pi ;
1623
1630
1624
1631
/*
1625
1632
* If this is a good TCP packet and we have Generic Receive Offload
@@ -1644,6 +1651,7 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
1644
1651
__skb_pull (skb , s -> pktshift );
1645
1652
skb -> protocol = eth_type_trans (skb , rspq -> netdev );
1646
1653
skb_record_rx_queue (skb , rspq -> idx );
1654
+ pi = netdev_priv (skb -> dev );
1647
1655
rxq -> stats .pkts ++ ;
1648
1656
1649
1657
if (csum_ok && !pkt -> err_vec &&
@@ -1660,9 +1668,10 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
1660
1668
} else
1661
1669
skb_checksum_none_assert (skb );
1662
1670
1663
- if (pkt -> vlan_ex ) {
1671
+ if (pkt -> vlan_ex && ! pi -> vlan_id ) {
1664
1672
rxq -> stats .vlan_ex ++ ;
1665
- __vlan_hwaccel_put_tag (skb , htons (ETH_P_8021Q ), be16_to_cpu (pkt -> vlan ));
1673
+ __vlan_hwaccel_put_tag (skb , htons (ETH_P_8021Q ),
1674
+ be16_to_cpu (pkt -> vlan ));
1666
1675
}
1667
1676
1668
1677
netif_receive_skb (skb );
0 commit comments