Re: [dpdk-dev] [PATCH v12 1/6] ethdev: add Tx preparation

2016-12-02 Thread Olivier Matz
Hi Konstantin, On Fri, 2 Dec 2016 01:06:30 +, "Ananyev, Konstantin" wrote: > > > > 2016-11-23 18:36, Tomasz Kulasek: > > > +/** > > > + * Process a burst of output packets on a transmit queue of an > > > Ethernet device. > > > + * > > > + * The

[dpdk-dev] [PATCH] scripts: fix checkpatch from standard input

2016-11-28 Thread Olivier Matz
in that case - with bash, it displays an error: "continue: only meaningful in a `for', `while', or `until' loop" - with bash --posix, the 'continue' is ignored... In my case, checkpatches.sh was displaying "0/1 valid" although there was no error. This patch solves the issue, thanks. Acked-by: Olivier Matz

[dpdk-dev] [PATCH v2] mempool: remove a redundant word "for" in comment

2016-11-28 Thread Olivier Matz
Hi Wei, On Mon, 28 Nov 2016 09:42:12 +0100 Olivier Matz wrote: > Hi Wenzhuo, First, sorry for the mistake in your name my previous mail. Please find below some other comments about the patch (on the form). > On Sun, 27 Nov 2016 10:43:47 +0800 > Wei Zhao wrote: > > &

[dpdk-dev] [PATCH v2] mempool: remove a redundant word "for" in comment

2016-11-28 Thread Olivier Matz
ice in line 359 and 360.One of them is > redundant, so delete it. > > Fixes: 449c49b93a6b (" mempool: support handler operations") > Signed-off-by: zhao wei > Acked-by: John McNamara Acked-by: Olivier Matz

[dpdk-dev] [PATCH v2] ethdev: check number of queues less than RTE_ETHDEV_QUEUE_STAT_CNTRS

2016-11-24 Thread Olivier Matz
e to fill those arrays up. > This patch fixes the problem using MIN between the reported number of > queues and RTE_ETHDEV_QUEUE_STAT_CNTRS. > > Signed-off-by: Alejandro Lucero > Reviewed-by: Olivier Matz As a next step, I'm wondering if it would be possible to remove this limitatio

[dpdk-dev] [RFC 2/9] ethdev: move queue id check in generic layer

2016-11-24 Thread Olivier Matz
Hi Ferruh, On Thu, 2016-11-24 at 10:59 +, Ferruh Yigit wrote: > On 11/24/2016 9:54 AM, Olivier Matz wrote: > > The check of queue_id is done in all drivers implementing > > rte_eth_rx_queue_count(). Factorize this check in the generic > > function. > > > > N

[dpdk-dev] [RFC 1/9] ethdev: clarify api comments of rx queue count

2016-11-24 Thread Olivier Matz
On Thu, 2016-11-24 at 10:52 +, Ferruh Yigit wrote: > On 11/24/2016 9:54 AM, Olivier Matz wrote: > > The API comments are not consistent between each other. > > > > The function rte_eth_rx_queue_count() returns the number of used > > descriptors on a receive queue.

[dpdk-dev] [RFC 9/9] net/e1000: add handler for tx queue descriptor count

2016-11-24 Thread Olivier Matz
Like for TX, use a binary search algorithm to get the number of used Tx descriptors. PR=52423 Signed-off-by: Olivier Matz Acked-by: Ivan Boule --- drivers/net/e1000/e1000_ethdev.h | 5 +++- drivers/net/e1000/em_ethdev.c| 1 + drivers/net/e1000/em_rxtx.c | 51

[dpdk-dev] [RFC 8/9] net/e1000: optimize rx queue descriptor count

2016-11-24 Thread Olivier Matz
Use a binary search algorithm to find the first empty DD bit. The ring-empty and ring-full cases are managed separately as they are more likely to happen. PR=52423 Signed-off-by: Olivier Matz Acked-by: Ivan Boule --- drivers/net/e1000/em_rxtx.c | 55

[dpdk-dev] [RFC 7/9] net/igb: add handler for tx queue descriptor count

2016-11-24 Thread Olivier Matz
Like for TX, use a binary search algorithm to get the number of used Tx descriptors. PR=52423 Signed-off-by: Olivier Matz Acked-by: Ivan Boule --- drivers/net/e1000/e1000_ethdev.h | 5 +++- drivers/net/e1000/igb_ethdev.c | 1 + drivers/net/e1000/igb_rxtx.c | 51

[dpdk-dev] [RFC 6/9] net/igb: optimize rx queue descriptor count

2016-11-24 Thread Olivier Matz
Use a binary search algorithm to find the first empty DD bit. The ring-empty and ring-full cases are managed separately as they are more likely to happen. PR=52423 Signed-off-by: Olivier Matz Acked-by: Ivan Boule --- drivers/net/e1000/igb_rxtx.c | 55

[dpdk-dev] [RFC 5/9] net/ixgbe: add handler for Tx queue descriptor count

2016-11-24 Thread Olivier Matz
Like for TX, use a binary search algorithm to get the number of used Tx descriptors. PR=52423 Signed-off-by: Olivier Matz Acked-by: Ivan Boule --- drivers/net/ixgbe/ixgbe_ethdev.c | 1 + drivers/net/ixgbe/ixgbe_ethdev.h | 4 ++- drivers/net/ixgbe/ixgbe_rxtx.c | 57

[dpdk-dev] [RFC 4/9] net/ixgbe: optimize Rx queue descriptor count

2016-11-24 Thread Olivier Matz
Use a binary search algorithm to find the first empty DD bit. The ring-empty and ring-full cases are managed separately as they are more likely to happen. PR=52423 Signed-off-by: Olivier Matz Acked-by: Ivan Boule --- drivers/net/ixgbe/ixgbe_rxtx.c | 63

[dpdk-dev] [RFC 3/9] ethdev: add handler for Tx queue descriptor count

2016-11-24 Thread Olivier Matz
, or drop the packets with the lowest priority. PR=52423 Signed-off-by: Olivier Matz Acked-by: Ivan Boule --- lib/librte_ether/rte_ethdev.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 9551cfd

[dpdk-dev] [RFC 2/9] ethdev: move queue id check in generic layer

2016-11-24 Thread Olivier Matz
before the port valid and queue valid test. PR=52423 Signed-off-by: Olivier Matz Acked-by: Ivan Boule --- drivers/net/e1000/em_rxtx.c| 5 - drivers/net/e1000/igb_rxtx.c | 5 - drivers/net/i40e/i40e_rxtx.c | 5 - drivers/net/ixgbe/ixgbe_rxtx.c | 5 - drivers/net/nfp/nfp_net.c

[dpdk-dev] [RFC 1/9] ethdev: clarify api comments of rx queue count

2016-11-24 Thread Olivier Matz
The API comments are not consistent between each other. The function rte_eth_rx_queue_count() returns the number of used descriptors on a receive queue. PR=52423 Signed-off-by: Olivier Matz Acked-by: Ivan Boule --- lib/librte_ether/rte_ethdev.h | 11 +++ 1 file changed, 7 insertions

[dpdk-dev] [RFC 0/9] get Rx and Tx used descriptors

2016-11-24 Thread Olivier Matz
me buffers will be freed. The new implementation does a binary search (checking for DD) between next_dd and tail. Olivier Matz (9): ethdev: clarify api comments of rx queue count ethdev: move queue id check in generic layer ethdev: add handler for Tx queue descriptor count net/ixgbe: opt

[dpdk-dev] [PATCH 5/5] net/virtio: fix Tso when mbuf is shared

2016-11-24 Thread Olivier Matz
Signed-off-by: Olivier Matz --- drivers/net/virtio/virtio_rxtx.c | 119 +++ drivers/net/virtio/virtqueue.h | 2 + 2 files changed, 85 insertions(+), 36 deletions(-) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 22d97a

[dpdk-dev] [PATCH 4/5] mbuf: new helper to copy data from a mbuf

2016-11-24 Thread Olivier Matz
Signed-off-by: Olivier Matz --- app/test/test_mbuf.c | 7 +++ lib/librte_mbuf/rte_mbuf.h | 32 +++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 5f1bc5d..73fd7df 100644 --- a/app/test

[dpdk-dev] [PATCH 3/5] mbuf: new helper to write data in a mbuf chain

2016-11-24 Thread Olivier Matz
Introduce a new helper to write data in a chain of mbufs, spreading it in the segments. Signed-off-by: Olivier Matz --- app/test/test_mbuf.c | 21 +++ lib/librte_mbuf/rte_mbuf.c | 44 +++ lib/librte_mbuf/rte_mbuf.h | 50

[dpdk-dev] [PATCH 2/5] mbuf: new helper to check if a mbuf is shared

2016-11-24 Thread Olivier Matz
Introduce 2 new helpers rte_pktmbuf_seg_is_shared() and rte_pktmbuf_data_is_shared() to check if the packet data inside a mbuf is shared (and shall not be modified). To avoid a "discards const qualifier" error, add a const to the argument of rte_mbuf_from_indirect(). Signed-off-by: Ol

[dpdk-dev] [PATCH 1/5] mbuf: remove const attribute in mbuf read function

2016-11-24 Thread Olivier Matz
. Signed-off-by: Olivier Matz --- lib/librte_mbuf/rte_mbuf.c | 2 +- lib/librte_mbuf/rte_mbuf.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 63f43c8..b31958e 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib

[dpdk-dev] [PATCH 0/5] virtio/mbuf: fix virtio tso with shared mbufs

2016-11-24 Thread Olivier Matz
buffer */ - if (unlikely(rte_pktmbuf_data_is_shared(m, 0, hdrlen))) { + if (unlikely(1 || rte_pktmbuf_data_is_shared(m, 0, hdrlen))) { shared = 1; /* network headers are too big, there's nothing we can do */ Olivier Matz (5): mbuf: remove const attribute in mbuf read funct

[dpdk-dev] [PATCH v2] log: do not drop debug logs at compile time

2016-11-23 Thread Olivier Matz
have special compile-time options to enable more debug log. Maintainers may consider to remove/reduce them. Signed-off-by: Olivier Matz --- v1 -> v2: - fix test in RTE_LOG_DP() as pointed-out by David config/common_base | 1 + doc/guides/faq/faq.rst |

[dpdk-dev] [PATCH 0/2] l2fwd/l3fwd: rework long options parsing

2016-11-22 Thread Olivier Matz
Hi, On 11/22/2016 02:52 PM, Olivier Matz wrote: > These 2 patches were part of this RFC, which will not be integrated: > http://dpdk.org/ml/archives/dev/2016-September/046974.html > > It does not bring any functional change, it just reworks the way long > options are parsed in

[dpdk-dev] [PATCH 1/2] l3fwd: rework long options parsing

2016-11-22 Thread Olivier Matz
Avoid the use of several strncpy() since getopt is able to map a long option with an id, which can be matched in the same switch/case than short options. Signed-off-by: Olivier Matz --- examples/l3fwd/main.c | 169 ++ 1 file changed, 87 insertions

[dpdk-dev] [PATCH 0/2] l2fwd/l3fwd: rework long options parsing

2016-11-22 Thread Olivier Matz
of a new long option in the future. I send them in case maintainers think it is better this way, but I have no real need. Olivier Matz (2): l3fwd: rework long options parsing l2fwd: rework long options parsing examples/l2fwd/main.c | 30 +++-- examples/l3fwd/main.c | 169

[dpdk-dev] [PATCH v2] drivers: advertise kmod dependencies in pmdinfo

2016-11-22 Thread Olivier Matz
Hi Adrien, On 11/22/2016 11:27 AM, Adrien Mazarguil wrote: > Hi Olivier, > > Neither mlx4 nor mlx5 depend on igb/uio/vfio modules, please see below. > > On Tue, Nov 22, 2016 at 10:50:57AM +0100, Olivier Matz wrote: >> Add a new macro RTE_PMD_REGISTER_KMOD_DEP()

[dpdk-dev] [PATCH] mempool: fix Api documentation

2016-11-22 Thread Olivier Matz
A previous commit changed the local_cache table into a pointer, reducing the size of the rte_mempool structure. Fix the API comment of rte_mempool_create() related to this modification. Fixes: 213af31e0960 ("mempool: reduce structure size if no cache needed") Signed-off-by: Ol

[dpdk-dev] [PATCH v2] drivers: advertise kmod dependencies in pmdinfo

2016-11-22 Thread Olivier Matz
Add a new macro RTE_PMD_REGISTER_KMOD_DEP() that allows a driver to declare the list of kernel modules required to run properly. Today, most PCI drivers require uio/vfio. Signed-off-by: Olivier Matz Acked-by: Fiona Trahe --- v1 ->

[dpdk-dev] [PATCH v3 2/2] mempool: pktmbuf pool default fallback for mempool ops error

2016-11-22 Thread Olivier Matz
Hi Hemant, Back on this topic, please see some comments below. On 11/07/2016 01:30 PM, Hemant Agrawal wrote: > Hi Olivier, > >> -Original Message----- >> From: Olivier Matz [mailto:olivier.matz at 6wind.com] >> Sent: Friday, October 14, 2016 5:41 PM >>

[dpdk-dev] Adding API to force freeing consumed buffers in TX ring

2016-11-21 Thread Olivier Matz
Hi, On 11/21/2016 03:33 PM, Wiles, Keith wrote: > >> On Nov 21, 2016, at 4:48 AM, Damjan Marion (damarion) > cisco.com> wrote: >> >> >> Hi, >> >> Currently in VPP we do memcpy of whole packet when we need to do >> replication as we cannot know if specific buffer is transmitted >> from tx ring

[dpdk-dev] [PATCH] lib/librte_mempool: a redundant word in comment

2016-11-18 Thread Olivier Matz
Hi Wei, 2lOn 11/15/2016 07:54 AM, Zhao1, Wei wrote: > Hi, john > >> -Original Message- >> From: Mcnamara, John >> Sent: Monday, November 14, 2016 6:30 PM >> To: Zhao1, Wei ; dev at dpdk.org >> Cc: olivier.matz at 6wind.com; Zhao1, Wei >> Subject: RE: [dpdk-dev] [PATCH]

[dpdk-dev] [PATCH] lib/librte_mempool: a redundant of socket_id assignment

2016-11-18 Thread Olivier Matz
f-by: zhao wei > > Titles should generally start with a verb to indicate what is being done. > Something like: > > lib/librte_mempool: remove redundant socket_id assignment > > Apart from that. > > Acked-by: John McNamara I would even say: mempool: remove redundant socket_id assignment Acked-by: Olivier Matz

[dpdk-dev] [PATCH v2] mempool: Free memzone if mempool populate phys fails

2016-11-11 Thread Olivier Matz
if (ret < 0) > + if (ret < 0) { > + rte_memzone_free(mz); > goto fail; > + } > } > > return mp->size; > Acked-by: Olivier Matz Thanks Olivier

[dpdk-dev] disable hugepages

2016-11-10 Thread Olivier Matz
On 11/10/2016 02:10 PM, Wiles, Keith wrote: > >> On Nov 10, 2016, at 6:32 AM, Keren Hochman >> wrote: >> >> I tried using the following dpdk options: >> --no-huge --vdev eth_pcap0 ,rx_pcap=/t1,tx_pcap=/t2 >> *It's worked but the number of elements is limited, although the machine >> has

[dpdk-dev] [PATCH] doc: postpone ABI changes for mbuf

2016-11-09 Thread Olivier Matz
Mbuf modifications are not ready for 16.11, postpone them to 17.02. Signed-off-by: Olivier Matz --- doc/guides/rel_notes/deprecation.rst | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index

[dpdk-dev] disable hugepages

2016-11-09 Thread Olivier Matz
Hi Keren, On 11/09/2016 03:40 PM, Keren Hochman wrote: > On Wed, Nov 9, 2016 at 3:40 PM, Christian Ehrhardt < > christian.ehrhardt at canonical.com> wrote: > >> >> On Wed, Nov 9, 2016 at 1:55 PM, Keren Hochman < >> keren.hochman at lightcyber.com> wrote: >> >>> how can I create mempool without

[dpdk-dev] [PATCH] app/test: fix crash of lpm test

2016-11-09 Thread Olivier Matz
The test recently added accesses to lpm->tbl8[ip >> 8] with is much larger than the size of the table, causing a crash of the test application. Fix this typo by replacing tbl8 by tbl24. Fixes: 231fa88ed522 ("app/test: verify LPM tbl8 recycle") Signed-off-by: Olivier Matz --

[dpdk-dev] [PATCH v3 02/12] net/virtio: setup and start cq in configure callback

2016-11-08 Thread Olivier Matz
Hi Lei, On 11/02/2016 02:38 AM, Yao, Lei A wrote: > Hi, Olivier > > During the validation work with v16.11-rc2, I find that this patch will cause > VM crash if enable virtio bonding in VM. Could you have a check at your side? > The following is steps at my side. Thanks a lot > > 1. bind PF

[dpdk-dev] [PATCH v2 1/1] mempool: Add sanity check when secondary link in less mempools than primary

2016-11-08 Thread Olivier Matz
Hello Jean, On 10/28/2016 08:37 PM, Jean Tourrilhes wrote: > If the mempool ops the caller wants to use is not registered, the > library will segfault in an obscure way when trying to use that > mempool. It's better to catch it early and warn the user. > > If the primary and secondary process

[dpdk-dev] [PATCH v2] net/virtio: cache Rx/Tx offload ability check

2016-11-08 Thread Olivier Matz
cal datapath. > > Cc: Olivier Matz > Signed-off-by: Yuanhan Liu > --- > v2: - rebase on top of the bug fix patches > - define rx/tx_offload as uint8_t instead of int > > drivers/net/virtio/virtio_ethdev.c | 19 +++ > drivers/net/virtio/virtio

[dpdk-dev] [PATCH v11 1/6] ethdev: add Tx preparation

2016-10-27 Thread Olivier Matz
On 10/26/2016 02:56 PM, Tomasz Kulasek wrote: > Added API for `rte_eth_tx_prep` > > [...] > > Signed-off-by: Tomasz Kulasek Acked-by: Olivier Matz

[dpdk-dev] [PATCH v2] mempool: fix search of maximum contiguous pages

2016-10-25 Thread Olivier Matz
s in a list") Signed-off-by: Wei Dai Signed-off-by: Olivier Matz --- lib/librte_mempool/rte_mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index 71017e1..e94e56f 100644 --- a/lib/librte_mempool/rte

[dpdk-dev] [PATCH] mempool: fix search of maximum contiguous pages

2016-10-25 Thread Olivier Matz
Hi Thomas, On 10/25/2016 04:37 PM, Thomas Monjalon wrote: > 2016-10-13 17:05, Olivier MATZ: >> Hi Wei, >> >> On 10/13/2016 02:31 PM, Ananyev, Konstantin wrote: >>> >>>> >>>>>>> diff --git a/lib/librte_mempool/rte_mempool.c >>&g

[dpdk-dev] mbuf changes

2016-10-25 Thread Olivier Matz
On 10/25/2016 04:25 PM, Morten Br?rup wrote: > It might also make sense documenting the mbuf fields in more detail > somewhere. E.g. the need for nb_segs in the NIC's TX handler. Good point, I'll do it at the same time than the first rework proposition.

[dpdk-dev] [PATCH v10 1/6] ethdev: add Tx preparation

2016-10-25 Thread Olivier Matz
Hi Tomasz, On 10/24/2016 06:51 PM, Tomasz Kulasek wrote: > Added API for `rte_eth_tx_prep` > > [...] > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -182,6 +182,7 @@ extern "C" { > #include > #include > #include > +#include > #include "rte_ether.h" >

[dpdk-dev] mbuf changes

2016-10-25 Thread Olivier Matz
ce Richardson [mailto:bruce.richardson at intel.com] >>> Sent: Tuesday, October 25, 2016 2:20 PM >>> To: Morten Br?rup >>> Cc: Adrien Mazarguil; Wiles, Keith; dev at dpdk.org; Olivier Matz; Oleg >>> Kuporosov >>> Subject: Re: [dpdk-dev] mbuf cha

[dpdk-dev] [PATCH 1/3] mbuf: embedding timestamp into the packet

2016-10-18 Thread Olivier Matz
On 10/13/2016 04:35 PM, Oleg Kuporosov wrote: > The hard requirement of financial services industry is accurate > timestamping aligned with the packet itself. This patch is to satisfy > this requirement: > > - include uint64_t timestamp field into rte_mbuf with minimal impact to >

[dpdk-dev] [PATCH v6 1/6] ethdev: add Tx preparation

2016-10-18 Thread Olivier Matz
Hi Tomasz, I think the principle of tx_prep() is good, it may for instance help to remove the function virtio_tso_fix_cksum() from the virtio, and maybe even change the mbuf TSO/cksum API. I have some questions/comments below, I'm sorry it comes very late. On 10/14/2016 05:05 PM, Tomasz Kulasek

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-18 Thread Olivier Matz
Hi Stephen, On 10/14/2016 01:33 AM, Stephen Hemminger wrote: > On Thu, 13 Oct 2016 16:18:39 +0800 > Yuanhan Liu wrote: > >> On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrote: >>> +/* When doing TSO, the IP length is not included in the pseudo header >&g

[dpdk-dev] [PATCH v3 2/2] mempool: pktmbuf pool default fallback for mempool ops error

2016-10-14 Thread Olivier Matz
Hi Hemant, Sorry for the late answer. Please see some comments inline. On 10/13/2016 03:15 PM, Hemant Agrawal wrote: > Hi Olivier, > Any updates w.r.t this patch set? > > Regards > Hemant > On 9/22/2016 6:42 PM, Hemant Agrawal wrote: >> Hi Olivier >> >>

[dpdk-dev] [PATCH] mempool: Add sanity check when secondary link in less mempools than primary

2016-10-14 Thread Olivier Matz
Hi Jean, On 10/12/2016 10:04 PM, Jean Tourrilhes wrote: > mempool: Add sanity check when secondary link in less mempools than primary > > If the primary and secondary process were build using different build > systems, the list of constructors included by the linker in each > binary might be

[dpdk-dev] [PATCH v3 12/12] net/virtio: add Tso support

2016-10-13 Thread Olivier Matz
On 10/13/2016 08:50 PM, Thomas Monjalon wrote: > 2016-10-14 00:05, Yuanhan Liu: >> On Thu, Oct 13, 2016 at 04:16:11PM +0200, Olivier Matz wrote: >>> +/* When doing TSO, the IP length is not included in the pseudo header >>> + * checksum of the packet given

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Olivier Matz
Le 13 octobre 2016 17:29:35 CEST, Yuanhan Liu a ?crit : >On Thu, Oct 13, 2016 at 05:15:24PM +0200, Olivier MATZ wrote: >> >> >> On 10/13/2016 05:01 PM, Yuanhan Liu wrote: >> >On Thu, Oct 13, 2016 at 04:52:25PM +0200, Olivier MATZ wrote: >> >> >

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Olivier MATZ
On 10/13/2016 05:01 PM, Yuanhan Liu wrote: > On Thu, Oct 13, 2016 at 04:52:25PM +0200, Olivier MATZ wrote: >> >> >> On 10/13/2016 04:16 PM, Yuanhan Liu wrote: >>> On Thu, Oct 13, 2016 at 04:02:49PM +0200, Olivier MATZ wrote: >>>> >>>> >&g

[dpdk-dev] [PATCH] mempool: fix search of maximum contiguous pages

2016-10-13 Thread Olivier MATZ
Hi Wei, On 10/13/2016 02:31 PM, Ananyev, Konstantin wrote: > >> > diff --git a/lib/librte_mempool/rte_mempool.c > b/lib/librte_mempool/rte_mempool.c > index 71017e1..e3e254a 100644 > --- a/lib/librte_mempool/rte_mempool.c > +++ b/lib/librte_mempool/rte_mempool.c > @@

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Olivier MATZ
On 10/13/2016 04:16 PM, Yuanhan Liu wrote: > On Thu, Oct 13, 2016 at 04:02:49PM +0200, Olivier MATZ wrote: >> >> >> On 10/13/2016 10:18 AM, Yuanhan Liu wrote: >>> On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrote: >>>> +/* When doing TSO, t

[dpdk-dev] [PATCH v3 12/12] net/virtio: add Tso support

2016-10-13 Thread Olivier Matz
Signed-off-by: Olivier Matz --- drivers/net/virtio/virtio_ethdev.c | 6 ++ drivers/net/virtio/virtio_ethdev.h | 2 + drivers/net/virtio/virtio_rxtx.c | 133 +++-- 3 files changed, 136 insertions(+), 5 deletions(-) diff --git a/drivers/net/virtio

[dpdk-dev] [PATCH v3 11/12] net/virtio: add Lro support

2016-10-13 Thread Olivier Matz
Signed-off-by: Olivier Matz Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 15 ++- drivers/net/virtio/virtio_ethdev.h | 9 - drivers/net/virtio/virtio_rxtx.c | 25 - 3 files changed, 38 insertions(+), 11 deletions(-) diff

[dpdk-dev] [PATCH v3 10/12] net/virtio: add Tx checksum offload support

2016-10-13 Thread Olivier Matz
Signed-off-by: Olivier Matz --- drivers/net/virtio/virtio_ethdev.c | 7 drivers/net/virtio/virtio_ethdev.h | 1 + drivers/net/virtio/virtio_rxtx.c | 73 +++--- 3 files changed, 61 insertions(+), 20 deletions(-) diff --git a/drivers/net/virtio

[dpdk-dev] [PATCH v3 09/12] net/virtio: add Rx checksum offload support

2016-10-13 Thread Olivier Matz
Signed-off-by: Olivier Matz --- drivers/net/virtio/virtio_ethdev.c | 21 ++ drivers/net/virtio/virtio_ethdev.h | 2 +- drivers/net/virtio/virtio_rxtx.c | 79 ++ drivers/net/virtio/virtqueue.h | 1 + 4 files changed, 95 insertions(+), 8

[dpdk-dev] [PATCH v3 08/12] app/testpmd: display lro segment size

2016-10-13 Thread Olivier Matz
In csumonly engine, display the value of LRO segment if the LRO flag is set. Signed-off-by: Olivier Matz Reviewed-by: Maxime Coquelin --- app/test-pmd/csumonly.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index da15185..57e6ae2

[dpdk-dev] [PATCH v3 07/12] mbuf: new flag for LRO

2016-10-13 Thread Olivier Matz
gsz field is valid and is set to the segment size of original packets. This flag is used in next commits in the virtio pmd. Signed-off-by: Olivier Matz Reviewed-by: Maxime Coquelin --- doc/guides/rel_notes/release_16_11.rst | 5 + lib/librte_mbuf/rte_mbuf.c | 2 ++ lib/librte_m

[dpdk-dev] [PATCH v3 06/12] app/testpmd: adapt checksum stats in csum engine

2016-10-13 Thread Olivier Matz
Reviewed-by: Maxime Coquelin --- app/test-pmd/csumonly.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 27d0f08..da15185 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -697,8 +697,10 @@

[dpdk-dev] [PATCH v3 05/12] mbuf: add new Rx checksum mbuf flags

2016-10-13 Thread Olivier Matz
with existing applications that only check the existing flag (CKSUM_BAD). [1] http://dpdk.org/ml/archives/dev/2016-May/039920.html [2] http://dpdk.org/ml/archives/dev/2016-June/040007.html Signed-off-by: Olivier Matz Reviewed-by: Maxime Coquelin --- doc/guides/rel_notes/release_16_11.rst | 6 l

[dpdk-dev] [PATCH v3 04/12] net: add function to calculate a checksum in a mbuf

2016-10-13 Thread Olivier Matz
This function can be used to calculate the checksum of data embedded in mbuf, that can be composed of several segments. This function will be used by the virtio pmd in next commits to calculate the checksum in software in case the protocol is not recognized. Signed-off-by: Olivier Matz --- doc

[dpdk-dev] [PATCH v3 03/12] net/virtio: reinitialize the device in configure callback

2016-10-13 Thread Olivier Matz
Add the ability to reset the virtio device in the configure callback if the features flag changed since previous reset. This will be possible with the introduction of offload support in next commits. Signed-off-by: Olivier Matz Reviewed-by: Maxime Coquelin --- drivers/net/virtio

[dpdk-dev] [PATCH v3 02/12] net/virtio: setup and start cq in configure callback

2016-10-13 Thread Olivier Matz
fig->max_virtqueue_pairs is already displayed above. Signed-off-by: Olivier Matz Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 43 +++--- drivers/net/virtio/virtio_ethdev.h | 4 ++-- drivers/net/virtio/virtio_pci.h| 3 +-- 3 files c

[dpdk-dev] [PATCH v3 01/12] net/virtio: move device initialization in a function

2016-10-13 Thread Olivier Matz
ion. Signed-off-by: Olivier Matz Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 99 ++ 1 file changed, 58 insertions(+), 41 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index b4df

[dpdk-dev] [PATCH v3 00/12] net/virtio: add offload support

2016-10-13 Thread Olivier Matz
e mbuf checksum calculation in librte_net - use RTE_MIN() to set max rx/tx queue - rebase on top of head Olivier Matz (12): virtio: move device initialization in a function virtio: setup and start cq in configure callback virtio: reinitialize the device in configure callback net: add fu

[dpdk-dev] [PATCH v2 12/12] virtio: add Tso support

2016-10-13 Thread Olivier MATZ
On 10/13/2016 10:18 AM, Yuanhan Liu wrote: > On Mon, Oct 03, 2016 at 11:00:23AM +0200, Olivier Matz wrote: >> +/* When doing TSO, the IP length is not included in the pseudo header >> + * checksum of the packet given to the PMD, but for virtio it is >> + * expected. &g

[dpdk-dev] [PATCH v2 10/12] virtio: add Tx checksum offload support

2016-10-13 Thread Olivier MATZ
On 10/13/2016 10:38 AM, Yuanhan Liu wrote: > On Mon, Oct 03, 2016 at 11:00:21AM +0200, Olivier Matz wrote: >> +/* Checksum Offload */ >> +switch (cookie->ol_flags & PKT_TX_L4_MASK) { >> +case PKT_TX_UDP_CKSUM: >> +hdr->csum_st

[dpdk-dev] [PATCH v2 03/12] virtio: reinitialize the device in configure callback

2016-10-13 Thread Olivier MATZ
On 10/13/2016 09:54 AM, Yuanhan Liu wrote: > On Wed, Oct 12, 2016 at 06:01:25PM +0200, Olivier MATZ wrote: >> Hello Yuanhan, >> >> On 10/12/2016 04:41 PM, Yuanhan Liu wrote: >>> On Mon, Oct 03, 2016 at 11:00:14AM +0200, Olivier Matz wrote: >>>> @@ -134

[dpdk-dev] [PATCH] testpmd: fix tso with csum engine

2016-10-13 Thread Olivier Matz
. Fixes: 97c21329d42b ("app/testpmd: do not use TSO for small packets") Signed-off-by: Olivier Matz --- app/test-pmd/csumonly.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index f9e65b6..27d0f08 100644 --- a/ap

[dpdk-dev] [PATCH v2 03/12] virtio: reinitialize the device in configure callback

2016-10-12 Thread Olivier MATZ
Hello Yuanhan, On 10/12/2016 04:41 PM, Yuanhan Liu wrote: > On Mon, Oct 03, 2016 at 11:00:14AM +0200, Olivier Matz wrote: >> @@ -1344,6 +1347,7 @@ virtio_dev_configure(struct rte_eth_dev *dev) >> { >> const struct rte_eth_rxmode *rxmode = >data->dev_conf.rxmod

[dpdk-dev] [PATCH v2 09/12] virtio: add Rx checksum offload support

2016-10-12 Thread Olivier MATZ
On 10/12/2016 03:02 PM, Yuanhan Liu wrote: > On Wed, Oct 05, 2016 at 03:27:47PM +0200, Maxime Coquelin wrote: >>> /* Update offload features */ >>> - if (virtio_rx_offload(rxm, hdr) < 0) { >>> + if ((features & VIRTIO_NET_F_GUEST_CSUM) && >>

[dpdk-dev] [PATCH v6 8/8] app/testpmd: hide segsize when unrelevant in csum engine

2016-10-12 Thread Olivier Matz
When TSO is not asked, hide the segment size. Signed-off-by: Olivier Matz Acked-by: Pablo de Lara --- app/test-pmd/csumonly.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index d51d85a..f9e65b6 100644 --- a/app/test

[dpdk-dev] [PATCH v6 7/8] app/testpmd: don't use tso if packet is too small

2016-10-12 Thread Olivier Matz
Asking for TSO (TCP Segmentation Offload) on packets that are already smaller than (headers + MSS) does not work, for instance on ixgbe. Fix the csumonly engine to only set the TSO flag when a segmentation offload is really required, i.e. when packet is large enough. Signed-off-by: Olivier Matz

[dpdk-dev] [PATCH v6 6/8] app/testpmd: display Rx port in csum engine

2016-10-12 Thread Olivier Matz
This information is useful when debugging, especially with bidirectional traffic. Signed-off-by: Olivier Matz Acked-by: Pablo de Lara --- app/test-pmd/csumonly.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index

[dpdk-dev] [PATCH v6 5/8] app/testpmd: do not change ip addrs in csum engine

2016-10-12 Thread Olivier Matz
ner_cksums() and process_outer_cksums() already reset the checksum field to 0, so this is not necessary. Moreover, this makes the engine more complex than needed, and prevents to easily use it to forward traffic (like iperf) as it modifies the packets. This patch drops this behavior. Signed-off-b

[dpdk-dev] [PATCH v6 4/8] app/testpmd: add option to enable lro

2016-10-12 Thread Olivier Matz
Introduce a new argument '--enable-lro' to ask testpmd to enable the LRO feature on enabled ports, like it's done for '--enable-rx-cksum' for instance. Signed-off-by: Olivier Matz Acked-by: Pablo de Lara --- app/test-pmd/parameters.c | 4 doc/guides/testpmd_app_ug/run_app.rst

[dpdk-dev] [PATCH v6 3/8] app/testpmd: dump Rx flags in csum engine

2016-10-12 Thread Olivier Matz
Signed-off-by: Olivier Matz Acked-by: Pablo de Lara --- app/test-pmd/csumonly.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 2ecd6b8..42974d5 100644 --- a/app/test-pmd/csumonly.c

[dpdk-dev] [PATCH v6 2/8] app/testpmd: use new function to dump offload flags

2016-10-12 Thread Olivier Matz
Use the functions introduced in the previous commit to dump the offload flags. Signed-off-by: Olivier Matz Acked-by: Pablo de Lara --- app/test-pmd/csumonly.c | 31 +++ app/test-pmd/rxonly.c | 15 ++- 2 files changed, 5 insertions(+), 41 deletions

[dpdk-dev] [PATCH v6 1/8] mbuf: add function to dump ol flag list

2016-10-12 Thread Olivier Matz
new functions to do that. Similarly to the packet type dump functions, the goal is to factorize the code that could be used in several applications and reduce the risk of desynchronization between the flags and the dump functions. Signed-off-by: Olivier Matz Acked-by: Pablo de Lara --- doc/guides/rel_no

[dpdk-dev] [PATCH v6 0/8] Misc enhancements in testpmd

2016-10-12 Thread Olivier Matz
pe on a separate line in function definitions - add documentation for the new --enable-lro option v1 -> v2: - rebase on top of sw ptype v2 patch Olivier Matz (8): mbuf: add function to dump ol flag list app/testpmd: use new function to dump offload flags app/testpmd: dump Rx flags in csu

[dpdk-dev] [PATCH v2 09/12] virtio: add Rx checksum offload support

2016-10-11 Thread Olivier MATZ
On 10/11/2016 04:36 PM, Maxime Coquelin wrote: > > > On 10/11/2016 04:29 PM, Olivier MATZ wrote: >> >> >> On 10/11/2016 04:04 PM, Maxime Coquelin wrote: >>>> +/* Optionally fill offload information in structure */ >>>> +static int >>>&g

[dpdk-dev] [PATCH v2 09/12] virtio: add Rx checksum offload support

2016-10-11 Thread Olivier MATZ
On 10/11/2016 04:04 PM, Maxime Coquelin wrote: >> +/* Optionally fill offload information in structure */ >> +static int >> +virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr) >> +{ >> +struct rte_net_hdr_lens hdr_lens; >> +uint32_t hdrlen, ptype; >> +int l4_supported

[dpdk-dev] [PATCH v2 04/12] net: add function to calculate a checksum in a mbuf

2016-10-11 Thread Olivier MATZ
Hi Maxime, On 10/11/2016 03:25 PM, Maxime Coquelin wrote: >> /** >> + * Compute the raw (non complemented) checksum of a packet. >> + * >> + * @param m >> + * The pointer to the mbuf. >> + * @param off >> + * The offset in bytes to start the checksum. >> + * @param len >> + * The length in

[dpdk-dev] [PATCH v2 00/12] net/virtio: add offload support

2016-10-11 Thread Olivier MATZ
tcp/ip stack. It uses testpmd, which is able to bridge packets and ask for TCP segmentation. > On Mon, Oct 03, 2016 at 11:00:11AM +0200, Olivier Matz wrote: >> This patchset, targetted for 16.11, introduces the support of rx and tx >> offload in virtio pmd. To achieve this, some new m

[dpdk-dev] [PATCH v3 03/16] mbuf: move packet type definitions in a new file

2016-10-11 Thread Olivier MATZ
Hi Thomas, On 10/10/2016 04:52 PM, Thomas Monjalon wrote: > 2016-10-03 10:38, Olivier Matz: >> The file rte_mbuf.h starts to be quite big, and next commits >> will introduce more functions related to packet types. Let's >> move them in a new file. >> >

[dpdk-dev] [PATCH v5 8/8] app/testpmd: hide segsize when unrelevant in csum engine

2016-10-07 Thread Olivier Matz
When TSO is not asked, hide the segment size. Signed-off-by: Olivier Matz --- app/test-pmd/csumonly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 2057633..d5eb260 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test

[dpdk-dev] [PATCH v5 7/8] app/testpmd: don't use tso if packet is too small

2016-10-07 Thread Olivier Matz
Asking for TSO (TCP Segmentation Offload) on packets that are already smaller than (headers + MSS) does not work, for instance on ixgbe. Fix the csumonly engine to only set the TSO flag when a segmentation offload is really required, i.e. when packet is large enough. Signed-off-by: Olivier Matz

[dpdk-dev] [PATCH v5 6/8] app/testpmd: display Rx port in csum engine

2016-10-07 Thread Olivier Matz
This information is useful when debugging, especially with bidirectional traffic. Signed-off-by: Olivier Matz --- app/test-pmd/csumonly.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index eeb67db..19c8099 100644

[dpdk-dev] [PATCH v5 5/8] app/testpmd: do not change ip addrs in csum engine

2016-10-07 Thread Olivier Matz
ner_cksums() and process_outer_cksums() already reset the checksum field to 0, so this is not necessary. Moreover, this makes the engine more complex than needed, and prevents to easily use it to forward traffic (like iperf) as it modifies the packets. This patch drops this behavior. Signed-off-b

[dpdk-dev] [PATCH v5 4/8] app/testpmd: add option to enable lro

2016-10-07 Thread Olivier Matz
Introduce a new argument '--enable-lro' to ask testpmd to enable the LRO feature on enabled ports, like it's done for '--enable-rx-cksum' for instance. Signed-off-by: Olivier Matz --- app/test-pmd/parameters.c | 4 doc/guides/testpmd_app_ug/run_app.rst | 4 2 files changed

[dpdk-dev] [PATCH v5 3/8] app/testpmd: dump Rx flags in csum engine

2016-10-07 Thread Olivier Matz
Signed-off-by: Olivier Matz --- app/test-pmd/csumonly.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 5ca5702..e7ee0b3 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c

[dpdk-dev] [PATCH v5 2/8] app/testpmd: use new function to dump offload flags

2016-10-07 Thread Olivier Matz
Use the functions introduced in the previous commit to dump the offload flags. Signed-off-by: Olivier Matz --- app/test-pmd/csumonly.c | 27 +++ app/test-pmd/rxonly.c | 15 ++- 2 files changed, 5 insertions(+), 37 deletions(-) diff --git a/app/test-pmd

[dpdk-dev] [PATCH v5 1/8] mbuf: add function to dump ol flag list

2016-10-07 Thread Olivier Matz
new functions to do that. Similarly to the packet type dump functions, the goal is to factorize the code that could be used in several applications and reduce the risk of desynchronization between the flags and the dump functions. Signed-off-by: Olivier Matz --- doc/guides/rel_notes/release_16_11.rst |

[dpdk-dev] [PATCH v5 0/8] Misc enhancements in testpmd

2016-10-07 Thread Olivier Matz
efinitions - add documentation for the new --enable-lro option v1 -> v2: - rebase on top of sw ptype v2 patch Olivier Matz (8): mbuf: add function to dump ol flag list app/testpmd: use new function to dump offload flags app/testpmd: dump Rx flags in csum engine app/testpmd: add option

  1   2   3   4   5   6   7   8   9   10   >