Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c43548d2 authored by Sunil Goutham's avatar Sunil Goutham Committed by David S. Miller
Browse files

net: thunderx: Use napi_consume_skb for bulk free



This patch enables bulk freeing on the Tx side.

Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a3a8ce4c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -521,7 +521,8 @@ static int nicvf_init_resources(struct nicvf *nic)

static void nicvf_snd_pkt_handler(struct net_device *netdev,
				  struct cmp_queue *cq,
				  struct cqe_send_t *cqe_tx, int cqe_type)
				  struct cqe_send_t *cqe_tx,
				  int cqe_type, int budget)
{
	struct sk_buff *skb = NULL;
	struct nicvf *nic = netdev_priv(netdev);
@@ -545,7 +546,7 @@ static void nicvf_snd_pkt_handler(struct net_device *netdev,
	if (skb) {
		nicvf_put_sq_desc(sq, hdr->subdesc_cnt + 1);
		prefetch(skb);
		dev_consume_skb_any(skb);
		napi_consume_skb(skb, budget);
		sq->skbuff[cqe_tx->sqe_ptr] = (u64)NULL;
	} else {
		/* 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,
		break;
		case CQE_TYPE_SEND:
			nicvf_snd_pkt_handler(netdev, cq,
					      (void *)cq_desc, CQE_TYPE_SEND);
					      (void *)cq_desc, CQE_TYPE_SEND,
					      budget);
			tx_done++;
		break;
		case CQE_TYPE_INVALID: