[RFC v3] add support for async vhost packed ring dequeue
Maxime Coquelin
maxime.coquelin at redhat.com
Thu Jun 9 15:03:36 CEST 2022
Hi Cheng,
On 5/30/22 06:56, Cheng Jiang wrote:
> This RFC patch implements packed ring dequeue data path for asynchronous
> vhost.
Please remove RFC in the next revision.
> Signed-off-by: Cheng Jiang <cheng1.jiang at intel.com>
> ---
> lib/vhost/virtio_net.c | 217 ++++++++++++++++++++++++++++++++++++-----
> 1 file changed, 191 insertions(+), 26 deletions(-)
>
> diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
...
> +
> +static __rte_always_inline int
> +virtio_dev_tx_async_single_packed(struct virtio_net *dev,
> + struct vhost_virtqueue *vq,
> + struct rte_mempool *mbuf_pool,
> + struct rte_mbuf *pkts,
> + uint16_t slot_idx,
> + bool legacy_ol_flags)
> +{
> + int err;
> + uint16_t buf_id, desc_count = 0;
> + uint16_t nr_vec = 0;
> + uint32_t buf_len;
> + struct buf_vector buf_vec[BUF_VECTOR_MAX];
> + static bool allocerr_warned;
> +
> + if (unlikely(fill_vec_buf_packed(dev, vq, vq->last_avail_idx, &desc_count,
> + buf_vec, &nr_vec, &buf_id, &buf_len,
> + VHOST_ACCESS_RO) < 0))
> + return -1;
> +
> + if (unlikely(virtio_dev_pktmbuf_prep(dev, pkts, buf_len))) {
> + if (!allocerr_warned) {
> + VHOST_LOG_DATA(ERR, "Failed mbuf alloc of size %d from %s on %s.\n",
> + buf_len, mbuf_pool->name, dev->ifname);
We have defined a common format for all Vhost logs to ease logs
filtering:
VHOST_LOG_DATA(ERR, "(%s) Failed mbuf alloc of size %d from %s.\n",
dev->ifname, buf_len, mbuf_pool->name);
Could you please fix it here and everywhere else in the patch?
With above minor comments fixed, feel free to add:
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Thanks,
Maxime
More information about the dev
mailing list