Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vnic/nicvf_queues.c
Show First 20 Lines • Show All 725 Lines • ▼ Show 20 Lines | nicvf_snd_pkt_handler(struct nicvf *nic, struct cmp_queue *cq, | ||||
} | } | ||||
nicvf_check_cqe_tx_errs(nic, cq, cqe_tx); | nicvf_check_cqe_tx_errs(nic, cq, cqe_tx); | ||||
} | } | ||||
static int | static int | ||||
nicvf_cq_intr_handler(struct nicvf *nic, uint8_t cq_idx) | nicvf_cq_intr_handler(struct nicvf *nic, uint8_t cq_idx) | ||||
{ | { | ||||
struct epoch_tracker et; | |||||
struct mbuf *mbuf; | struct mbuf *mbuf; | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
int processed_cqe, work_done = 0, tx_done = 0; | int processed_cqe, work_done = 0, tx_done = 0; | ||||
int cqe_count, cqe_head; | int cqe_count, cqe_head; | ||||
struct queue_set *qs = nic->qs; | struct queue_set *qs = nic->qs; | ||||
struct cmp_queue *cq = &qs->cq[cq_idx]; | struct cmp_queue *cq = &qs->cq[cq_idx]; | ||||
struct snd_queue *sq = &qs->sq[cq_idx]; | struct snd_queue *sq = &qs->sq[cq_idx]; | ||||
struct rcv_queue *rq; | struct rcv_queue *rq; | ||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | out: | ||||
*/ | */ | ||||
rq_idx = cq_idx; | rq_idx = cq_idx; | ||||
rq = &nic->qs->rq[rq_idx]; | rq = &nic->qs->rq[rq_idx]; | ||||
lro = &rq->lro; | lro = &rq->lro; | ||||
tcp_lro_flush_all(lro); | tcp_lro_flush_all(lro); | ||||
NICVF_CMP_UNLOCK(cq); | NICVF_CMP_UNLOCK(cq); | ||||
NET_EPOCH_ENTER(et); | |||||
ifp = nic->ifp; | ifp = nic->ifp; | ||||
/* Push received MBUFs to the stack */ | /* Push received MBUFs to the stack */ | ||||
while (!buf_ring_empty(cq->rx_br)) { | while (!buf_ring_empty(cq->rx_br)) { | ||||
mbuf = buf_ring_dequeue_mc(cq->rx_br); | mbuf = buf_ring_dequeue_mc(cq->rx_br); | ||||
if (__predict_true(mbuf != NULL)) | if (__predict_true(mbuf != NULL)) | ||||
(*ifp->if_input)(ifp, mbuf); | (*ifp->if_input)(ifp, mbuf); | ||||
} | } | ||||
NET_EPOCH_EXIT(et); | |||||
return (cmp_err); | return (cmp_err); | ||||
} | } | ||||
/* | /* | ||||
* Qset error interrupt handler | * Qset error interrupt handler | ||||
* | * | ||||
* As of now only CQ errors are handled | * As of now only CQ errors are handled | ||||
▲ Show 20 Lines • Show All 1,528 Lines • Show Last 20 Lines |