Re: [ovs-dev] [PATCH v16 00/14] Support multi-segment mbufs

2019-09-27 Thread Obrembski, MichalX
/fleitner/dpdk/commit/a034eda95497fcd21d9321cdd3259183d3afd00e#diff-15c7e05c889b2a7513f72da68b277986R1521 I am a little bit curious, why such a decision? It's impossible to do that in OvS? Regards, Michal Obrembski -Original Message- From: Flavio Leitner [mailto:f...@sysclose.org] Sent

[ovs-dev] [PATCH v16 08/14] netdev-dpdk: support multi-segment jumbo frames.

2019-09-12 Thread Michal Obrembski
From: Mark Kavanagh Currently, jumbo frame support for OvS-DPDK is implemented by increasing the size of mbufs within a mempool, such that each mbuf within the pool is large enough to contain an entire jumbo frame of a user-defined size. Typically, for each user-defined MTU, 'requested_mtu', a

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

2019-09-12 Thread Michal Obrembski
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 a packet and copies the

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

2019-09-12 Thread Michal Obrembski
From: Tiago Lam Previous commits have added support to the dp_packet API to handle multi-segmented packets, where data is not stored contiguously in memory. However, in some cases, it is inevitable and data must be provided contiguously. Examples of such cases are when performing csums over the

[ovs-dev] [PATCH v5 7/7] Too long line split into two

2019-09-11 Thread Michal Obrembski
From: Artur Twardowski Signed-off-by: Artur Twardowski --- lib/netdev-native-tnl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c index d0ea3d5..f542858 100644 --- a/lib/netdev-native-tnl.c +++ b/lib/netdev-native-tnl.c

[ovs-dev] [PATCH v5 6/7] Give the variables more meaningful names

2019-09-11 Thread Michal Obrembski
From: Artur Twardowski Replaced variable names "hlen", "ulen", "gnh" with longer ones to make the code analysis easier. Additionally, UDP header len is no longer accumulated into GENEVE header length, additions are used in the places where the sum of both headers is used. Signed-off-by: Artur

[ovs-dev] [PATCH v5 5/7] Fix OVN failing tests.

2019-09-11 Thread Michal Obrembski
An unnecessary offset has been added while introducing dp_packet_may_pull in netdev-native-tnl.c Signed-off-by: Michal Obrembski --- lib/netdev-native-tnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c index 145ae46

[ovs-dev] [PATCH v5 4/7] Performance improvements and native tnl fixes.

2019-09-11 Thread Michal Obrembski
ases to check if the tunneling headers (VXLAN, GRE, ...) fit on the first mbuf. Otherwise return an error. Signed-off-by: Tiago Lam Signed-off-by: Michal Obrembski --- lib/dp-packet.h | 18 +-- lib/flow.c | 81 - lib/

[ovs-dev] [PATCH v5 3/7] netdev-dpdk: Enable TSO when using multi-seg mbufs

2019-09-11 Thread Michal Obrembski
-vsctl set Open_vSwitch . other_config:dpdk-multi-seg-mbufs=true Co-authored-by: Mark Kavanagh Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam Signed-off-by: Michal Obrembski --- Documentation/automake.mk | 1 + Documentation/topics/dpdk/index.rst | 1 + Documentation/topics

[ovs-dev] [PATCH v4 1/7] netdev-dpdk: Validate packets burst before Tx.

2019-09-11 Thread Michal Obrembski
From: Tiago Lam Given that multi-segment mbufs might be sent between interfaces that support different capabilities, and may even support different layouts of mbufs, outgoing packets should be validated before sent on the egress interface. Thus, netdev_dpdk_eth_tx_burst() now calls DPDK's

[ovs-dev] [PATCH v5 0/7] dpdk: Add support for TSO

2019-09-11 Thread Michal Obrembski
). Artur Twardowski (2): Give the variables more meaningful names Too long line split into two Michal Obrembski (1): Fix OVN failing tests. Tiago Lam (4): netdev-dpdk: Validate packets burst before Tx. netdev-dpdk: Consider packets marked for TSO. netdev-dpdk: Enable TSO when using multi

[ovs-dev] [PATCH v16 14/14] Fix DPDK MBUF tests compilation on some compilers

2019-09-11 Thread Michal Obrembski
Signed-off-by: Michal Obrembski --- tests/test-dpdk-mbufs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test-dpdk-mbufs.c b/tests/test-dpdk-mbufs.c index 0c152bf..c8dd155 100644 --- a/tests/test-dpdk-mbufs.c +++ b/tests/test-dpdk-mbufs.c @@ -601,9

[ovs-dev] [PATCH v16 13/14] dp-packet: Fix invalid size of ICMPv6 header

2019-09-11 Thread Michal Obrembski
From: Artur Twardowski Signed-off-by: Artur Twardowski Signed-off-by: Michal Obrembski --- lib/flow.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index 94cfd62..e6019bf 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1105,8 +1105,7

[ovs-dev] [PATCH v16 12/14] dpdk-tests: Fix Multi-segment DPDK Unittests

2019-09-11 Thread Michal Obrembski
Signed-off-by: Michal Obrembski --- tests/system-dpdk.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index ca66135..abfe6e6 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -42,6 +42,7 @@ OVS_VSWITCHD_STOP

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

2019-09-11 Thread Michal Obrembski
a random packet out and check that `ofctl dump-flows` shows the correct amount of packets and bytes sent. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron Signed-off-by: Michal Obrembski --- tests/system-dpdk.at | 65 1 file changed, 65

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

2019-09-11 Thread Michal Obrembski
From: Tiago Lam In order to create a minimal environment that allows the tests to get mbufs from an existing mempool, the following approach is taken: - EAL is initialised (by using the main dpdk_init()) and a (very) small mempool is instantiated (mimicking the logic in dpdk_mp_create()).

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

2019-09-11 Thread Michal Obrembski
port other 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 Acked-by: Flavio Leitner Signed-off-by: Michal Obrembski --- tests/syste

[ovs-dev] [PATCH v16 08/14] netdev-dpdk: support multi-segment jumbo frames.

2019-09-11 Thread Michal Obrembski
-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 Signed-off-by: Michal Obrembski --- Documentation/topics/dpdk/jumbo-frames.rst |

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

2019-09-11 Thread Michal Obrembski
d to check if the respective packet headers don't span across multiple mbufs. This requirement is needed to guarantee that callers can assume headers are always in contiguous memory. Signed-off-by: Tiago Lam Signed-off-by: Michal Obrembski --- lib/conntrack.c | 5 ++ li

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

2019-09-11 Thread Michal Obrembski
-by: Tiago Lam Acked-by: Eelco Chaudron Signed-off-by: Michal Obrembski --- lib/netdev-dpdk.c | 89 +-- 1 file changed, 80 insertions(+), 9 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 6fef910..6b66fc3 100644 --- a/lib

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

2019-09-11 Thread Michal Obrembski
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 v16 03/14] dp-packet: Handle multi-seg mbufs in helper funcs.

2019-09-11 Thread Michal Obrembski
From: Tiago Lam Most helper functions in dp-packet assume that the data held by a dp_packet is contiguous, and perform operations such as pointer arithmetic under that assumption. However, with the introduction of multi-segment mbufs, where data is non-contiguous, such assumptions are no longer

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

2019-09-11 Thread Michal Obrembski
From: Tiago Lam When a dp_packet is from a DPDK source, and it contains multi-segment mbufs, the data_len is not equal to the packet size, pkt_len. Instead, the data_len of each mbuf in the chain should be considered while distributing the new (provided) size. To account for the above

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

2019-09-11 Thread Michal Obrembski
From: 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 Acked-by: Flavio

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

2019-09-11 Thread Michal Obrembski
and dp_packet_at(); - Added support for shifting 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

[ovs-dev] [PATCH v4 6/7] Give the variables more meaningful names

2019-09-11 Thread Obrembski
From: Artur Twardowski Replaced variable names "hlen", "ulen", "gnh" with longer ones to make the code analysis easier. Additionally, UDP header len is no longer accumulated into GENEVE header length, additions are used in the places where the sum of both headers is used. Signed-off-by: Artur

[ovs-dev] [PATCH v4 7/7] Too long line split into two

2019-09-11 Thread Obrembski
From: Artur Twardowski Signed-off-by: Artur Twardowski --- lib/netdev-native-tnl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c index d0ea3d5..f542858 100644 --- a/lib/netdev-native-tnl.c +++ b/lib/netdev-native-tnl.c

[ovs-dev] [PATCH v4 4/7] Performance improvements and native tnl fixes.

2019-09-11 Thread Obrembski
ases to check if the tunneling headers (VXLAN, GRE, ...) fit on the first mbuf. Otherwise return an error. Signed-off-by: Tiago Lam Signed-off-by: Michal Obrembski --- lib/dp-packet.h | 18 +-- lib/flow.c | 81 - lib/

[ovs-dev] [PATCH v4 3/7] netdev-dpdk: Enable TSO when using multi-seg mbufs

2019-09-11 Thread Obrembski
-vsctl set Open_vSwitch . other_config:dpdk-multi-seg-mbufs=true Co-authored-by: Mark Kavanagh Signed-off-by: Mark Kavanagh Signed-off-by: Tiago Lam Signed-off-by: Michal Obrembski --- Documentation/automake.mk | 1 + Documentation/topics/dpdk/index.rst | 1 + Documentation/topics

[ovs-dev] [PATCH v4 2/7] netdev-dpdk: Consider packets marked for TSO.

2019-09-11 Thread Obrembski
Signed-off-by: Tiago Lam Signed-off-by: Michal Obrembski --- lib/dp-packet.h| 16 +++ lib/netdev-bsd.c | 11 - lib/netdev-dpdk.c | 122 ++--- lib/netdev-dummy.c | 11 - lib/netdev-linux.c | 15 +++ 5 files changed, 149

[ovs-dev] [PATCH v4 0/7] dpdk: Add support for TSO

2019-09-11 Thread Obrembski
From: Michal Obrembski Enabling TSO offload allows a host stack to delegate the segmentation of oversized TCP packets to the underlying physical NIC, if supported. In the case of a VM this means that the segmentation of the packets is not performed by the guest kernel, but by the host NIC itself

[ovs-dev] [PATCH v4 1/7] netdev-dpdk: Validate packets burst before Tx.

2019-09-11 Thread Obrembski
requirements when debug is enabled. - Update and/or reset required checksums when tx offload is set for packet. Signed-off-by: Tiago Lam Signed-off-by: Michal Obrembski --- lib/netdev-dpdk.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dpdk.c b

[ovs-dev] [PATCH v15 15/15] Fix DPDK MBUF tests compilation on some compilers

2019-09-11 Thread Obrembski
From: Michal Obrembski Signed-off-by: Michal Obrembski --- tests/test-dpdk-mbufs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test-dpdk-mbufs.c b/tests/test-dpdk-mbufs.c index 0c152bf..c8dd155 100644 --- a/tests/test-dpdk-mbufs.c +++ b/tests/test

[ovs-dev] [PATCH v15 14/15] dp-packet: Fix invalid size of ICMPv6 header

2019-09-11 Thread Obrembski
From: Artur Twardowski Signed-off-by: Artur Twardowski Signed-off-by: Michal Obrembski --- lib/flow.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index 94cfd62..e6019bf 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1105,8 +1105,7

[ovs-dev] [PATCH v15 12/15] dpdk-tests: Fix Multi-segment DPDK Unittests

2019-09-11 Thread Obrembski
From: Michal Obrembski Signed-off-by: Michal Obrembski --- tests/system-dpdk.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index ca66135..abfe6e6 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -42,6 +42,7

[ovs-dev] [PATCH v15 13/15] Fix build without DPDK

2019-09-11 Thread Obrembski
From: Michal Obrembski It looks like in dp_packet_clone_with_headroom() was used a DPDK functions when DPDK was not enabled. Signed-off-by: Michal Obrembski --- lib/dp-packet.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/dp-packet.c b/lib/dp

[ovs-dev] [PATCH v15 11/15] dpdk-tests: End-to-end tests for multi-seg mbufs.

2019-09-11 Thread Obrembski
a random packet out and check that `ofctl dump-flows` shows the correct amount of packets and bytes sent. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron Signed-off-by: Michal Obrembski --- tests/system-dpdk.at | 65 1 file changed, 65

[ovs-dev] [PATCH v15 08/15] netdev-dpdk: support multi-segment jumbo frames.

2019-09-11 Thread Obrembski
-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 Signed-off-by: Michal Obrembski --- Documentation/topics/dpdk/jumbo-frames.rst |

[ovs-dev] [PATCH v15 06/15] dp-packet: Add support for data "linearization".

2019-09-11 Thread Obrembski
d to check if the respective packet headers don't span across multiple mbufs. This requirement is needed to guarantee that callers can assume headers are always in contiguous memory. Signed-off-by: Tiago Lam Signed-off-by: Michal Obrembski --- lib/conntrack.c | 5 ++ li

[ovs-dev] [PATCH v15 07/15] netdev-dpdk: copy large packet to multi-seg. mbufs

2019-09-11 Thread Obrembski
-by: Tiago Lam Acked-by: Eelco Chaudron Signed-off-by: Michal Obrembski --- lib/netdev-dpdk.c | 89 +-- 1 file changed, 80 insertions(+), 9 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 6fef910..6b66fc3 100644 --- a/lib

[ovs-dev] [PATCH v15 05/15] dp-packet: copy data from multi-seg. DPDK mbuf

2019-09-11 Thread Obrembski
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 Signed-off-by: Michal Obrembski --- lib/dp-packet.c | 54

[ovs-dev] [PATCH v15 04/15] dp-packet: Handle multi-seg mubfs in shift() func.

2019-09-11 Thread Obrembski
was introduced, 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 Signed-off-by: Michal Obrembski --- lib/dp-packet.c

[ovs-dev] [PATCH v15 02/15] dp-packet: Fix data_len handling multi-seg mbufs.

2019-09-11 Thread Obrembski
Kavanagh Signed-off-by: Przemyslaw Lal Signed-off-by: Marcin Ksiadz Signed-off-by: Yuanhan Liu Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron Signed-off-by: Michal Obrembski --- lib/dp-packet.h | 101 +--- 1 file changed, 89 insertions(+), 12

[ovs-dev] [PATCH v15 03/15] dp-packet: Handle multi-seg mbufs in helper funcs.

2019-09-11 Thread Obrembski
Lam Acked-by: Eelco Chaudron Acked-by: Flavio Leitner Signed-off-by: Michal Obrembski --- lib/dp-packet.c | 4 +- lib/dp-packet.h | 171 2 files changed, 151 insertions(+), 24 deletions(-) diff --git a/lib/dp-packet.c b/lib/dp-packet.c

[ovs-dev] [PATCH v15 01/15] netdev-dpdk: Serialise non-pmds mbufs' alloc/free.

2019-09-11 Thread Obrembski
Leitner Signed-off-by: Michal Obrembski --- lib/netdev-dpdk.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index bc20d68..09fd72d 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -289,6 +289,16

[ovs-dev] [PATCH v15 00/15] Support multi-segment mbufs

2019-09-11 Thread Obrembski
From: Michal Obrembski Overview This patchset introduces support for multi-segment mbufs to OvS-DPDK. Multi-segment mbufs are typically used when the size of an mbuf is insufficient to contain the entirety of a packet's data. Instead, the data is split across numerous mbufs, each