Re: [ovs-dev] [CONNTRACK] Discussions at OvS 2017

2017-11-28 Thread Tiago Lam
> each behavior and see if it makes sense or is necessary on its own technical > merits. If we don’t think it > necessary, overly complex, or we have something better, we can omit that > behavior entirely or do it differently. > > Thanks Darrell > > > > On 11/25/17, 9

Re: [ovs-dev] [CONNTRACK] Discussions at OvS 2017

2017-11-25 Thread Tiago Lam
Hi Aaron (and all), Thank you for your email, I found it to be informative. Would you mind elaborating a bit more on point number 5 below? With regards to SIP (don't know about SCTP), a module [1] seems to already exist for the kernel, integrating with Netfilter / conntrack. So, in terms of

Re: [ovs-dev] [PATCH] coding-style: Explain when to break lines before or after binary operators.

2017-12-01 Thread Tiago Lam
Hi Ben, A small in-line comment, On 11/29/2017 12:37 AM, Ben Pfaff wrote: +if (!isdigit((unsigned char)s[0]) || +!isdigit((unsigned char)s[1]) || +!isdigit((unsigned char)s[2])) { +printf("string %s does not start with 3-digit code\n", s); +} -*idxp =

Re: [ovs-dev] [OVN] "Finish up ARP support" approach

2017-11-08 Thread Tiago Lam
so perhaps this is indeed the best place).) Thanks. [1] https://patchwork.ozlabs.org/patch/834112/ On 10/25/2017 10:34 PM, Tiago Lam wrote: > Hi folks, > > Looking into the OVN project and ways to contribute back. > > I've looked into the `TODO.rst` file under `ovn/` (How up to date

Re: [ovs-dev] [OVN] "Finish up ARP support" approach

2017-11-08 Thread Tiago Lam
so perhaps this is indeed the best place).) Thanks. [1] https://patchwork.ozlabs.org/patch/834112/ On 10/25/2017 10:34 PM, Tiago Lam wrote: > Hi folks, > > Looking into the OVN project and ways to contribute back. > > I've looked into the `TODO.rst` file under `ovn/` (How up to d

Re: [ovs-dev] [OVN] "Finish up ARP support" approach

2017-11-08 Thread Tiago Lam
Hi Numan, Thanks for taking the time and having a look. Replying inline as well. On 11/08/2017 07:00 PM, Numan Siddique wrote: > Hi Tiago, > > Please see few comments inline > > > > On Wed, Nov 8, 2017 at 11:49 PM, Tiago Lam <tiago...@gmail.com > <mai

Re: [ovs-dev] [PATCH v2] coding-style: Explain when to break lines before or after binary operators.

2017-12-01 Thread Tiago Lam
Thanks, Ben! This clarifies things for me. I've also tried to render the file and everything looks fine. Only one small nit below, but it doesn't affect the rendering, thus, for what it's worth: Acked-by: Tiago Lam <tiago...@gmail.com> On 12/01/2017 07:22 PM, Ben Pfaff wrote: +Br

[ovs-dev] [RFC v6 07/11] dp-packet: Handle multi-seg mubfs in shift() func.

2018-05-16 Thread Tiago Lam
, dp_packet_mbuf_shift() and dp_packet_mbuf_write(). These functions are used by dp_packet_shift(), when handling multi-seg mbufs, to shift and write data within a chain of mbufs. Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.

[ovs-dev] [RFC v6 06/11] dp-packet: Handle multi-seg mbufs in put*() funcs.

2018-05-16 Thread Tiago Lam
. Co-authored-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.c | 98 + lib/dp-packet.h | 7 + 2

[ovs-dev] [RFC v6 05/11] dp-packet: Handle multi-seg mbufs in helper funcs.

2018-05-16 Thread Tiago Lam
-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.h | 235 1 file changed, 188 insertions(+), 47 deleti

[ovs-dev] [RFC v6 04/11] dp-packet: Fix data_len handling multi-seg mbufs.

2018-05-16 Thread Tiago Lam
lt;mksi...@gmail.com> Signed-off-by: Yuanhan Liu <y...@fridaylinux.org> Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.h | 50 +++--- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/lib/dp-packet.h b/lib/dp-packet.

[ovs-dev] [RFC v6 00/11] Support multi-segment mbufs

2018-05-16 Thread Tiago Lam
Michael Qiu (1): dp-packet: copy data from multi-seg. DPDK mbuf Tiago Lam (6): dp-packet: Fix allocated size on DPDK init. dp-packet: Fix data_len handling multi-seg mbufs. dp-packet: Handle multi-seg mbufs in helper funcs. dp-packet: Handle multi-seg mbufs in put*() funcs. dp-packet:

[ovs-dev] [RFC v6 11/11] netdev-dpdk: support multi-segment jumbo frames

2018-05-16 Thread Tiago Lam
tl set Open_vSwitch . other_config:dpdk-socket-mem=4096,0 ==> ovs-vsctl set Open_vSwitch . other_config:dpdk-multi-seg-mbufs=true Co-authored-by: Tiago Lam <tiago@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago Lam <tiago@intel.com> ---

[ovs-dev] [RFC v6 03/11] dp-packet: Fix allocated size on DPDK init.

2018-05-16 Thread Tiago Lam
of a mempool, only in dp_packet_init__(), which is still called by OvS when initialising locally created packets. Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.c | 3 +-- lib/dp-packet.h | 2 +- lib/netdev-dpdk.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff

[ovs-dev] [RFC v6 01/11] netdev-dpdk: fix mbuf sizing

2018-05-16 Thread Tiago Lam
From: Mark Kavanagh There are numerous factors that must be considered when calculating the size of an mbuf: - the data portion of the mbuf must be sized in accordance With Rx buffer alignment (typically 1024B). So, for example, in order to successfully receive and

[ovs-dev] [RFC v6 02/11] dp-packet: Init specific mbuf fields.

2018-05-16 Thread Tiago Lam
packet: - ol_flags=0 - nb_segs=1 - tx_offload=0 - packet_type=0 - next=NULL Adapted from an idea by Michael Qiu <qiud...@chinac.com>: https://patchwork.ozlabs.org/patch/777570/ Co-authored-by: Tiago Lam <tiago@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan

[ovs-dev] [RFC v6 10/11] netdev-dpdk: copy large packet to multi-seg. mbufs

2018-05-16 Thread Tiago Lam
From: Mark Kavanagh Currently, packets are only copied to a single segment in the function dpdk_do_tx_copy(). This could be an issue in the case of jumbo frames, particularly when multi-segment mbufs are involved. This patch calculates the number of segments needed by

[ovs-dev] [RFC v6 08/11] dp-packet: Handle multi-seg mbufs in resize__().

2018-05-16 Thread Tiago Lam
be linked together, in the multi-segment mbufs approach. Thus, dp_packet_resize__() has been modified to handle the DPBUF_DPDK case and allocate and link new mbufs together as needed. Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.

[ovs-dev] [RFC v6 09/11] dp-packet: copy data from multi-seg. DPDK mbuf

2018-05-16 Thread Tiago Lam
From: Michael Qiu When doing packet clone, if packet source is from DPDK driver, multi-segment must be considered, and copy the segment's data one by one. Also, lots of DPDK mbuf's info is missed during a copy, like packet type, ol_flags, etc. That information is very

[ovs-dev] [RFC v7 00/13] Support multi-segment mbufs

2018-05-23 Thread Tiago Lam
e patchset - account for 128B ARM cacheline when sizing mbufs Mark Kavanagh (4): netdev-dpdk: fix mbuf sizing dp-packet: Init specific mbuf fields. netdev-dpdk: copy large packet to multi-seg. mbufs netdev-dpdk: support multi-segment jumbo frames Michael Qiu (1): dp-packet: copy data

[ovs-dev] [RFC v7 01/13] netdev-dpdk: fix mbuf sizing

2018-05-23 Thread Tiago Lam
From: Mark Kavanagh There are numerous factors that must be considered when calculating the size of an mbuf: - the data portion of the mbuf must be sized in accordance With Rx buffer alignment (typically 1024B). So, for example, in order to successfully receive and

[ovs-dev] [RFC v7 04/13] dp-packet: Fix data_len handling multi-seg mbufs.

2018-05-23 Thread Tiago Lam
lt;mksi...@gmail.com> Signed-off-by: Yuanhan Liu <y...@fridaylinux.org> Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.h | 58 ++--- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/lib/dp-packet.h b/lib/dp-packet.

[ovs-dev] [RFC v7 08/13] netdev-dpdk: Serialise non-pmds mbufs' alloc/free.

2018-05-23 Thread Tiago Lam
. Signed-off-by: Tiago Lam <tiago@intel.com> --- Note that another version of this mutex was removed in commit 1166b0d82 ("netdev-dpdk: Remove useless nonpmd_mempool_mutex."), since "non-pmd threads access to netdev is already serialized with "non_pmd_mutex" in d

[ovs-dev] [RFC v7 06/13] dp-packet: Handle multi-seg mbufs in put*() funcs.

2018-05-23 Thread Tiago Lam
. Co-authored-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.c | 97 + lib/dp-packet.h | 5 +++ 2

[ovs-dev] [RFC v7 07/13] dp-packet: Handle multi-seg mubfs in shift() func.

2018-05-23 Thread Tiago Lam
, dp_packet_mbuf_shift() and dp_packet_mbuf_write(). These functions are used by dp_packet_shift(), when handling multi-seg mbufs, to shift and write data within a chain of mbufs. Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.c

[ovs-dev] [RFC v7 11/13] netdev-dpdk: copy large packet to multi-seg. mbufs

2018-05-23 Thread Tiago Lam
From: Mark Kavanagh Currently, packets are only copied to a single segment in the function dpdk_do_tx_copy(). This could be an issue in the case of jumbo frames, particularly when multi-segment mbufs are involved. This patch calculates the number of segments needed by

[ovs-dev] [RFC v7 03/13] dp-packet: Fix allocated size on DPDK init.

2018-05-23 Thread Tiago Lam
of a mempool, only in dp_packet_init__(), which is still called by OvS when initialising locally created packets. Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.c | 3 +-- lib/dp-packet.h | 2 +- lib/netdev-dpdk.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff

[ovs-dev] [RFC v7 02/13] dp-packet: Init specific mbuf fields.

2018-05-23 Thread Tiago Lam
packet: - ol_flags=0 - nb_segs=1 - tx_offload=0 - packet_type=0 - next=NULL Adapted from an idea by Michael Qiu <qiud...@chinac.com>: https://patchwork.ozlabs.org/patch/777570/ Co-authored-by: Tiago Lam <tiago@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan

[ovs-dev] [RFC v7 05/13] dp-packet: Handle multi-seg mbufs in helper funcs.

2018-05-23 Thread Tiago Lam
-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.h | 252 +--- 1 file changed, 205 insertions(+), 47 deleti

[ovs-dev] [RFC v7 09/13] dp-packet: Handle multi-seg mbufs in resize__().

2018-05-23 Thread Tiago Lam
be linked together, in the multi-segment mbufs approach. Thus, dp_packet_resize__() has been modified to handle the DPBUF_DPDK case and allocate and link new mbufs together as needed. Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.

[ovs-dev] [RFC v7 10/13] dp-packet: copy data from multi-seg. DPDK mbuf

2018-05-23 Thread Tiago Lam
From: Michael Qiu When doing packet clone, if packet source is from DPDK driver, multi-segment must be considered, and copy the segment's data one by one. Also, lots of DPDK mbuf's info is missed during a copy, like packet type, ol_flags, etc. That information is very

[ovs-dev] [RFC v7 13/13] dpdk-tests: Add test coverage for multi-seg mbufs.

2018-05-23 Thread Tiago Lam
testsuite. Thus, when running `$sudo make check-dpdk` one will also be running these tests. Signed-off-by: Tiago Lam <tiago@intel.com> --- tests/automake.mk | 10 +- tests/dpdk-packet-mbufs.at | 7 + tests/system-dpdk-testsuite.at | 1 + tests/test-dpdk-mbufs.c

[ovs-dev] [RFC v7 12/13] netdev-dpdk: support multi-segment jumbo frames

2018-05-23 Thread Tiago Lam
tl set Open_vSwitch . other_config:dpdk-socket-mem=4096,0 ==> ovs-vsctl set Open_vSwitch . other_config:dpdk-multi-seg-mbufs=true Co-authored-by: Tiago Lam <tiago@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago Lam <tiago@intel.com> ---

[ovs-dev] [PATCH v8 00/13] Support multi-segment mbufs

2018-06-11 Thread Tiago Lam
ccount for 128B ARM cacheline when sizing mbufs Mark Kavanagh (4): netdev-dpdk: fix mbuf sizing dp-packet: Init specific mbuf fields. netdev-dpdk: copy large packet to multi-seg. mbufs netdev-dpdk: support multi-segment jumbo frames Michael Qiu (1): dp-packet: copy data from multi-seg. DPDK

[ovs-dev] [PATCH v8 01/13] netdev-dpdk: fix mbuf sizing

2018-06-11 Thread Tiago Lam
From: Mark Kavanagh There are numerous factors that must be considered when calculating the size of an mbuf: - the data portion of the mbuf must be sized in accordance With Rx buffer alignment (typically 1024B). So, for example, in order to successfully receive and capture a 1500B packet,

[ovs-dev] [PATCH v8 02/13] dp-packet: Init specific mbuf fields.

2018-06-11 Thread Tiago Lam
- nb_segs=1 - tx_offload=0 - packet_type=0 - next=NULL Adapted from an idea by Michael Qiu : https://patchwork.ozlabs.org/patch/777570/ Co-authored-by: Tiago Lam Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam --- lib/dp-packet.h | 8 +--- 1 file changed, 5 insertions(+), 3

[ovs-dev] [PATCH v8 03/13] dp-packet: Fix allocated size on DPDK init.

2018-06-11 Thread Tiago Lam
of a mempool, only in dp_packet_init__(), which is still called by OvS when initialising locally created packets. Signed-off-by: Tiago Lam --- lib/dp-packet.c | 3 +-- lib/dp-packet.h | 2 +- lib/netdev-dpdk.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/dp-packet.c b

[ovs-dev] [PATCH v8 05/13] dp-packet: Fix data_len handling multi-seg mbufs.

2018-06-11 Thread Tiago Lam
-by: Przemyslaw Lal Signed-off-by: Marcin Ksiadz Signed-off-by: Yuanhan Liu Signed-off-by: Tiago Lam --- lib/dp-packet.h | 56 +--- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/lib/dp-packet.h b/lib/dp-packet.h index 4c104b6

[ovs-dev] [PATCH v8 04/13] netdev-dpdk: Serialise non-pmds mbufs' alloc/free.

2018-06-11 Thread Tiago Lam
A new mutex, 'nonpmd_mp_mutex', has been introduced to serialise allocation and free operations by non-pmd threads on a given mempool. free_dpdk_buf() has been modified to make use of the introduced mutex. Signed-off-by: Tiago Lam --- lib/netdev-dpdk.c | 21 - 1 file

[ovs-dev] [PATCH v8 06/13] dp-packet: Handle multi-seg mbufs in helper funcs.

2018-06-11 Thread Tiago Lam
, dp_packet_use__() has also been modified to perform the initialisation of the packet (and setting the source) before continuing to set its size and data length, which now depends on the type of packet. Co-authored-by: Mark Kavanagh Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam --- lib/dp

[ovs-dev] [PATCH v8 07/13] dp-packet: Handle multi-seg mbufs in put*() funcs.

2018-06-11 Thread Tiago Lam
. Co-authored-by: Mark Kavanagh Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam --- lib/dp-packet.c | 34 -- lib/dp-packet.h | 5 + 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/lib/dp-packet.c b/lib/dp-packet.c index 2aaeaae

[ovs-dev] [PATCH v8 07/13] dp-packet: Handle multi-seg mbufs in put_uninit().

2018-06-11 Thread Tiago Lam
length of the last mbuf in the mbuf chain that should be adjusted. This function has thus been modified to support multi-segment mbufs. Co-authored-by: Mark Kavanagh Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam --- lib/dp-packet.c | 12 1 file changed, 12 insertions

[ovs-dev] [PATCH v8 08/13] dp-packet: Handle multi-seg mubfs in shift() func.

2018-06-11 Thread Tiago Lam
, dp_packet_mbuf_shift() and dp_packet_mbuf_write(). These functions are used by dp_packet_shift(), when handling multi-seg mbufs, to shift and write data within a chain of mbufs. Signed-off-by: Tiago Lam --- lib/dp-packet.c | 102 lib/dp

[ovs-dev] [PATCH v8 09/13] dp-packet: Handle multi-seg mbufs in resize__().

2018-06-11 Thread Tiago Lam
, dp_packet_resize__() now tries to use the available room, both the tailroom and the headroom, to make enough space for the new data. Since this happens for packets of source DPBUF_DPDK, the single-segment mbuf case mentioned above is also covered by this new aproach in resize__(). Signed-off-by: Tiago Lam

[ovs-dev] [PATCH v8 10/13] dp-packet: copy data from multi-seg. DPDK mbuf

2018-06-11 Thread Tiago Lam
From: Michael Qiu When doing packet clone, if packet source is from DPDK driver, multi-segment must be considered, and copy the segment's data one by one. Also, lots of DPDK mbuf's info is missed during a copy, like packet type, ol_flags, etc. That information is very important for DPDK to do

[ovs-dev] [PATCH v8 11/13] netdev-dpdk: copy large packet to multi-seg. mbufs

2018-06-11 Thread Tiago Lam
the data to each segment. A new function, dpdk_buf_alloc(), has also been introduced as a wrapper around the nonpmd_mp_mutex to serialise allocations from a non-pmd context. Co-authored-by: Michael Qiu Co-authored-by: Tiago Lam Signed-off-by: Mark Kavanagh Signed-off-by: Michael Qiu Signed-off

[ovs-dev] [PATCH v8 12/13] netdev-dpdk: support multi-segment jumbo frames

2018-06-11 Thread Tiago Lam
-socket-mem=4096,0 ==> ovs-vsctl set Open_vSwitch . other_config:dpdk-multi-seg-mbufs=true Co-authored-by: Tiago Lam Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam --- Documentation/topics/dpdk/jumbo-frames.rst | 41 + NEWS |

[ovs-dev] [RFC v5 0/8] Support multi-segment mbufs

2018-05-01 Thread Tiago Lam
ta from multi-seg. DPDK mbuf Tiago Lam (1): dp-packet: Fix data_len issue with multi-seg mbufs NEWS | 1 + lib/dp-packet.c | 118 lib/dp-packet.h | 189 --- lib/dpdk.c | 7 +

[ovs-dev] [RFC v5 2/8] dp-packet: init specific mbuf fields to 0

2018-05-01 Thread Tiago Lam
_flags - nb_segs - tx_offload - packet_type Adapted from an idea by Michael Qiu <qiud...@chinac.com>: https://patchwork.ozlabs.org/patch/777570/ Co-authored-by: Tiago Lam <tiago@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago

[ovs-dev] [RFC v5 1/8] netdev-dpdk: fix mbuf sizing

2018-05-01 Thread Tiago Lam
tialization") Fixes: 31b88c9 ("netdev-dpdk: round up mbuf_size to cache_line_size") CC: Santosh Shukla <santosh.shu...@caviumnetworks.com> Co-authored-by: Tiago Lam <tiago@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tia

[ovs-dev] [RFC v5 4/8] dp-packet: Fix data_len issue with multi-seg mbufs

2018-05-01 Thread Tiago Lam
lt;mksi...@gmail.com> Signed-off-by: Yuanhan Liu <y...@fridaylinux.org> Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.h | 38 +++--- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/lib/dp-packet.h b/lib/dp-packet.h index d6512cf..93b

[ovs-dev] [RFC v5 3/8] dp-packet: Add support for multi-seg mbufs

2018-05-01 Thread Tiago Lam
Tiago Lam <tiago@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.c | 44 - lib/dp-packet.h | 142 ++ lib/netdev-d

[ovs-dev] [RFC v5 5/8] dp-packet: copy mbuf info for packet copy

2018-05-01 Thread Tiago Lam
mark.b.kavan...@intel.com rebased] Co-authored-by: Tiago Lam <tiago@intel.com> Signed-off-by: Michael Qiu <qiud...@chinac.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago Lam <tiago@intel.com> --- lib/dp-packet.c | 25 +

[ovs-dev] [RFC v5 7/8] netdev-dpdk: copy large packet to multi-seg. mbufs

2018-05-01 Thread Tiago Lam
needed by a packet and copies the data to each segment. Co-authored-by: Michael Qiu <qiud...@chinac.com> Co-authored-by: Tiago Lam <tiago@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Michael Qiu <qiud...@chinac.com> Signed-off-by:

[ovs-dev] [RFC v5 6/8] dp-packet: copy data from multi-seg. DPDK mbuf

2018-05-01 Thread Tiago Lam
From: Michael Qiu <qiud...@chinac.com> When doing packet clone, if packet source is from DPDK driver, multi-segment must be considered, and copy the segment's data one by one. Co-authored-by: Mark Kavanagh <mark.b.kavan...@intel.com> Co-authored-by: Tiago Lam <tiago@intel.c

[ovs-dev] [RFC v5 8/8] netdev-dpdk: support multi-segment jumbo frames

2018-05-01 Thread Tiago Lam
tl set Open_vSwitch . other_config:dpdk-socket-mem=4096,0 ==> ovs-vsctl set Open_vSwitch . other_config:dpdk-multi-seg-mbufs=true Co-authored-by: Tiago Lam <tiago@intel.com> Signed-off-by: Mark Kavanagh <mark.b.kavan...@intel.com> Signed-off-by: Tiago Lam <tiago@intel.com> ---

[ovs-dev] [PATCH v1 2/2] dpdk-testsuite: Filter 1G HugePages WARN log.

2018-05-03 Thread Tiago Lam
. This changes the tests to filter for the following message, meaning it will start being ignored and systems with 2MB HugePages can run the tests successfully: EAL: No free hugepages reported in hugepages-1048576kB Signed-off-by: Tiago Lam <tiago@intel.com> --- tests/system-dpdk.a

[ovs-dev] [PATCH v1 1/2] gitignore: Ignore system-dpdk-testsuite

2018-05-03 Thread Tiago Lam
the above. Signed-off-by: Tiago Lam <tiago@intel.com> --- tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/.gitignore b/tests/.gitignore index 3e2ddf2..d8d1ebb 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -10,6 +10,7 @@ /test-dpdkr /ovs-pki.log /pk

Re: [ovs-dev] [PATCH 0/3] Initial support for new SIP Alg.

2018-01-08 Thread Tiago Lam
etter initially. Good point. Thought of doing it but then missed it when actually sending. Will do in v2, thanks. Darrell On 12/22/17, 11:54 AM, "ovs-dev-boun...@openvswitch.org on behalf of Tiago Lam" <ovs-dev-boun...@openvswitch.org on behalf of tiago...@gmail.com> wr

Re: [ovs-dev] [PATCH 0/3] Initial support for new SIP Alg.

2018-01-10 Thread Tiago Lam
, Tiago Lam wrote: This patch-set is an initial approach at implementing the new SIP Alg, mentioned by Aaron at [1]. I'm mostly interested in getting to know your thoughts of how this is headed. There are a couple of points that are worth bringing up: - As mentioned in patches 1/3 and 2/3

Re: [ovs-dev] [PATCH 0/3] Initial support for new SIP Alg.

2018-01-16 Thread Tiago Lam
Hi Mark, Thanks for the review (and pointers), I very much appreciate it. I've only skimmed through it so far, but I'll take it into account when sending v2. As I mentioned before I want to put some testing in place first and haven't had time to get that into place yet, hopefully this coming

[ovs-dev] [RFC PATCH v2 5/6] Conntrack: Add SIP end-to-end and unit tests.

2018-02-12 Thread Tiago Lam
, then comparing with the expected results. This includes tests for validating the supported TCP framing. Signed-off-by: Tiago Lam <tiago...@gmail.com> --- tests/atlocal.in | 3 + tests/automake.mk | 8 + tests/conntrack-sip.at | 7 + test

[ovs-dev] [RFC PATCH v2 6/6] Conntrack: Add UDP support for SIP.

2018-02-12 Thread Tiago Lam
been added to test-sip.c to validate the correct handling of the UDP framing (if a "Content-Length" header exists then it must be taken into account). Signed-off-by: Tiago Lam <tiago...@gmail.com> --- lib/conntrack-sip.c | 94 +++- lib/conntrack-sip.h

[ovs-dev] [RFC PATCH v2 0/6] Initial support for new SIP Alg.

2018-02-12 Thread Tiago Lam
ols such as SIP. More details in each separate patch. Regards, Tiago Tiago Lam (6): Conntrack: Add new API for future SIP Alg. Conntrack: Support "out-of-band" expectations. Conntrack: Add alg to alg_exp_node struct. Conntrack: Add initial support for new SIP Alg. Conntrack: Add S

[ovs-dev] [RFC PATCH v2 2/6] Conntrack: Support "out-of-band" expectations.

2018-02-12 Thread Tiago Lam
A new function, expectation_create_outband, is introduced to allow more flexibility when creating the expectations (e.g. specify the network protocol for the expectation, or a different destination address from where the initial request came from). Signed-off-by: Tiago Lam <tiago...@gmail.

[ovs-dev] [RFC PATCH v2 4/6] Conntrack: Add initial support for new SIP Alg.

2018-02-12 Thread Tiago Lam
ded, it however will fail to work when a single SIP message might span multiple TCP packets. Signed-off-by: Tiago Lam <tiago...@gmail.com> --- include/openvswitch/ofp-actions.h | 4 + lib/conntrack-private.h | 30 +++ lib/conntrack-sip.c | 518 ++

[ovs-dev] [RFC PATCH v2 1/6] Conntrack: Add new API for future SIP Alg.

2018-02-12 Thread Tiago Lam
-by: Tiago Lam <tiago...@gmail.com> --- lib/automake.mk | 2 + lib/conntrack-sip.c | 477 lib/conntrack-sip.h | 112 3 files changed, 591 insertions(+) create mode 100644 lib/conntrack-sip.c create mode 100644 lib/conntrack

[ovs-dev] [RFC PATCH v2 3/6] Conntrack: Add alg to alg_exp_node struct.

2018-02-12 Thread Tiago Lam
with the comparison with each expectation in the list of expectations. Signed-off-by: Tiago Lam <tiago...@gmail.com> --- lib/conntrack-private.h | 3 ++- lib/conntrack.c | 32 +++- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/lib/conntrack-pri

[ovs-dev] [PATCH 3/3] Conntrack: Support asymmetric RTP port for SIP.

2017-12-22 Thread Tiago Lam
and / or port. This commit adds extra logic, by creating two expectations, one in each direction, to support the "port case", i.e., the RTP packets are sent from a different port than the one the host is listenning on. Signed-off-by: Tiago Lam <tiago...@gmail.com> --- lib/

[ovs-dev] [PATCH 2/3] Conntrack: Add initial support for new SIP Alg.

2017-12-22 Thread Tiago Lam
tion=ct(table=2) - table=1,in_port=0,tcp,ct_state=+trk+est,action=1 - table=1,in_port=0,tcp,ct_state=+trk+rel,action=1 - table=2,in_port=0,udp,ct_state=+rel,action=1 - table=2,in_port=1,udp,ct_state=+rel,action=0 Signed-off-by: Tiago Lam <tiago...@gmail.com> --- include/openvswitch/ofp-a

[ovs-dev] [PATCH 1/3] Conntrack: Add new API for future SIP Alg.

2017-12-22 Thread Tiago Lam
-by: Tiago Lam <tiago...@gmail.com> --- lib/automake.mk | 2 + lib/conntrack-sip.c | 477 lib/conntrack-sip.h | 112 3 files changed, 591 insertions(+) create mode 100644 lib/conntrack-sip.c create mode 100644 lib/conntrack

[ovs-dev] [PATCH 0/3] Initial support for new SIP Alg.

2017-12-22 Thread Tiago Lam
to have a look at how this can be automated and added to tests/system-traffic.at, together with the rest of the already existing tests. [1] [CONNTRACK] Discussions at OvS 2017: https://mail.openvswitch.org/pipermail/ovs-dev/2017-November/341089.html Tiago Lam (3): Conntrack: Add new API

[ovs-dev] [PATCH] bridge: Clean leaking netdevs when route is added.

2018-06-21 Thread Tiago Lam
ch takes care of freeing the instatiated ip_dev structs that refer to a specific netdev. An extra test is also introduced which verifies that the resources used by OvS netdev datapath have been correctly cleaned up between OVS_TRAFFIC_VSWITCHD_STOP and AT_CLEANUP. Signed-off-by: Tiago

[ovs-dev] [RFC 1/2] netdev-dpdk: Consider packets marked for TSO.

2018-08-08 Thread Tiago Lam
with the PKT_TX_TCP_SEG flag, meaning they have been marked for TSO, and when the packet will be traversing the NIC. Co-authored-by: Mark Kavanagh Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam --- lib/dp-packet.c | 5 ++- lib/netdev-dpdk.c | 120

[ovs-dev] [RFC 2/2] netdev-dpdk: Enable TSO when using multi-seg mbufs

2018-08-08 Thread Tiago Lam
Open_vSwitch . other_config:dpdk-multi-seg-mbufs=true Co-authored-by: Mark Kavanagh Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam --- Documentation/topics/dpdk/phy.rst | 64 +++ lib/netdev-dpdk.c | 52 ++- 2 files

[ovs-dev] [RFC 0/2] dpdk: Add support for TSO

2018-08-08 Thread Tiago Lam
will be ajusted to the MTU (such as 9000B). This might lead to a higher waste of memory when appending mbufs to each other as we will be increamenting larger ammounts. - There's some initial documentation on patch 1/2 (which came form [1]), but needs improving. Tiago Lam (2): netdev-dpdk

[ovs-dev] [PATCH v8 09/14] dp-packet: Add support for data "linearization".

2018-08-20 Thread Tiago Lam
e checksum over a dp_packet's data (using the alredy used csum API). Initially, this is just a way to abstract the data's linearization, but in the future this could be optimized to perform the checksum over the multi-segmented packets, without the need to copy. Signed-off-by: Tiago Lam ---

[ovs-dev] [PATCH v8 11/14] netdev-dpdk: support multi-segment jumbo frames

2018-08-20 Thread Tiago Lam
-socket-mem=4096,0 ==> ovs-vsctl set Open_vSwitch . other_config:dpdk-multi-seg-mbufs=true Co-authored-by: Tiago Lam Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- Documentation/topics/dpdk/jumbo-frames.rst | 67 ++ Documentat

[ovs-dev] [PATCH v8 14/14] dpdk-tests: End-to-end tests for multi-seg mbufs.

2018-08-20 Thread Tiago Lam
and check that `ofctl dump-flows` shows the correct amount of packets and bytes sent. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- tests/system-dpdk.at | 65 1 file changed, 65 insertions(+) diff --git a/tests/system-dpdk.at b/tests

[ovs-dev] [PATCH v8 08/14] dp-packet: copy data from multi-seg. DPDK mbuf

2018-08-20 Thread Tiago Lam
packets processing. Co-authored-by: Mark Kavanagh Co-authored-by: Tiago Lam Signed-off-by: Michael Qiu Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- lib/dp-packet.c | 69 ++- lib/dp-packet.h | 3

[ovs-dev] [PATCH v8 05/14] dp-packet: Fix data_len handling multi-seg mbufs.

2018-08-20 Thread Tiago Lam
-by: Przemyslaw Lal Signed-off-by: Marcin Ksiadz Signed-off-by: Yuanhan Liu Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- lib/dp-packet.h | 76 - 1 file changed, 64 insertions(+), 12 deletions(-) diff --git a/lib/dp-packet.h b/lib/dp

[ovs-dev] [PATCH v8 01/14] netdev-dpdk: fix mbuf sizing

2018-08-20 Thread Tiago Lam
From: Mark Kavanagh There are numerous factors that must be considered when calculating the size of an mbuf: - the data portion of the mbuf must be sized in accordance With Rx buffer alignment (typically 1024B). So, for example, in order to successfully receive and capture a 1500B packet,

[ovs-dev] [PATCH v8 02/14] dp-packet: Init specific mbuf fields.

2018-08-20 Thread Tiago Lam
- nb_segs=1 - tx_offload=0 - packet_type=0 - next=NULL Adapted from an idea by Michael Qiu : https://patchwork.ozlabs.org/patch/777570/ Co-authored-by: Tiago Lam Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- lib/dp-packet.h | 9 + 1 file changed

[ovs-dev] [PATCH v8 07/14] dp-packet: Handle multi-seg mubfs in shift() func.

2018-08-20 Thread Tiago Lam
, dp_packet_mbuf_shift() and dp_packet_mbuf_write(). These functions are used by dp_packet_shift(), when handling multi-seg mbufs, to shift and write data within a chain of mbufs. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- lib/dp-packet.c | 100

[ovs-dev] [PATCH v8 13/14] dpdk-tests: Accept other configs in OVS_DPDK_START

2018-08-20 Thread Tiago Lam
er options, OVS_DPDK_START() has been modified to accept extra configs in the form "$config_name=$config_value". It then uses ovs-vsctl to set the configs. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- tests/system-dpdk-macros.at | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[ovs-dev] [PATCH v8 04/14] netdev-dpdk: Serialise non-pmds mbufs' alloc/free.

2018-08-20 Thread Tiago Lam
A new mutex, 'nonpmd_mp_mutex', has been introduced to serialise allocation and free operations by non-pmd threads on a given mempool. free_dpdk_buf() has been modified to make use of the introduced mutex. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- lib/netdev-dpdk.c | 33

[ovs-dev] [PATCH v8 06/14] dp-packet: Handle multi-seg mbufs in helper funcs.

2018-08-20 Thread Tiago Lam
, dp_packet_use__() has also been modified to perform the initialisation of the packet (and setting the source) before continuing to set its size and data length, which now depends on the type of packet. Co-authored-by: Mark Kavanagh Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam Acked-by: Eelco

[ovs-dev] [PATCH v8 10/14] netdev-dpdk: copy large packet to multi-seg. mbufs

2018-08-20 Thread Tiago Lam
the data to each segment. A new function, dpdk_buf_alloc(), has also been introduced as a wrapper around the nonpmd_mp_mutex to serialise allocations from a non-pmd context. Co-authored-by: Michael Qiu Co-authored-by: Tiago Lam Signed-off-by: Mark Kavanagh Signed-off-by: Michael Qiu Signed-off

[ovs-dev] [PATCH v8 03/14] dp-packet: Fix allocated size on DPDK init.

2018-08-20 Thread Tiago Lam
of a mempool, only in dp_packet_init__(), which is still called by OvS when initialising locally created packets. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- lib/dp-packet.c | 3 +-- lib/dp-packet.h | 2 +- lib/netdev-dpdk.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff

[ovs-dev] [PATCH v8 00/14] Support multi-segment mbufs

2018-08-20 Thread Tiago Lam
some minor inconsistencies. Note that some of the changes in v5 have been contributed by Mark Kavanagh as well. v4: - restructure patchset - account for 128B ARM cacheline when sizing mbufs Mark Kavanagh (4): netdev-dpdk: fix mbuf sizing dp-packet: Init specific mbuf fields.

[ovs-dev] [PATCH v8 12/14] dpdk-tests: Add unit-tests for multi-seg mbufs.

2018-08-20 Thread Tiago Lam
, this has also been integrated with the new DPDK testsuite. Thus, when running `$sudo make check-dpdk` one will also be running these tests. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- tests/automake.mk | 10 +- tests/dpdk-packet-mbufs.at | 7 + tests/system-dpdk

[ovs-dev] [PATCH v9 09/14] dp-packet: Add support for data "linearization".

2018-08-24 Thread Tiago Lam
o traverse the entire's packet data. Per the example above, when the packet's data needs to be write() to the tap's file descriptor, or when the conntrack module needs to verify a packet's checksum, the data is now linearized. Signed-off-by: Tiago Lam --- lib/bfd.c | 3 +- lib/c

[ovs-dev] [PATCH v9 10/14] netdev-dpdk: copy large packet to multi-seg. mbufs

2018-08-24 Thread Tiago Lam
the data to each segment. A new function, dpdk_buf_alloc(), has also been introduced as a wrapper around the nonpmd_mp_mutex to serialise allocations from a non-pmd context. Co-authored-by: Michael Qiu Co-authored-by: Tiago Lam Signed-off-by: Mark Kavanagh Signed-off-by: Michael Qiu Signed-off

[ovs-dev] [PATCH v9 08/14] dp-packet: copy data from multi-seg. DPDK mbuf

2018-08-24 Thread Tiago Lam
packets processing. Co-authored-by: Mark Kavanagh Co-authored-by: Tiago Lam Signed-off-by: Michael Qiu Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- lib/dp-packet.c | 69 ++- lib/dp-packet.h | 3

[ovs-dev] [PATCH v9 12/14] dpdk-tests: Add unit-tests for multi-seg mbufs.

2018-08-24 Thread Tiago Lam
, this has also been integrated with the new DPDK testsuite. Thus, when running `$sudo make check-dpdk` one will also be running these tests. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- tests/automake.mk | 10 +- tests/dpdk-packet-mbufs.at | 7 + tests/system-dpdk

[ovs-dev] [PATCH v9 11/14] netdev-dpdk: support multi-segment jumbo frames

2018-08-24 Thread Tiago Lam
-socket-mem=4096,0 ==> ovs-vsctl set Open_vSwitch . other_config:dpdk-multi-seg-mbufs=true Co-authored-by: Tiago Lam Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- Documentation/topics/dpdk/jumbo-frames.rst | 67 ++ Documentat

[ovs-dev] [PATCH v9 13/14] dpdk-tests: Accept other configs in OVS_DPDK_START

2018-08-24 Thread Tiago Lam
er options, OVS_DPDK_START() has been modified to accept extra configs in the form "$config_name=$config_value". It then uses ovs-vsctl to set the configs. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- tests/system-dpdk-macros.at | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[ovs-dev] [PATCH v9 00/14] Support multi-segment mbufs

2018-08-24 Thread Tiago Lam
ng packet data in multi-seg mbufs, using dp_packet_shift(); - Fixed some minor inconsistencies. Note that some of the changes in v5 have been contributed by Mark Kavanagh as well. v4: - restructure patchset - account for 128B ARM cacheline when sizing mbufs Mark Kavanagh (4):

[ovs-dev] [PATCH v9 01/14] netdev-dpdk: fix mbuf sizing

2018-08-24 Thread Tiago Lam
From: Mark Kavanagh There are numerous factors that must be considered when calculating the size of an mbuf: - the data portion of the mbuf must be sized in accordance With Rx buffer alignment (typically 1024B). So, for example, in order to successfully receive and capture a 1500B packet,

[ovs-dev] [PATCH v9 14/14] dpdk-tests: End-to-end tests for multi-seg mbufs.

2018-08-24 Thread Tiago Lam
and check that `ofctl dump-flows` shows the correct amount of packets and bytes sent. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- tests/system-dpdk.at | 65 1 file changed, 65 insertions(+) diff --git a/tests/system-dpdk.at b/tests

  1   2   3   >