X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Favf%2Fdevice.c;h=f6a00a1d30a6d871888c6e5ad724e1f692890be3;hb=c879c149d66d556b9b8183374c601004cecbf982;hp=cf493dd41b659516804d0a7acdea7f9f7de9cb19;hpb=e430b6ec123dbe117b579d8284d7201da635be8d;p=vpp.git diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c index cf493dd41b6..f6a00a1d30a 100644 --- a/src/plugins/avf/device.c +++ b/src/plugins/avf/device.c @@ -16,6 +16,7 @@ */ #include +#include #include #include #include @@ -289,6 +290,9 @@ avf_txq_init (vlib_main_t * vm, avf_device_t * ad, u16 qid, u16 txq_size) vec_validate_aligned (txq->bufs, txq->size, CLIB_CACHE_LINE_BYTES); txq->qtx_tail = ad->bar0 + AVF_QTX_TAIL (qid); + /* initialize ring of pending RS slots */ + clib_ring_new_aligned (txq->rs_slots, 32, CLIB_CACHE_LINE_BYTES); + ad->n_tx_queues = clib_min (ad->num_queue_pairs, qid + 1); return 0; } @@ -578,7 +582,7 @@ avf_op_config_vsi_queues (vlib_main_t * vm, avf_device_t * ad) rxq->vsi_id = ad->vsi_id; rxq->queue_id = i; - rxq->max_pkt_size = 1518; + rxq->max_pkt_size = ETHERNET_MAX_PACKET_BYTES; if (i < vec_len (ad->rxqs)) { avf_rxq_t *q = vec_elt_at_index (ad->rxqs, i); @@ -1166,6 +1170,7 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad) txq->n_enqueued); } vec_free (txq->bufs); + clib_ring_free (txq->rs_slots); } /* *INDENT-ON* */ vec_free (ad->txqs);