Re: [dpdk-dev] [PATCH v2] vhost: fix mbuf alloc failure

2020-05-05 Thread Tummala, Sivaprasad
Hi Maxime, Thanks for your comments. SNIPPED if (allocerr_warned) { > >     VHOST_LOG_DATA(ERR, > >     "Failed to allocate memory for mbuf. Packet dropped!\n"); > >     allocerr_warned = true; > > } > >   > > This is good idea, but having a static variable makes it file scope > making

Re: [dpdk-dev] [PATCH v2] vhost: fix mbuf alloc failure

2020-05-05 Thread Maxime Coquelin
(Please try to avoid HTML for the replies, it makes it hard to follow) See my replies below: On 5/5/20 7:48 AM, Tummala, Sivaprasad wrote: > Hi Flavio, > >   > > Thanks for your comments. > >   > > SNIPPED > >   > >>      pkts[i] = virtio_dev_pktmbuf_alloc(dev, > mbuf_pool,

Re: [dpdk-dev] [PATCH v2] vhost: fix mbuf alloc failure

2020-05-04 Thread Tummala, Sivaprasad
Hi Flavio, Thanks for your comments. SNIPPED > pkts[i] = virtio_dev_pktmbuf_alloc(dev, mbuf_pool, > buf_len); > - if (unlikely(pkts[i] == NULL)) > + if (unlikely(pkts[i] == NULL)) { > + /* > +

Re: [dpdk-dev] [PATCH v2] vhost: fix mbuf alloc failure

2020-05-04 Thread Flavio Leitner
On Mon, May 04, 2020 at 10:41:17PM +0530, Sivaprasad Tummala wrote: > vhost buffer allocation is successful for packets that fit > into a linear buffer. If it fails, vhost library is expected > to drop the current packet and skip to the next. > > The patch fixes the error scenario by skipping to n