diff options
author | David S. Miller <davem@davemloft.net> | 2022-02-05 18:26:00 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-05 18:26:00 +0300 |
commit | b58ef6b70ada3b07449c0cd535cbc63c67c9a16b (patch) | |
tree | a5a65cd0899c5cb9ae418bb8f4475ecb34579f39 | |
parent | 8f4f9c93c7049ad56eb6158883a8ce9857b04abe (diff) | |
parent | 68f831355052706e1f8498653f6c4d36643c0db8 (diff) | |
download | linux-b58ef6b70ada3b07449c0cd535cbc63c67c9a16b.tar.xz |
Merge branch 'net-mana-next'
Haiyang Zhang says:
====================
net: mana: Add handling of CQE_RX_TRUNCATED and a cleanup
Add handling of CQE_RX_TRUNCATED and a cleanup patch
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/microsoft/mana/mana_en.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index 69e791e6abc4..b7d3ba1b4d17 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -1085,8 +1085,10 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq, break; case CQE_RX_TRUNCATED: - netdev_err(ndev, "Dropped a truncated packet\n"); - return; + ++ndev->stats.rx_dropped; + rxbuf_oob = &rxq->rx_oobs[rxq->buf_index]; + netdev_warn_once(ndev, "Dropped a truncated packet\n"); + goto drop; case CQE_RX_COALESCED_4: netdev_err(ndev, "RX coalescing is unsupported\n"); @@ -1102,9 +1104,6 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq, return; } - if (oob->cqe_hdr.cqe_type != CQE_RX_OKAY) - return; - pktlen = oob->ppi[0].pkt_len; if (pktlen == 0) { @@ -1154,6 +1153,7 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq, mana_rx_skb(old_buf, oob, rxq); +drop: mana_move_wq_tail(rxq->gdma_rq, rxbuf_oob->wqe_inf.wqe_size_in_bu); mana_post_pkt_rxq(rxq); |