Skip to content

Commit c43548d

Browse files
Sunil Gouthamdavem330
authored andcommitted
net: thunderx: Use napi_consume_skb for bulk free
This patch enables bulk freeing on the Tx side. Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a3a8ce4 commit c43548d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/net/ethernet/cavium/thunder/nicvf_main.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,8 @@ static int nicvf_init_resources(struct nicvf *nic)
521521

522522
static void nicvf_snd_pkt_handler(struct net_device *netdev,
523523
struct cmp_queue *cq,
524-
struct cqe_send_t *cqe_tx, int cqe_type)
524+
struct cqe_send_t *cqe_tx,
525+
int cqe_type, int budget)
525526
{
526527
struct sk_buff *skb = NULL;
527528
struct nicvf *nic = netdev_priv(netdev);
@@ -545,7 +546,7 @@ static void nicvf_snd_pkt_handler(struct net_device *netdev,
545546
if (skb) {
546547
nicvf_put_sq_desc(sq, hdr->subdesc_cnt + 1);
547548
prefetch(skb);
548-
dev_consume_skb_any(skb);
549+
napi_consume_skb(skb, budget);
549550
sq->skbuff[cqe_tx->sqe_ptr] = (u64)NULL;
550551
} else {
551552
/* In case of HW TSO, HW sends a CQE for each segment of a TSO
@@ -700,7 +701,8 @@ static int nicvf_cq_intr_handler(struct net_device *netdev, u8 cq_idx,
700701
break;
701702
case CQE_TYPE_SEND:
702703
nicvf_snd_pkt_handler(netdev, cq,
703-
(void *)cq_desc, CQE_TYPE_SEND);
704+
(void *)cq_desc, CQE_TYPE_SEND,
705+
budget);
704706
tx_done++;
705707
break;
706708
case CQE_TYPE_INVALID:

0 commit comments

Comments
 (0)