Lines Matching refs:r_vec
74 nfp_nfd3_tx_tso(struct nfp_net_r_vector *r_vec, struct nfp_nfd3_tx_buf *txbuf, in nfp_nfd3_tx_tso() argument
106 u64_stats_update_begin(&r_vec->tx_sync); in nfp_nfd3_tx_tso()
107 r_vec->tx_lso++; in nfp_nfd3_tx_tso()
108 u64_stats_update_end(&r_vec->tx_sync); in nfp_nfd3_tx_tso()
123 nfp_nfd3_tx_csum(struct nfp_net_dp *dp, struct nfp_net_r_vector *r_vec, in nfp_nfd3_tx_csum() argument
166 u64_stats_update_begin(&r_vec->tx_sync); in nfp_nfd3_tx_csum()
168 r_vec->hw_csum_tx_inner += txbuf->pkt_cnt; in nfp_nfd3_tx_csum()
170 r_vec->hw_csum_tx += txbuf->pkt_cnt; in nfp_nfd3_tx_csum()
171 u64_stats_update_end(&r_vec->tx_sync); in nfp_nfd3_tx_csum()
260 struct nfp_net_r_vector *r_vec; in nfp_nfd3_tx() local
275 r_vec = tx_ring->r_vec; in nfp_nfd3_tx()
285 u64_stats_update_begin(&r_vec->tx_sync); in nfp_nfd3_tx()
286 r_vec->tx_busy++; in nfp_nfd3_tx()
287 u64_stats_update_end(&r_vec->tx_sync); in nfp_nfd3_tx()
291 skb = nfp_net_tls_tx(dp, r_vec, skb, &tls_handle, &nr_frags); in nfp_nfd3_tx()
329 nfp_nfd3_tx_tso(r_vec, txbuf, txd, skb, md_bytes); in nfp_nfd3_tx()
333 nfp_nfd3_tx_csum(dp, r_vec, txbuf, txd, skb); in nfp_nfd3_tx()
368 u64_stats_update_begin(&r_vec->tx_sync); in nfp_nfd3_tx()
369 r_vec->tx_gather++; in nfp_nfd3_tx()
370 u64_stats_update_end(&r_vec->tx_sync); in nfp_nfd3_tx()
408 u64_stats_update_begin(&r_vec->tx_sync); in nfp_nfd3_tx()
409 r_vec->tx_errors++; in nfp_nfd3_tx()
410 u64_stats_update_end(&r_vec->tx_sync); in nfp_nfd3_tx()
423 struct nfp_net_r_vector *r_vec = tx_ring->r_vec; in nfp_nfd3_tx_complete() local
424 struct nfp_net_dp *dp = &r_vec->nfp_net->dp; in nfp_nfd3_tx_complete()
483 u64_stats_update_begin(&r_vec->tx_sync); in nfp_nfd3_tx_complete()
484 r_vec->tx_bytes += done_bytes; in nfp_nfd3_tx_complete()
485 r_vec->tx_pkts += done_pkts; in nfp_nfd3_tx_complete()
486 u64_stats_update_end(&r_vec->tx_sync); in nfp_nfd3_tx_complete()
508 struct nfp_net_r_vector *r_vec = tx_ring->r_vec; in nfp_nfd3_xdp_complete() local
509 struct nfp_net_dp *dp = &r_vec->nfp_net->dp; in nfp_nfd3_xdp_complete()
536 u64_stats_update_begin(&r_vec->tx_sync); in nfp_nfd3_xdp_complete()
537 r_vec->tx_bytes += done_bytes; in nfp_nfd3_xdp_complete()
538 r_vec->tx_pkts += done_pkts; in nfp_nfd3_xdp_complete()
539 u64_stats_update_end(&r_vec->tx_sync); in nfp_nfd3_xdp_complete()
662 nfp_nfd3_rx_csum(const struct nfp_net_dp *dp, struct nfp_net_r_vector *r_vec, in nfp_nfd3_rx_csum() argument
674 u64_stats_update_begin(&r_vec->rx_sync); in nfp_nfd3_rx_csum()
675 r_vec->hw_csum_rx_complete++; in nfp_nfd3_rx_csum()
676 u64_stats_update_end(&r_vec->rx_sync); in nfp_nfd3_rx_csum()
681 u64_stats_update_begin(&r_vec->rx_sync); in nfp_nfd3_rx_csum()
682 r_vec->hw_csum_rx_error++; in nfp_nfd3_rx_csum()
683 u64_stats_update_end(&r_vec->rx_sync); in nfp_nfd3_rx_csum()
694 u64_stats_update_begin(&r_vec->rx_sync); in nfp_nfd3_rx_csum()
695 r_vec->hw_csum_rx_ok++; in nfp_nfd3_rx_csum()
696 u64_stats_update_end(&r_vec->rx_sync); in nfp_nfd3_rx_csum()
702 u64_stats_update_begin(&r_vec->rx_sync); in nfp_nfd3_rx_csum()
703 r_vec->hw_csum_rx_inner_ok++; in nfp_nfd3_rx_csum()
704 u64_stats_update_end(&r_vec->rx_sync); in nfp_nfd3_rx_csum()
811 nfp_nfd3_rx_drop(const struct nfp_net_dp *dp, struct nfp_net_r_vector *r_vec, in nfp_nfd3_rx_drop() argument
815 u64_stats_update_begin(&r_vec->rx_sync); in nfp_nfd3_rx_drop()
816 r_vec->rx_drops++; in nfp_nfd3_rx_drop()
821 r_vec->rx_replace_buf_alloc_fail++; in nfp_nfd3_rx_drop()
822 u64_stats_update_end(&r_vec->rx_sync); in nfp_nfd3_rx_drop()
857 nfp_nfd3_rx_drop(dp, rx_ring->r_vec, rx_ring, rxbuf, in nfp_nfd3_tx_xdp_buf()
908 struct nfp_net_r_vector *r_vec = rx_ring->r_vec; in nfp_nfd3_rx() local
909 struct nfp_net_dp *dp = &r_vec->nfp_net->dp; in nfp_nfd3_rx()
922 tx_ring = r_vec->xdp_ring; in nfp_nfd3_rx()
976 u64_stats_update_begin(&r_vec->rx_sync); in nfp_nfd3_rx()
977 r_vec->rx_pkts++; in nfp_nfd3_rx()
978 r_vec->rx_bytes += pkt_len; in nfp_nfd3_rx()
979 u64_stats_update_end(&r_vec->rx_sync); in nfp_nfd3_rx()
985 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL); in nfp_nfd3_rx()
1001 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, in nfp_nfd3_rx()
1067 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, in nfp_nfd3_rx()
1078 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL); in nfp_nfd3_rx()
1083 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, skb); in nfp_nfd3_rx()
1100 nfp_nfd3_rx_csum(dp, r_vec, rxd, &meta, skb); in nfp_nfd3_rx()
1105 u64_stats_update_begin(&r_vec->rx_sync); in nfp_nfd3_rx()
1106 r_vec->hw_tls_rx++; in nfp_nfd3_rx()
1107 u64_stats_update_end(&r_vec->rx_sync); in nfp_nfd3_rx()
1112 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, NULL, skb); in nfp_nfd3_rx()
1118 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, NULL, skb); in nfp_nfd3_rx()
1127 napi_gro_receive(&rx_ring->r_vec->napi, skb); in nfp_nfd3_rx()
1157 struct nfp_net_r_vector *r_vec = in nfp_nfd3_poll() local
1161 if (r_vec->tx_ring) in nfp_nfd3_poll()
1162 nfp_nfd3_tx_complete(r_vec->tx_ring, budget); in nfp_nfd3_poll()
1163 if (r_vec->rx_ring) in nfp_nfd3_poll()
1164 pkts_polled = nfp_nfd3_rx(r_vec->rx_ring, budget); in nfp_nfd3_poll()
1168 nfp_net_irq_unmask(r_vec->nfp_net, r_vec->irq_entry); in nfp_nfd3_poll()
1170 if (r_vec->nfp_net->rx_coalesce_adapt_on && r_vec->rx_ring) { in nfp_nfd3_poll()
1176 start = u64_stats_fetch_begin(&r_vec->rx_sync); in nfp_nfd3_poll()
1177 pkts = r_vec->rx_pkts; in nfp_nfd3_poll()
1178 bytes = r_vec->rx_bytes; in nfp_nfd3_poll()
1179 } while (u64_stats_fetch_retry(&r_vec->rx_sync, start)); in nfp_nfd3_poll()
1181 dim_update_sample(r_vec->event_ctr, pkts, bytes, &dim_sample); in nfp_nfd3_poll()
1182 net_dim(&r_vec->rx_dim, dim_sample); in nfp_nfd3_poll()
1185 if (r_vec->nfp_net->tx_coalesce_adapt_on && r_vec->tx_ring) { in nfp_nfd3_poll()
1191 start = u64_stats_fetch_begin(&r_vec->tx_sync); in nfp_nfd3_poll()
1192 pkts = r_vec->tx_pkts; in nfp_nfd3_poll()
1193 bytes = r_vec->tx_bytes; in nfp_nfd3_poll()
1194 } while (u64_stats_fetch_retry(&r_vec->tx_sync, start)); in nfp_nfd3_poll()
1196 dim_update_sample(r_vec->event_ctr, pkts, bytes, &dim_sample); in nfp_nfd3_poll()
1197 net_dim(&r_vec->tx_dim, dim_sample); in nfp_nfd3_poll()
1207 nfp_nfd3_ctrl_tx_one(struct nfp_net *nn, struct nfp_net_r_vector *r_vec, in nfp_nfd3_ctrl_tx_one() argument
1218 dp = &r_vec->nfp_net->dp; in nfp_nfd3_ctrl_tx_one()
1219 tx_ring = r_vec->tx_ring; in nfp_nfd3_ctrl_tx_one()
1227 u64_stats_update_begin(&r_vec->tx_sync); in nfp_nfd3_ctrl_tx_one()
1228 r_vec->tx_busy++; in nfp_nfd3_ctrl_tx_one()
1229 u64_stats_update_end(&r_vec->tx_sync); in nfp_nfd3_ctrl_tx_one()
1231 __skb_queue_tail(&r_vec->queue, skb); in nfp_nfd3_ctrl_tx_one()
1233 __skb_queue_head(&r_vec->queue, skb); in nfp_nfd3_ctrl_tx_one()
1283 u64_stats_update_begin(&r_vec->tx_sync); in nfp_nfd3_ctrl_tx_one()
1284 r_vec->tx_errors++; in nfp_nfd3_ctrl_tx_one()
1285 u64_stats_update_end(&r_vec->tx_sync); in nfp_nfd3_ctrl_tx_one()
1290 static void __nfp_ctrl_tx_queued(struct nfp_net_r_vector *r_vec) in __nfp_ctrl_tx_queued() argument
1294 while ((skb = __skb_dequeue(&r_vec->queue))) in __nfp_ctrl_tx_queued()
1295 if (nfp_nfd3_ctrl_tx_one(r_vec->nfp_net, r_vec, skb, true)) in __nfp_ctrl_tx_queued()
1319 struct nfp_net_r_vector *r_vec, struct nfp_net_rx_ring *rx_ring) in nfp_ctrl_rx_one() argument
1355 u64_stats_update_begin(&r_vec->rx_sync); in nfp_ctrl_rx_one()
1356 r_vec->rx_pkts++; in nfp_ctrl_rx_one()
1357 r_vec->rx_bytes += pkt_len; in nfp_ctrl_rx_one()
1358 u64_stats_update_end(&r_vec->rx_sync); in nfp_ctrl_rx_one()
1365 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL); in nfp_ctrl_rx_one()
1371 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL); in nfp_ctrl_rx_one()
1376 nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, skb); in nfp_ctrl_rx_one()
1392 static bool nfp_ctrl_rx(struct nfp_net_r_vector *r_vec) in nfp_ctrl_rx() argument
1394 struct nfp_net_rx_ring *rx_ring = r_vec->rx_ring; in nfp_ctrl_rx()
1395 struct nfp_net *nn = r_vec->nfp_net; in nfp_ctrl_rx()
1399 while (nfp_ctrl_rx_one(nn, dp, r_vec, rx_ring) && budget--) in nfp_ctrl_rx()
1407 struct nfp_net_r_vector *r_vec = from_tasklet(r_vec, t, tasklet); in nfp_nfd3_ctrl_poll() local
1409 spin_lock(&r_vec->lock); in nfp_nfd3_ctrl_poll()
1410 nfp_nfd3_tx_complete(r_vec->tx_ring, 0); in nfp_nfd3_ctrl_poll()
1411 __nfp_ctrl_tx_queued(r_vec); in nfp_nfd3_ctrl_poll()
1412 spin_unlock(&r_vec->lock); in nfp_nfd3_ctrl_poll()
1414 if (nfp_ctrl_rx(r_vec)) { in nfp_nfd3_ctrl_poll()
1415 nfp_net_irq_unmask(r_vec->nfp_net, r_vec->irq_entry); in nfp_nfd3_ctrl_poll()
1417 tasklet_schedule(&r_vec->tasklet); in nfp_nfd3_ctrl_poll()
1418 nn_dp_warn(&r_vec->nfp_net->dp, in nfp_nfd3_ctrl_poll()