aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4vf/sge.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/sge.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index 9d88c1d50b49..bdfa80ca5e31 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -1510,7 +1510,8 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
1510{ 1510{
1511 struct sk_buff *skb; 1511 struct sk_buff *skb;
1512 const struct cpl_rx_pkt *pkt = (void *)rsp; 1512 const struct cpl_rx_pkt *pkt = (void *)rsp;
1513 bool csum_ok = pkt->csum_calc && !pkt->err_vec; 1513 bool csum_ok = pkt->csum_calc && !pkt->err_vec &&
1514 (rspq->netdev->features & NETIF_F_RXCSUM);
1514 struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq); 1515 struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq);
1515 1516
1516 /* 1517 /*
@@ -1538,8 +1539,8 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
1538 skb_record_rx_queue(skb, rspq->idx); 1539 skb_record_rx_queue(skb, rspq->idx);
1539 rxq->stats.pkts++; 1540 rxq->stats.pkts++;
1540 1541
1541 if (csum_ok && (rspq->netdev->features & NETIF_F_RXCSUM) && 1542 if (csum_ok && !pkt->err_vec &&
1542 !pkt->err_vec && (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) { 1543 (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) {
1543 if (!pkt->ip_frag) 1544 if (!pkt->ip_frag)
1544 skb->ip_summed = CHECKSUM_UNNECESSARY; 1545 skb->ip_summed = CHECKSUM_UNNECESSARY;
1545 else { 1546 else {