Re: [PATCH] vhost: optimize mbuf allocation in virtio Tx packed path

2024-06-12 Thread Maxime Coquelin
On 3/29/24 00:33, Andrey Ignatov wrote: Currently virtio_dev_tx_packed() always allocates requested @count of packets, no matter how many packets are really available on the virtio Tx ring. Later it has to free all packets it didn't use and if, for example, there were zero available packets on

Re: [PATCH] vhost: optimize mbuf allocation in virtio Tx packed path

2024-04-03 Thread Maxime Coquelin
On 3/29/24 00:33, Andrey Ignatov wrote: Currently virtio_dev_tx_packed() always allocates requested @count of packets, no matter how many packets are really available on the virtio Tx ring. Later it has to free all packets it didn't use and if, for example, there were zero available packets on

Re: [PATCH] vhost: optimize mbuf allocation in virtio Tx packed path

2024-03-29 Thread Maxime Coquelin
Hi Stephen, On 3/29/24 03:53, Stephen Hemminger wrote: On Thu, 28 Mar 2024 17:10:42 -0700 Andrey Ignatov wrote: You don't need always inline, the compiler will do it anyway. I can remove it in v2, but it's not completely obvious to me how is it decided when to specify it explicitly and whe

Re: [PATCH] vhost: optimize mbuf allocation in virtio Tx packed path

2024-03-28 Thread Andrey Ignatov
On Thu, Mar 28, 2024 at 04:44:26PM -0700, Stephen Hemminger wrote: > On Thu, 28 Mar 2024 16:33:38 -0700 > Andrey Ignatov wrote: > > > > > +static __rte_always_inline uint16_t > > +get_nb_avail_entries_packed(const struct vhost_virtqueue *__rte_restrict > > vq, > > + uint1

[PATCH] vhost: optimize mbuf allocation in virtio Tx packed path

2024-03-28 Thread Andrey Ignatov
Currently virtio_dev_tx_packed() always allocates requested @count of packets, no matter how many packets are really available on the virtio Tx ring. Later it has to free all packets it didn't use and if, for example, there were zero available packets on the ring, then all @count mbufs would be all