Same idea as commit a287ac28919d ("vhost: allocate and free packets
in bulk in Tx packed"), allocate and free packets in bulk. Also remove
the unused function virtio_dev_pktmbuf_alloc.
Signed-off-by: Balazs Nemeth
Reviewed-by: Maxime Coquelin
---
lib/vhost/virtio_
Same idea as commit a287ac28919d ("vhost: allocate and free packets
in bulk in Tx packed"), allocate and free packets in bulk. Also remove
the unused function virtio_dev_pktmbuf_alloc.
Signed-off-by: Balazs Nemeth
Reviewed-by: Maxime Coquelin
---
lib/vhost/virtio_
Same idea as commit a287ac28919d ("vhost: allocate and free packets
in bulk in Tx packed"), allocate and free packets in bulk. Also remove
the unused function virtio_dev_pktmbuf_alloc.
Signed-off-by: Balazs Nemeth
---
lib/vhost/virtio_net.c | 37 ---
Same idea as commit a287ac28919d ("vhost: allocate and free packets
in bulk in Tx packed"), allocate and free packets in bulk. Also remove
the unused function virtio_dev_pktmbuf_alloc.
Signed-off-by: Balazs Nemeth
---
lib/vhost/virtio_net.c | 37 ---
_packed.
Fixes: d18db8049c7c ("vhost: read last used index once")
Signed-off-by: Balazs Nemeth
---
lib/vhost/virtio_net.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index abfd67d38c..8da8a86a10 100644
--- a/lib/vho
Hi Ling,
I will take a look. Thanks for reporting.
Regards,
Balazs
On Sat, May 8, 2021 at 10:44 AM Ling, WeiX wrote:
> Hi Balazs Nemeth,
>
> Your patch cause a bug about virtio-user can't recieve packets when use
> packed ring and ring size is 255.
>
> Please have a l
Move allocation out further and perform all allocation in bulk. The same
goes for freeing packets. In the process, also introduce
virtio_dev_pktmbuf_prep and make virtio_dev_pktmbuf_alloc use that.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 80
Move allocation out further and perform all allocation in bulk. The same
goes for freeing packets. In the process, also introduce
virtio_dev_pktmbuf_prep and make virtio_dev_pktmbuf_alloc use that.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 80
ubmit other patches for tx split later. Would that work for
now?
Regards,
Balazs
On Fri, Apr 16, 2021 at 11:05 AM David Marchand
wrote:
> On Fri, Apr 16, 2021 at 10:18 AM Balazs Nemeth wrote:
> >
> > Move allocation out further and perform all allocation in bulk. The same
> >
Move allocation out further and perform all allocation in bulk. The same
goes for freeing packets. In the process, also rename
virtio_dev_pktmbuf_alloc to virtio_dev_pktmbuf_prep. This
function now receives an already allocated mbuf pointer.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost
The remained variable stores the same information as the difference
between count and pkt_idx. Remove the remained variable to simplify.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/lib
The remained variable stores the same information as the difference
between count and pkt_idx. Remove the remained variable to simplify.
---
lib/librte_vhost/virtio_net.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_v
The remained variable stores the same information as the difference
between count and pkt_idx. Remove the remained variable to simplify.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/lib
There is no need to pass a pointer to an mbuf pointer.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 2f0c97b91..1d3ad18fe 100644
Now that all allocation and freeing has been moved together, use the
faster bulk versions instead of handling packets one by one.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost
Move allocation out further and perform all allocation in one loop. The
same goes for freeing packets. This is to prepare for use of bulk
versions of these functions.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 18 ++
1 file changed, 6 insertions(+), 12
In preparation for subsequent patches, move mbuf allocation out and
rename virtio_dev_pktmbuf_alloc to virtio_dev_pktmbuf_prep. This
function now receives an already allocated mbuf pointer.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 54
Instead of calculating the address of a packed descriptor based on the
vq->desc_packed and vq->last_used_idx every time, store that base
address in desc_base. On arm, this saves 176 bytes in code size of
function in which vhost_flush_enqueue_batch_packed gets inlined.
Signed-off-by: Balazs
Instead of calculating the address of a packed descriptor based on the
vq->desc_packed and vq->last_used_idx every time, store that base
address in desc_base. On arm, this saves 176 bytes in code size of
function in which vhost_flush_enqueue_batch_packed gets inlined.
Signed-off-by: Balazs
Instead of calculating the address of a packed descriptor based on the
vq->desc_packed and vq->last_used_idx every time, store that base
address in desc_base. On arm, this saves 176 bytes in code size of
function in which vhost_flush_enqueue_batch_packed gets inlined.
---
lib/librte_vhost/virtio_n
There is no need to pass a pointer to an mbuf pointer.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index e1696c0c0..179c57b46 100644
Now that all allocation and freeing has been moved together, use the
faster bulk versions instead of handling packets one by one.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/librte_vhost
Move allocation out further and perform all allocation in one loop. The
same goes for freeing packets. This is to prepare for use of bulk
versions of these functions.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 18 ++
1 file changed, 6 insertions(+), 12
In preparation for subsequent patches, move mbuf allocation out and
rename virtio_dev_pktmbuf_alloc to virtio_dev_pktmbuf_prep. This
function now receives an already allocated mbuf pointer.
Signed-off-by: Balazs Nemeth
---
lib/librte_vhost/virtio_net.c | 54
Use the faster bulk versions of alloc and free in virtio packed path.
Balazs Nemeth (4):
vhost: move allocation of mbuf outside of packet enqueue
vhost: perform all mbuf allocations in one loop
vhost: allocate and free packets in bulk
vhost: remove unnecessary level of indirection
lib
tio/virtqueue.h | 24 ---
> 14 files changed, 87 insertions(+), 75 deletions(-)
>
Tested this in a PVP setup on ARM, giving a slight improvement in
performance. For the series:
Tested-by: Balazs Nemeth
ting to get the numbers as I
> > suspect the cache pressure is higher in this test as
> > in real use-cases.
> >
> > Changes in v4:
> > ==
> > - Fix missing changes to boolean (Chenbo)
> >
>
> For the series,
> Reviewed-by: David Marchand
>
> Merci !
>
>
Tested this in a PVP setup on ARM, giving a slight improvement in
performance. For the series:
Tested-by: Balazs Nemeth
The member page_offset is always zero. Having this in the qede_rx_entry
makes it larger than it needs to be and this has cache performance
implications so remove that field. In addition, since qede_rx_entry only
has an rte_mbuf*, remove the definition of qede_rx_entry.
Signed-off-by: Balazs
While handling the current mbuf, pull the next mbuf into the cache. Note
that the last four mbufs pulled into the cache are not handled, but that
doesn't matter.
Signed-off-by: Balazs Nemeth
Reviewed-by: Igor Russkikh
---
drivers/net/qede/qede_rxtx.c | 6 ++
1 file changed, 6 inser
Ensure that, while ecore_chain_get_cons_idx is running, txq->hw_cons_ptr
is prefetched. This shows a slight performance improvement.
Signed-off-by: Balazs Nemeth
Reviewed-by: Igor Russkikh
---
drivers/net/qede/qede_rxtx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/q
is that on each call, the per-core cache pointer needs to
be read from tls while a single rte_mempool_put_bulk only reads from the
tls once.
Signed-off-by: Balazs Nemeth
Reviewed-by: Igor Russkikh
---
drivers/net/qede/qede_rxtx.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion
The ring txq->sw_tx_ring is managed with txq->sw_tx_cons. As long as
txq->sw_tx_cons is correct, there is no need to check if
txq->sw_tx_ring[idx] is null explicitly.
Signed-off-by: Balazs Nemeth
Reviewed-by: Igor Russkikh
---
drivers/net/qede/qede
Calling ecore_chain_get_cons_idx repeatedly is slower than calling it
once and using the result for the remainder of qede_process_tx_compl.
Signed-off-by: Balazs Nemeth
Reviewed-by: Igor Russkikh
---
drivers/net/qede/qede_rxtx.c | 22 ++
1 file changed, 14 insertions(+), 8
improvement of around 2.55% is observed
due to this patch set.
Changes in v2:
- Fix checkpatches.sh warnings
- Fix check-git-log.sh warnings
- Add Reviewed-by: Igor Russkikh
Balazs Nemeth (7):
net/qede: remove flags from Tx entry
net/qede: get consumer index once
net/qede: assume mbuf
to be copied over.
This patch omits the flags field and replaces the qede_tx_entry entry
by a simple rte_mbuf pointer.
Signed-off-by: Balazs Nemeth
Reviewed-by: Igor Russkikh
---
drivers/net/qede/qede_rxtx.c | 22 --
drivers/net/qede/qede_rxtx.h | 10 +-
2 files
On Wed, 2021-03-24 at 14:48 +0530, Jerin Jacob wrote:
> On Mon, Mar 22, 2021 at 10:38 PM Igor Russkikh
> wrote:
> >
> >
> >
> > On 3/5/2021 2:13 PM, Balazs Nemeth wrote:
> > > External Email
> > >
> > > ---
to be copied over.
This patch omits the flags field and replaces the qede_tx_entry entry
by a simple rte_mbuf pointer.
Signed-off-by: Balazs Nemeth
---
drivers/net/qede/qede_rxtx.c | 20 ++--
drivers/net/qede/qede_rxtx.h | 10 +-
2 files changed, 11 insertions(+), 19
The member page_offset is always zero. Having this in the qede_rx_entry
makes it larger than it needs to be and this has cache performance
implications so remove that field. In addition, since qede_rx_entry only
has an rte_mbuf*, remove the definition of qede_rx_entry.
Signed-off-by: Balazs
While handling the current mbuf, pull the next next mbuf into the cache.
Note that the last four mbufs pulled into the cache are not handled, but
that doesn't matter.
Signed-off-by: Balazs Nemeth
---
drivers/net/qede/qede_rxtx.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/dr
Ensure that, while ecore_chain_get_cons_idx is running, txq->hw_cons_ptr
is prefetched. This shows a slight performance improvement.
Signed-off-by: Balazs Nemeth
---
drivers/net/qede/qede_rxtx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/q
is that on each call, the per-core cache pointer needs to
be read from tls while a single rte_mempool_put_bulk only reads from the
tls once.
Signed-off-by: Balazs Nemeth
---
drivers/net/qede/qede_rxtx.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net
The next patch will introduce the use of rte_pktmbuf_free_bulk.
Signed-off-by: Balazs Nemeth
---
drivers/net/qede/qede_rxtx.c | 51
1 file changed, 23 insertions(+), 28 deletions(-)
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
The ring txq->sw_tx_ring is managed with txq->sw_tx_cons. As long as
txq->sw_tx_cons is correct, there is no need to check if
txq->sw_tx_ring[idx] is null explicitly.
Signed-off-by: Balazs Nemeth
---
drivers/net/qede/qede_rxtx.c | 27 +++
1 file changed, 1
Calling ecore_chain_get_cons_idx repeatedly is slower than calling it
once and using the result for the remainder of qede_process_tx_compl.
Signed-off-by: Balazs Nemeth
---
drivers/net/qede/qede_rxtx.c | 23 +++
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a
improvement of around 2.55% is observed
due to this patch set.
Balazs Nemeth (8):
net/qede: remove flags from qede_tx_entry and simplify to rte_mbuf
net/qede: avoid repeatedly calling ecore_chain_get_cons_idx
net/qede: assume txq->sw_tx_ring[idx] is never null in
qede_free_tx_pkt
net/q
;t have changed that.
> I will prepare a fix patch for this.
>
> On 18/12/2020 2:34 pm, Balazs Nemeth wrote:
> > Hi,
> >
> > introduces a regression on my systems. I have a
> > "QLogic Corp. FastLinQ QL41000 Series 10/25/40/50GbE Controller"
>
When calling rte_eth_promiscuous_enable(port_id) followed by
rte_eth_allmulticast_enable(port_id), the port is not in promisc mode
anymore. This patch ensures that promisc mode takes precedence over
allmulticast mode fixing the regression introduced by b10231aed1ed.
Signed-off-by: Balazs Nemeth
When calling rte_eth_promiscuous_enable(port_id) followed by
rte_eth_allmulticast_enable(port_id), the port is not in promisc mode
anymore. This patch ensures that promisc mode takes precedence over
allmulticast mode fixing the regression introduced by b10231aed1ed.
---
drivers/net/qede/qede_ethde
Hi,
Commit b10231aed1edb9 introduces a regression on my systems. I have a
"QLogic Corp. FastLinQ QL41000 Series 10/25/40/50GbE Controller" which
relies on the qede driver. Calling rte_eth_promiscuous_enable(portid)
followed by rte_eth_allmulticast_enable(port_id) causes no packets to
arrive from m
ierrors.
> Validated with testpmd by sending packets to the interface without
> forwarding enabled - packets should be dropped and the error counters
> incremented.
> v2:
> - specified the commit that this bug fix fixes
Acked-by: Balazs Nemeth
This patch is a workaround for the issue at the level of the ixgbe
driver code. The problem can actually be fixed at the level of DPDK
instead. Furthermore, this patch circumvents the problem by moving the
check that determines if the link status needs to be read (which always
fails because get_li
This patch is actually a workaround to the problem. By setting
get_link_status just before calling ixgbe_check_link defeats the whole
purpose of the variable and results in _always_ getting the link
status. I think that this patch should be superseded by the following
patch:
http://dpdk.org/dev/pa
, link 1 up):
...
Checking link status
..done
Port 0 Link Down
Port 1 Link Up - speed 1 Mbps - full-duplex
...
Signed-off-by: Balazs Nemeth
---
changes v2:
* Include more elaborate explanation of the problem
.
Signed-off-by: Balazs Nemeth
---
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 2 +-
lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c | 14 --
lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 8 +++-
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/lib/librte_pmd_ixgbe/ixgbe
vector PMD or non-vector PMD depends on runtime
configuration. Hence it is possible that a change in configuration
would disable this statistics. To prevent this from happening, the
statistics should be reported by both implementations.
Signed-off-by: Balazs Nemeth
---
lib/librte_pmd_ixgbe
associated to those descriptors are set to point to a
"fake" mbuf.
Signed-off-by: Balazs Nemeth
---
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 19 +++
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
b/lib/librte
rte_table_hash) bytes. As a consequence, memory past the allocated
region can be accessed by the add, delete and lookup operations.
This patch corrects the address calculation by not including the size
of the meta data in the offsets.
Acked-by: Cristian Dumitrescu
Signed-off-by: Balazs Nemeth
---
lib
(as provided to the rte_table_hash_ext_create and
rte_table_hash_lru_create) has to be used instead of the size of the
key.
Acked-by: Cristian Dumitrescu
Signed-off-by: Balazs Nemeth
---
lib/librte_table/rte_table_hash_ext.c | 2 +-
lib/librte_table/rte_table_hash_lru.c | 2 +-
2 files changed
: Balazs Nemeth
---
lib/librte_table/rte_table_hash_key16.c | 4 ++--
lib/librte_table/rte_table_hash_key32.c | 4 ++--
lib/librte_table/rte_table_hash_key8.c | 8
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/librte_table/rte_table_hash_key16.c
b/lib/librte_table
cleared first, the chain is broken
and the information to update the chain is lost.
Acked-by: Cristian Dumitrescu
Signed-off-by: Balazs Nemeth
---
lib/librte_table/rte_table_hash_ext.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_table/rte_table_hash_ext.c
b
This set of patches fixes bugs in the packet framework. Some of the
bugs occur in corner cases (i.e. when a lookup is performed on a few
packets or when buckets are in extended states) while others can cause
memory to be accessed beyond what is reserved during initialization
time.
Balazs Nemeth
rte_table_hash) bytes. As a consequence, memory past the allocated
region can be accessed by the add, delete and lookup operations.
This patch corrects the address calculation by not including the size
of the meta data in the offsets.
Acked-by: Cristian Dumitrescu
Signed-off-by: Balazs Nemeth
---
lib
(as provided to the rte_table_hash_ext_create and
rte_table_hash_lru_create) has to be used instead of the size of the
key.
Acked-by: Cristian Dumitrescu
Signed-off-by: Balazs Nemeth
---
lib/librte_table/rte_table_hash_ext.c | 2 +-
lib/librte_table/rte_table_hash_lru.c | 2 +-
2 files changed
: Balazs Nemeth
---
lib/librte_table/rte_table_hash_key16.c | 4 ++--
lib/librte_table/rte_table_hash_key32.c | 4 ++--
lib/librte_table/rte_table_hash_key8.c | 8
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/librte_table/rte_table_hash_key16.c
b/lib/librte_table
cleared first, the chain is broken
and the information to update the chain is lost.
Acked-by: Cristian Dumitrescu
Signed-off-by: Balazs Nemeth
---
lib/librte_table/rte_table_hash_ext.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_table/rte_table_hash_ext.c
b
This set of patches fixes bugs in the packet framework. Some of the
bugs occur in corner cases (i.e. when a lookup is performed on a few
packets or when buckets are in extended states) while others can cause
memory to be accessed beyond what is reserved during initialization
time.
Balazs Nemeth
associated to those descriptors are set to point to a
"fake" mbuf.
Signed-off-by: Balazs Nemeth
---
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 19 +++
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
b/lib/librte
rte_table_hash) bytes. As a consequence, memory past the allocated
region can be accessed by the add, delete and lookup operations.
This patch corrects the address calculation by not including the size
of the meta data in the offsets.
Signed-off-by: Balazs Nemeth
---
lib/librte_table/rte_table_hash_ext.c
(as provided to the rte_table_hash_ext_create and
rte_table_hash_lru_create) has to be used instead of the size of the
key.
Signed-off-by: Balazs Nemeth
---
lib/librte_table/rte_table_hash_ext.c | 2 +-
lib/librte_table/rte_table_hash_lru.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
d
case the lookup is performed with less than 5 packets, an
unoptimized version is run instead (the optimized version requires at
least 5 packets). The extended buckets should also be checked in this
case instead of simply ignoring the extended buckets.
Signed-off-by: Balazs Nemeth
---
lib
cleared first, the chain is broken
and the information to update the chain is lost.
Signed-off-by: Balazs Nemeth
---
lib/librte_table/rte_table_hash_ext.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_table/rte_table_hash_ext.c
b/lib/librte_table
This set of patches fixes bugs in the packet framework. Some of the
bugs occur in corner cases (i.e. when a lookup is performed on a few
packets or when buckets are in extended states) while others can cause
memory to be accessed beyond what is reserved during initialization
time.
Balazs Nemeth
Letting DPDK deduce de cpus and memchannels is just a move of feautures in
your application. In some cases you might want to limit the number of
cores. It's just simple a way to allow more control when initializing DPDK.
Kind Regards
Balazs Nemeth
Hasselt University, Belgium
2nd Mast
73 matches
Mail list logo