[dpdk-dev] [PATCH] eal: add option --avail-cores to detect lcores

2016-03-10 Thread Tan, Jianfeng
Hi Konstantin, On 3/9/2016 11:17 PM, Ananyev, Konstantin wrote: > Hi Jianfeng, > >> -Original Message- >> From: Tan, Jianfeng >> Sent: Wednesday, March 09, 2016 2:56 PM >> To: Ananyev, Konstantin; Panu Matilainen; dev at dpdk.org >> Subject: Re: [dpdk-dev] [PATCH] eal: add option

[dpdk-dev] [PATCH v5 3/6] eal: use new RTE_ARCH_X86 for x86 arch

2016-03-10 Thread Thomas Monjalon
> lib/librte_eal/linuxapp/eal/eal_pci.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) There are other occurences to fix in EAL.

[dpdk-dev] [PATCH v5 0/6] fix the issue that DPDK takes over virtio device blindly

2016-03-10 Thread Thomas Monjalon
> Huawei Xie (6): > eal: make the comment more accurate > eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't managing the device. > eal: use new RTE_ARCH_X86 macro for x86 arch I've completed this patch to use RTE_ARCH_X86 in EAL. > eal: simple code rework > eal: map IO port only

[dpdk-dev] [PATCH 0/3] ethdev: add helper functions to get eth_dev and dev private data

2016-03-10 Thread Thomas Monjalon
2016-02-17 14:20, Ferruh Yigit: > This is to provide abstraction and reduce global variable access. > > Global variable rte_eth_devices kept exported to not break ABI. > > Bonding driver not selected on purpose, just it seems it is using > rte_eth_devices heavily. > > There are a few more

[dpdk-dev] [PATCH 1/3] kcp: add kernel control path kernel module

2016-03-10 Thread Thomas Monjalon
2016-03-02 23:35, Thomas Monjalon: > 2016-03-02 12:21, Thomas Monjalon: > > 2016-03-02 11:47, Vincent JARDIN: > > > Le 02/03/2016 09:27, Panu Matilainen a ?crit : > > > >>> I'd like to see these be merged. > > > >>> > > > >>> Jay > > > >> > > > >> The code is really not ready. I am okay with

[dpdk-dev] [PATCH v5 2/2] librte_pipeline: add new API functions for pipeline action handlers

2016-03-10 Thread Thomas Monjalon
2016-03-08 18:07, Jasvinder Singh: > Two new pipeline API functions have been added to the library. The packet > hijack API function can be called by any input/output port or table action > handler to remove selected packets from the burst of packets read from one > of the pipeline input ports and

[dpdk-dev] [PATCH v8 1/5] lib/librte_ether: change function name of tunnel port config

2016-03-10 Thread Lu, Wenzhuo
Hi Thomas, > -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Wednesday, March 9, 2016 5:49 PM > To: Lu, Wenzhuo > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v8 1/5] lib/librte_ether: change function name > of tunnel port config > >

[dpdk-dev] [PATCH v7 0/5] support E-tag offloading and forwarding on X550

2016-03-10 Thread Lu, Wenzhuo
Hi Thomas, > -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Wednesday, March 9, 2016 6:07 PM > To: Lu, Wenzhuo > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v7 0/5] support E-tag offloading and forwarding > on X550 > > 2016-03-09 15:44,

[dpdk-dev] [PATCH v6 2/5] lib/librte_ether: support l2 tunnel operations

2016-03-10 Thread Lu, Wenzhuo
Hi Thomas, > -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Wednesday, March 9, 2016 5:28 PM > To: Lu, Wenzhuo > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v6 2/5] lib/librte_ether: support l2 tunnel > operations > > 2016-03-09 01:15,

[dpdk-dev] [PATCH] eal: add option --avail-cores to detect lcores

2016-03-10 Thread Tan, Jianfeng
On 3/10/2016 3:33 AM, Ananyev, Konstantin wrote: > >> On 3/8/2016 4:54 PM, Panu Matilainen wrote: >>> On 03/04/2016 12:05 PM, Jianfeng Tan wrote: This patch adds option, --avail-cores, to use lcores which are available by calling

[dpdk-dev] [PATCH v7 00/11] Add API to get packet type info

2016-03-10 Thread Jianfeng Tan
To achieve this, a new function pointer, dev_ptype_info_get, is added into struct eth_dev_ops. For those devices who do not implement it, it means it does not provide any ptype info. v7: - 2.2 -> 16.04 - Add note: this API better invoked after device is already started. - Update

[dpdk-dev] [PATCH v7 01/11] ethdev: add API to query packet type filling info

2016-03-10 Thread Jianfeng Tan
Add a new API rte_eth_dev_get_ptype_info to query whether/what packet type can be filled by given already started device or its pmd rx burst function has already been decided). Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil ---

[dpdk-dev] [PATCH v7 02/11] pmd/cxgbe: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/cxgbe/cxgbe_ethdev.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 97ef152..33bd815 100644 ---

[dpdk-dev] [PATCH v7 03/11] pmd/e1000: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/e1000/igb_ethdev.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 4ed5e95..b3a3ee6

[dpdk-dev] [PATCH v7 04/11] pmd/enic: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/enic/enic_ethdev.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 2a88043..fbeab6f 100644 ---

[dpdk-dev] [PATCH v7 05/11] pmd/fm10k: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/fm10k/fm10k_ethdev.c | 50 ++ drivers/net/fm10k/fm10k_rxtx.c | 3 +++ drivers/net/fm10k/fm10k_rxtx_vec.c | 3 +++ 3 files changed, 56 insertions(+)

[dpdk-dev] [PATCH v7 06/11] pmd/i40e: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/i40e/i40e_ethdev.c| 1 + drivers/net/i40e/i40e_ethdev_vf.c | 1 + drivers/net/i40e/i40e_rxtx.c | 46 ++- drivers/net/i40e/i40e_rxtx.h | 1 +

[dpdk-dev] [PATCH v7 07/11] pmd/ixgbe: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/ixgbe/ixgbe_ethdev.c | 38 ++ drivers/net/ixgbe/ixgbe_ethdev.h | 2 ++ drivers/net/ixgbe/ixgbe_rxtx.c | 4 +++- 3 files changed, 43 insertions(+), 1

[dpdk-dev] [PATCH v7 08/11] pmd/mlx4: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index ee00151..58f4e1a 100644 ---

[dpdk-dev] [PATCH v7 09/11] pmd/mlx5: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c| 1 + drivers/net/mlx5/mlx5.h| 1 + drivers/net/mlx5/mlx5_ethdev.c | 20 drivers/net/mlx5/mlx5_rxtx.c | 2 ++ 4 files changed, 24

[dpdk-dev] [PATCH v7 10/11] pmd/nfp: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/nfp/nfp_net.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 9c4f218..ad6eebd 100644 ---

[dpdk-dev] [PATCH v7 11/11] pmd/vmxnet3: add dev_ptype_info_get implementation

2016-03-10 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index c363bf6..ac120a1

[dpdk-dev] [PATCH v9 0/5] Support VxLAN & NVGRE checksum off-load on X550

2016-03-10 Thread Wenzhuo Lu
This patch set add the VxLAN & NVGRE checksum off-load support. Both RX and TX checksum off-load can be used for VxLAN & NVGRE. And the VxLAN port can be set, it's implemented in this patch set either. v2: - Update release note. v3: - Update RX/TX offload capability. - Reuse PKT_RX_EIP_CKSUM_BAD

[dpdk-dev] [PATCH v9 1/5] lib/librte_ether: change function name of tunnel port config

2016-03-10 Thread Wenzhuo Lu
The names of function for tunnel port configuration are not accurate. They're tunnel_add/del, better change them to tunnel_port_add/del. As it may be an ABI change if change the names directly, the new functions are added but not remove the old ones. The old ones will be removed in the next

[dpdk-dev] [PATCH v9 2/5] i40e: rename the tunnel port config functions

2016-03-10 Thread Wenzhuo Lu
As the names of tunnel port config functions are not accurate, change them from tunnel_add/del to tunnel_port_add/del. And support both the old and new rte ops. Signed-off-by: Wenzhuo Lu Acked-by: Konstantin Ananyev --- drivers/net/i40e/i40e_ethdev.c | 22 -- 1 file

[dpdk-dev] [PATCH v9 4/5] ixgbe: support VxLAN & NVGRE RX checksum off-load

2016-03-10 Thread Wenzhuo Lu
X550 will do VxLAN & NVGRE RX checksum off-load automatically. This patch exposes the result of the checksum off-load. Signed-off-by: Wenzhuo Lu Acked-by: Konstantin Ananyev --- drivers/net/ixgbe/ixgbe_ethdev.c | 4 drivers/net/ixgbe/ixgbe_rxtx.c | 11 ++-

[dpdk-dev] [PATCH v9 5/5] ixgbe: support VxLAN & NVGRE TX checksum off-load

2016-03-10 Thread Wenzhuo Lu
The patch add VxLAN & NVGRE TX checksum off-load. When the flag of outer IP header checksum offload is set, we'll set the context descriptor to enable this checksum off-load. Also update release note for VxLAN & NVGRE checksum off-load support and ABI change. Signed-off-by: Wenzhuo Lu Acked-by:

[dpdk-dev] [PATCH v9 3/5] ixgbe: support UDP tunnel port config

2016-03-10 Thread Wenzhuo Lu
Add UDP tunnel port add/del support on ixgbe. Now only support VxLAN port configuration. Although according to the specification the VxLAN port has a default value 4789, it can be changed. We support VxLAN port configuration to meet the change. Note, the default value of VxLAN port in ixgbe NICs

[dpdk-dev] [PATCH v8 1/4] lib/ether: optimize struct rte_eth_tunnel_filter_conf

2016-03-10 Thread Jingjing Wu
From: Xutao Sun Change the fields of outer_mac and inner_mac in struct rte_eth_tunnel_filter_conf from pointer to struct in order to keep the code's readability. Signed-off-by: Xutao Sun Signed-off-by: Jijiang Liu --- app/test-pmd/cmdline.c | 6 --

[dpdk-dev] [PATCH v8 2/4] lib/ether: add IP in GRE type

2016-03-10 Thread Jingjing Wu
From: Xutao Sun Signed-off-by: Xutao Sun Signed-off-by: Jijiang Liu --- lib/librte_ether/rte_eth_ctrl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 736cfc1..70635e9 100644 ---

[dpdk-dev] [PATCH v8 3/4] driver/i40e: implement tunnel filter for IP in GRE

2016-03-10 Thread Jingjing Wu
From: Xutao Sun Signed-off-by: Xutao Sun Signed-off-by: Jijiang Liu --- drivers/net/i40e/i40e_ethdev.c | 33 - 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c

[dpdk-dev] [PATCH v8 0/4] This patch set adds tunnel filter support for IP in GRE on i40e.

2016-03-10 Thread Jingjing Wu
From: Xutao Sun v2 changes: Fix the byte order problem. v3 changes: Remove the deprecation notice and update the release notes. v4 changes: Modify the mistakes in cmdline.c in the old patch. v5 changes: Fix type errors and update the testpmd documentation. v6

[dpdk-dev] [PATCH v8 4/4] app/test-pmd: test tunnel filter for IP in GRE

2016-03-10 Thread Jingjing Wu
From: Xutao Sun This patch added some options in tunnel_filter command to test IP in GRE packet classification on i40e. Update the testpmd documentation. Signed-off-by: Xutao Sun Signed-off-by: Jijiang Liu --- app/test-pmd/cmdline.c | 32

[dpdk-dev] [PATCH v4 00/12] extend flow director fields in i40e driver

2016-03-10 Thread Jingjing Wu
v4 changes: - rebase to latest dpdk-next-net/rel_16_04. - comments on new fields in API structure. v3 changes: - rebase to latest dpdk-next-net/rel_16_04(commit: 0f9564a0e4f2) - use AQ rx control register read/write for some registers - remove few useless lines - patch title rewording v2

[dpdk-dev] [PATCH v4 01/12] ethdev: extend flow director for input selection

2016-03-10 Thread Jingjing Wu
This patch added RTE_ETH_INPUT_SET_L3_IP4_TTL, RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS input field type and extended struct rte_eth_ipv4_flow and rte_eth_ipv6_flow to support filtering by tos, protocol and ttl. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- lib/librte_ether/rte_eth_ctrl.h |

[dpdk-dev] [PATCH v4 02/12] i40e: split function for hash and fdir input

2016-03-10 Thread Jingjing Wu
This patch split function for input set changing of hash and fdir to avoid multiple check on different situation. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- drivers/net/i40e/i40e_ethdev.c | 235 + drivers/net/i40e/i40e_ethdev.h | 11 +-

[dpdk-dev] [PATCH v4 03/12] i40e: remove flex payload from input selection

2016-03-10 Thread Jingjing Wu
In this patch, flex payload is removed from valid fdir input set values. It is because all flex payload configuration can be set in struct rte_fdir_conf during device configure phase. And it is a more flexible configuration including flexpayload's selection, input set selection by word and mask

[dpdk-dev] [PATCH v4 04/12] i40e: restore default setting on input set

2016-03-10 Thread Jingjing Wu
This patch added a new function to set the input set to default when initialization. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- drivers/net/i40e/i40e_ethdev.c | 56 ++ 1 file changed, 56 insertions(+) diff --git

[dpdk-dev] [PATCH v4 05/12] i40e: extend flow director to filter by IP Header

2016-03-10 Thread Jingjing Wu
This patch extended flow director to select more IP Header fields as filter input set. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- drivers/net/i40e/i40e_ethdev.c | 69 ++ drivers/net/i40e/i40e_fdir.c | 26 +++- 2 files changed, 75

[dpdk-dev] [PATCH v4 06/12] testpmd: extend input set related commands

2016-03-10 Thread Jingjing Wu
This patch extended commands for filter's input set changing. It added tos, protocol and ttl as filter's input fields, and remove the words selection from flex payloads for flow director. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- app/test-pmd/cmdline.c | 100

[dpdk-dev] [PATCH v4 07/12] librte_ether: extend flow director struct

2016-03-10 Thread Jingjing Wu
This patch changed rte_eth_fdir_flow from union to struct to support more packets formats, for example, Vxlan and GRE tunnel packets with IP inner frame. This patch also add new RTE_FDIR_TUNNEL_TYPE_GRE enum. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang ---

[dpdk-dev] [PATCH v4 08/12] i40e: extend flow director to filter by tunnel ID

2016-03-10 Thread Jingjing Wu
This patch extended flow director to select Vxlan/GRE tunnel ID as filter's input set and program the filter rule with the defined tunnel type. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- drivers/net/i40e/i40e_ethdev.c | 11 +++ drivers/net/i40e/i40e_fdir.c | 150

[dpdk-dev] [PATCH v4 09/12] testpmd: extend flow director commands

2016-03-10 Thread Jingjing Wu
This patch extended commands for filter's input set changing. It added GRE/Vxlan Tunnel as filter's input fields. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- app/test-pmd/cmdline.c | 27 +-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 22

[dpdk-dev] [PATCH v4 10/12] i40e: fix VLAN bitmasks for input set

2016-03-10 Thread Jingjing Wu
From: Andrey Chilikin This patch adds missing VLAN bitmask for inner frame in case of tunneling and fixes VLAN tags bitmasks for single or outer frame in case of tunneling. Fixes: 98f055707685 ("i40e: configure input fields for RSS or flow director") Signed-off-by:

[dpdk-dev] [PATCH v4 11/12] i40e: extend flow director to filter by vlan id

2016-03-10 Thread Jingjing Wu
This patch extended flow director to select vlan id as filter's input set and program the filter rule with vlan id. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- doc/guides/rel_notes/release_16_04.rst | 2 ++ drivers/net/i40e/i40e_ethdev.c | 11

[dpdk-dev] [PATCH v4 12/12] testpmd: extend flow director commands

2016-03-10 Thread Jingjing Wu
This patch extended commands for filter's input set changing. It added vlan as filter's input fields. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- app/test-pmd/cmdline.c | 6 +++--- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- 2 files changed, 4

[dpdk-dev] [PATCH v5 0/2] fm10k: enable FTAG based forwarding

2016-03-10 Thread Wang, Xiao W
Hi, We reached a consensus on configuring FTAG by devargs method, any other suggestion or concern for this patch? Best Regards, Xiao > -Original Message- > From: Liu, Yong > Sent: Tuesday, March 8, 2016 3:58 PM > To: Wang, Xiao W ; Chen, Jing D > > Cc: dev at dpdk.org > Subject: RE:

[dpdk-dev] [PATCH v5 0/2] i40evf: pf reset event report

2016-03-10 Thread Jingjing Wu
v5 changes: - doc rewording and format fixing. v4 changes: - rebase on latest dpdk-next-net/rel_16_04 branch (commit 0f9564a0e4f2) v3 changes: - commit log doc rewording. - rebase on latest dpdk-next-net/rel_16_04 branch. - remove few useless line. - adjust interval and increase times for

[dpdk-dev] [PATCH v5 2/2] i40evf: support to report pf reset event

2016-03-10 Thread Jingjing Wu
When Linux PF and DPDK VF are used for i40e PMD, In case of PF reset, interrupt will go via adminq event, VF need be informed the event, a callback mechanism is introduced by VF. This will allow VF to invoke callback when reset happens. Users can register a callback for this interrupt event like:

[dpdk-dev] [PATCH v5 1/2] i40evf: allocate virtchnl cmd buffer for each vf

2016-03-10 Thread Jingjing Wu
Currently, i40evf PMD uses a global static buffer to send virtchnl command to host driver. It is shared by multi VFs. This patch changed to allocate virtchnl cmd buffer for each VF. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang --- drivers/net/i40e/i40e_ethdev.h| 2 +

[dpdk-dev] [PATCH] example/ipsec-secgw: ipsec security gateway

2016-03-10 Thread Jerin Jacob
On Wed, Mar 09, 2016 at 11:54:50PM +, Sergio Gonzalez Monroy wrote: > On 01/02/2016 11:26, Jerin Jacob wrote: > >On Mon, Feb 01, 2016 at 11:09:16AM +, Sergio Gonzalez Monroy wrote: > >>On 31/01/2016 14:39, Jerin Jacob wrote: > >>>On Fri, Jan 29, 2016 at 08:29:12PM +, Sergio Gonzalez

[dpdk-dev] [PATCH v3 0/3] vhost: virtio-net.c cleanups and fixes

2016-03-10 Thread Yuanhan Liu
This short series includes two cleanup patch, and one bug fix patch. v3: - code rebase --- Yuanhan Liu (3): vhost: get rid of linked list dev vhost: simplify numa_realloc vhost: fix vq realloc at numa_realloc lib/librte_vhost/virtio-net.c | 276 +-

[dpdk-dev] [PATCH v3 1/3] vhost: get rid of linked list dev

2016-03-10 Thread Yuanhan Liu
While we use a single linked list to maintain all devices, we could use a static array to achieve the same goal, just like what we did to maintain the eth devices with rte_eth_devices array. This could simplifies the code a bit. Signed-off-by: Yuanhan Liu Acked-by: Huawei Xie ---

[dpdk-dev] [PATCH v3 2/3] vhost: simplify numa_realloc

2016-03-10 Thread Yuanhan Liu
We could first check if we need realloc vq or not, if so, reallocate it. We then do similar to vhost dev realloc. This could get rid of the tons of repeated "if (realloc_dev)" and "if (realloc_vq)" statements, therefore, makes code a bit more readable. Signed-off-by: Yuanhan Liu Acked-by:

[dpdk-dev] [PATCH v3 3/3] vhost: fix vq realloc at numa_realloc

2016-03-10 Thread Yuanhan Liu
vq is allocated on pairs, hence we should do pair reallocation at numa_realloc() as well, otherwise an error like following occurs while do numa reallocation: VHOST_CONFIG: reallocate vq from 0 to 1 node PANIC in rte_free(): Fatal error: Invalid memory The reason we don't catch it is

[dpdk-dev] [PATCH v3 0/8] vhost rxtx refactor and fixes

2016-03-10 Thread Yuanhan Liu
v3: - quite few minor changes, including using likely/unlikely when possible. - Added a new patch 8 to avoid desc dead loop chain The first 3 patches refactor 3 major functions at vhost_rxtx.c. It simplifies the code logic, making it more readable. OTOH, it reduces binary code size,

[dpdk-dev] [PATCH v3 1/8] vhost: refactor rte_vhost_dequeue_burst

2016-03-10 Thread Yuanhan Liu
The current rte_vhost_dequeue_burst() implementation is a bit messy and logic twisted. And you could see repeat code here and there. However, rte_vhost_dequeue_burst() acutally does a simple job: copy the packet data from vring desc to mbuf. What's tricky here is: - desc buff could be chained

[dpdk-dev] [PATCH v3 2/8] vhost: refactor virtio_dev_rx

2016-03-10 Thread Yuanhan Liu
This is a simple refactor, as there isn't any twisted logic in old code. Here I just broke the code and introduced two helper functions, reserve_avail_buf() and copy_mbuf_to_desc() to make the code more readable. Also, it saves nearly 1K bytes of binary code size. Signed-off-by: Yuanhan Liu ---

[dpdk-dev] [PATCH v3 3/8] vhost: refactor virtio_dev_merge_rx

2016-03-10 Thread Yuanhan Liu
Current virtio_dev_merge_rx() implementation just looks like the old rte_vhost_dequeue_burst(), full of twisted logic, that you can see same code block in quite many different places. However, the logic of virtio_dev_merge_rx() is quite similar to virtio_dev_rx(). The big difference is that the

[dpdk-dev] [PATCH v3 4/8] vhost: do not use rte_memcpy for virtio_hdr copy

2016-03-10 Thread Yuanhan Liu
First of all, rte_memcpy() is mostly useful for coping big packets by leveraging hardware advanced instructions like AVX. But for virtio net hdr, which is 12 bytes at most, invoking rte_memcpy() will not introduce any performance boost. And, to my suprise, rte_memcpy() is VERY huge. Since

[dpdk-dev] [PATCH v3 5/8] vhost: don't use unlikely for VIRTIO_NET_F_MRG_RXBUF detection

2016-03-10 Thread Yuanhan Liu
VIRTIO_NET_F_MRG_RXBUF is a default feature supported by vhost. Adding unlikely for VIRTIO_NET_F_MRG_RXBUF detection doesn't make sense to me at all. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH v3 6/8] vhost: do sanity check for desc->len

2016-03-10 Thread Yuanhan Liu
We need make sure that desc->len is bigger than the size of virtio net header, otherwise, unexpected behaviour might happen due to "desc_avail" would become a huge number with for following code: desc_avail = desc->len - vq->vhost_hlen; For dequeue code path, it will try to allocate

[dpdk-dev] [PATCH v3 7/8] vhost: do sanity check for desc->next against with vq->size

2016-03-10 Thread Yuanhan Liu
A malicious guest may easily forge some illegal vring desc buf. To make our vhost robust, we need make sure desc->next will not go beyond the vq->desc[] array. Suggested-by: Rich Lane Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_rxtx.c | 6 +- 1 file changed, 5 insertions(+), 1

[dpdk-dev] [PATCH v3 8/8] vhost: avoid dead loop chain.

2016-03-10 Thread Yuanhan Liu
If a malicious guest forges a dead loop chain, it could lead to a dead loop of copying the desc buf to mbuf, which results to all mbuf being exhausted. Add a var nr_desc to avoid such case. Suggested-by: Huawei Xie Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_rxtx.c | 5 - 1 file

[dpdk-dev] [PATCH] vhost: Fix default value of kickfd and callfd

2016-03-10 Thread Tan, Jianfeng
On 3/10/2016 2:14 PM, Tetsuya Mukawa wrote: > Currently, default value of kickfd and callfd is -1. > If the value is -1, current code guess kickfd and callfd hasn't been > initialized yet. And vhost library will guess the virtqueue isn't ready > for processing. > But callfd and kickfd will be

[dpdk-dev] [PATCH 1/3] kcp: add kernel control path kernel module

2016-03-10 Thread Vincent JARDIN
Le 10 mars 2016 01:06, "Thomas Monjalon" a ?crit : > > 2016-03-02 23:35, Thomas Monjalon: > > 2016-03-02 12:21, Thomas Monjalon: > > > 2016-03-02 11:47, Vincent JARDIN: > > > > Le 02/03/2016 09:27, Panu Matilainen a ?crit : > > > > >>> I'd like to see these be merged. > > > > >>> > > > > >>> Jay

[dpdk-dev] [PATCH] vhost: Fix default value of kickfd and callfd

2016-03-10 Thread Tetsuya Mukawa
On 2016/03/10 15:25, Tan, Jianfeng wrote: > > > On 3/10/2016 2:14 PM, Tetsuya Mukawa wrote: >> Currently, default value of kickfd and callfd is -1. >> If the value is -1, current code guess kickfd and callfd hasn't been >> initialized yet. And vhost library will guess the virtqueue isn't ready >>

[dpdk-dev] [PATCH] vhost: Fix default value of kickfd and callfd

2016-03-10 Thread Tan, Jianfeng
On 3/10/2016 2:34 PM, Tetsuya Mukawa wrote: > On 2016/03/10 15:25, Tan, Jianfeng wrote: >> >> On 3/10/2016 2:14 PM, Tetsuya Mukawa wrote: >>> Currently, default value of kickfd and callfd is -1. >>> If the value is -1, current code guess kickfd and callfd hasn't been >>> initialized yet. And

[dpdk-dev] [PATCH] vhost: Fix default value of kickfd and callfd

2016-03-10 Thread Tetsuya Mukawa
On 2016/03/10 15:39, Tan, Jianfeng wrote: > > On 3/10/2016 2:34 PM, Tetsuya Mukawa wrote: >> On 2016/03/10 15:25, Tan, Jianfeng wrote: >>> >>> On 3/10/2016 2:14 PM, Tetsuya Mukawa wrote: Currently, default value of kickfd and callfd is -1. If the value is -1, current code guess kickfd

[dpdk-dev] [PATCH] virtio: fix wrong features returned for legacy virtio

2016-03-10 Thread Yuanhan Liu
Declare dst as type uint32_t instead of uint64_t, otherwise, we will get a random upper 32 bit feature bits, as the following io port read reads lower 32 bit only. It could lead a feature bits that include VIRTIO_F_VERSION_1 (the 32th bit) for legacy virtio, which is obviously wrong. Fixes:

[dpdk-dev] [PATCH v2] vhost: Fix default value of kickfd and callfd

2016-03-10 Thread Tetsuya Mukawa
Currently, default values of kickfd and callfd are -1. If the values are -1, current code guesses kickfd and callfd haven't been initialized yet. And vhost library will guess the virtqueue isn't ready for processing. But callfd and kickfd will be set as -1 when "--enable-kvm" isn't specified in

[dpdk-dev] [PATCH] virtio: fix wrong features returned for legacy virtio

2016-03-10 Thread Tan, Jianfeng
On 3/10/2016 3:01 PM, Yuanhan Liu wrote: > Declare dst as type uint32_t instead of uint64_t, otherwise, we will get > a random upper 32 bit feature bits, as the following io port read reads > lower 32 bit only. It could lead a feature bits that include > VIRTIO_F_VERSION_1 > (the 32th bit) for

[dpdk-dev] [PATCH] virtio: fix wrong features returned for legacy virtio

2016-03-10 Thread David Marchand
On Thu, Mar 10, 2016 at 8:01 AM, Yuanhan Liu wrote: > Declare dst as type uint32_t instead of uint64_t, otherwise, we will get > a random upper 32 bit feature bits, as the following io port read reads > lower 32 bit only. It could lead a feature bits that include > VIRTIO_F_VERSION_1 > (the 32th

[dpdk-dev] [PATCH] virtio: fix wrong features returned for legacy virtio

2016-03-10 Thread Yuanhan Liu
On Thu, Mar 10, 2016 at 08:43:37AM +0100, David Marchand wrote: > On Thu, Mar 10, 2016 at 8:01 AM, Yuanhan Liu > wrote: > > Declare dst as type uint32_t instead of uint64_t, otherwise, we will get > > a random upper 32 bit feature bits, as the following io port read reads > > lower 32 bit only.

[dpdk-dev] ixgbe TX function selection

2016-03-10 Thread Wu, Jingjing
Hi, Zoltan > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Zoltan Kiss > Sent: Wednesday, March 2, 2016 3:19 AM > To: dev at dpdk.org > Subject: [dpdk-dev] ixgbe TX function selection > > Hi, > > I've noticed that ixgbe_set_tx_function() selects the non-SG

[dpdk-dev] [RFC 10/35] eal: introduce RTE_DECONST macro

2016-03-10 Thread Olivier MATZ
> I would rather have the mempool_audit code take a non-const argument. > The macro method sets a bad precedent and will encourage more bad code. > Plus code checkers are likely to flag any such usage as suspect. Doing that would imply dropping the const qualifier in several functions: -

[dpdk-dev] [RFC 10/35] eal: introduce RTE_DECONST macro

2016-03-10 Thread Olivier MATZ
>> If you have a better alternative, without duplicating the code, >> I'll be happy to learn. > > I really don't like this dropping of const either, but I do see the problem. > I'd nearly rather see two copies of the function than start dropping the const > in such a way. I don't think

[dpdk-dev] [PATCH, v2] mempool: avoid memory waste with large pagesize

2016-03-10 Thread Olivier MATZ
Hello, On 03/09/2016 10:12 PM, Stephen Hemminger wrote: > If page size is large (like 64K on ARM) and object size is small > then don't waste lots of memory by rounding up to page size. > Instead, round up so that 1 or more objects all fit in a page. > > This preserves the requirement that an

[dpdk-dev] [RFC 10/35] eal: introduce RTE_DECONST macro

2016-03-10 Thread Bruce Richardson
On Thu, Mar 10, 2016 at 09:29:03AM +0100, Olivier MATZ wrote: > >> If you have a better alternative, without duplicating the code, > >> I'll be happy to learn. > > > > I really don't like this dropping of const either, but I do see the problem. > > I'd nearly rather see two copies of the function

[dpdk-dev] [RFC 10/35] eal: introduce RTE_DECONST macro

2016-03-10 Thread Olivier MATZ
Hi Bruce, On 03/10/2016 10:26 AM, Bruce Richardson wrote: > On Thu, Mar 10, 2016 at 09:29:03AM +0100, Olivier MATZ wrote: If you have a better alternative, without duplicating the code, I'll be happy to learn. >>> >>> I really don't like this dropping of const either, but I do see the

[dpdk-dev] [PATCH v7 2/2] cryptodev: change burst API to be crypto op oriented

2016-03-10 Thread Trahe, Fiona
Hi Thomas, > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Trahe, Fiona > Sent: Wednesday, March 09, 2016 12:56 PM > To: Thomas Monjalon > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v7 2/2] cryptodev: change burst API to be > crypto > op oriented

[dpdk-dev] [PATCH v7 1/2] cryptodev: API tidy and changes to support future extensions

2016-03-10 Thread Trahe, Fiona
Hi Thomas, > -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Tuesday, March 08, 2016 2:11 PM > To: Trahe, Fiona > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v7 1/2] cryptodev: API tidy and changes to > support future extensions > > Hi, >

[dpdk-dev] [PATCH 2/2] bnx2x: Determine rx/tx queue sizes sooner

2016-03-10 Thread Bruce Richardson
On Fri, Mar 04, 2016 at 10:28:57PM +, Rasesh Mody wrote: > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Chas Williams > > Sent: Wednesday, December 30, 2015 4:38 PM > > > > From: "Charles (Chas) Williams" > > > > The VF needs to determine the queues sizes before .dev_infos_get

[dpdk-dev] [PATCH 1/2] bnx2x: fix error handling in bnx2x_loop_obtain_resources()

2016-03-10 Thread Bruce Richardson
On Fri, Mar 04, 2016 at 10:28:44PM +, Rasesh Mody wrote: > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Chas Williams > > Sent: Wednesday, December 30, 2015 4:38 PM > > > > From: "Charles (Chas) Williams" > > > > bnx2x_loop_obtain_resources() returns a struct containing the

[dpdk-dev] [PATCH, v2] mempool: avoid memory waste with large pagesize

2016-03-10 Thread Ferruh Yigit
On 3/10/2016 8:37 AM, Olivier MATZ wrote: > Hello, > > On 03/09/2016 10:12 PM, Stephen Hemminger wrote: >> If page size is large (like 64K on ARM) and object size is small >> then don't waste lots of memory by rounding up to page size. >> Instead, round up so that 1 or more objects all fit in a

[dpdk-dev] [PATCH 1/3] scripts: support parallel building in validate-abi.sh via -j[N] option

2016-03-10 Thread Panu Matilainen
Signed-off-by: Panu Matilainen --- doc/guides/contributing/versioning.rst | 4 +++- scripts/validate-abi.sh| 13 ++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/guides/contributing/versioning.rst b/doc/guides/contributing/versioning.rst index

[dpdk-dev] [PATCH 2/3] scripts: avoid editing defconfig_* files in validate-abi.sh

2016-03-10 Thread Panu Matilainen
The defconfig_* files are templates which are not supposed to be edited, and doing so tends to leave unwanted cruft behind. Edit the "working copy" config instead, which is the intended DPDK way. Signed-off-by: Panu Matilainen --- scripts/validate-abi.sh | 18 +- 1 file changed,

[dpdk-dev] [PATCH 3/3] scripts: ignore self-generated directories in validate-abi startup check

2016-03-10 Thread Panu Matilainen
When doing multiple runs of validate-abi.sh, the git status check will more often than not unnecessarily fail with "Working directory not clean" error because of the compat_result and compile target directories from the previous run. Filter out the self-generated directories when checking.

[dpdk-dev] [PATCH v3 0/2] add support for buffered tx to ethdev

2016-03-10 Thread Tomasz Kulasek
Many sample apps include internal buffering for single-packet-at-a-time operation. Since this is such a common paradigm, this functionality is better suited to being implemented in the ethdev API. The new APIs in the ethdev library are: * rte_eth_tx_buffer_init - initialize buffer *

[dpdk-dev] [PATCH v3 1/2] ethdev: add buffered tx api

2016-03-10 Thread Tomasz Kulasek
Many sample apps include internal buffering for single-packet-at-a-time operation. Since this is such a common paradigm, this functionality is better suited to being implemented in the ethdev API. The new APIs in the ethdev library are: * rte_eth_tx_buffer_init - initialize buffer *

[dpdk-dev] [PATCH v3 2/2] examples: rework to use buffered tx

2016-03-10 Thread Tomasz Kulasek
The internal buffering of packets for TX in sample apps is no longer needed, so this patchset also replaces this code with calls to the new rte_eth_tx_buffer* APIs in: * l2fwd-jobstats * l2fwd-keepalive * l2fwd * l3fwd-acl * l3fwd-power * link_status_interrupt * client_server_mp * l2fwd_fork *

[dpdk-dev] [PATCH v4 2/3] ring: variable rename and code cleanup

2016-03-10 Thread Bruce Richardson
On Fri, Feb 26, 2016 at 04:58:08PM +, Ferruh Yigit wrote: > Rename nb_rx/tx_queues fields in internals struct to max_rx/tx_queues > Updated fields required to keep max queue numbers configured. For current > queue number requirements data->nb_rx/tx_queues fields used. > > Some checkpatch

[dpdk-dev] [PATCH, v2] mempool: avoid memory waste with large pagesize

2016-03-10 Thread Olivier MATZ
>> It still does not work. When CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG=y: >> >> mp = rte_mempool_create("test", 128, >> 64, 0, 0, NULL, NULL, NULL, NULL, SOCKET_ID_ANY, 0); >> rte_mempool_dump(stdout, mp); >> >> populated_size=128 >> header_size=64 >> elt_size=64 >> trailer_size=64 >>

[dpdk-dev] [PATCH v4 0/3] clean-up on virtual PMDs

2016-03-10 Thread Bruce Richardson
On Fri, Feb 26, 2016 at 04:58:06PM +, Ferruh Yigit wrote: > This is a clean-up patch, no defect fixed, no functional difference > expected. > > Patch removes duplicated fields between data->dev_private > and data (struct rte_eth_dev_data) for pcap and null PMDs. > For ring, renames some

[dpdk-dev] [PATCH v3 0/2] add support for buffered tx to ethdev

2016-03-10 Thread Ananyev, Konstantin
> Many sample apps include internal buffering for single-packet-at-a-time > operation. Since this is such a common paradigm, this functionality is > better suited to being implemented in the ethdev API. > > The new APIs in the ethdev library are: > * rte_eth_tx_buffer_init - initialize buffer > *

[dpdk-dev] [PATCH] doc: add mempool mgr ABI deprication notice

2016-03-10 Thread David Hunt
Announce the ABI breakage due to addition of external mempool manager functionality which requires changes to rte_mempool structure. Signed-off-by: David Hunt --- doc/guides/rel_notes/deprecation.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git

[dpdk-dev] [PATCH v5 0/4] DPDK polling-mode driver for Amazon Elastic Network Adapters (ENA)

2016-03-10 Thread Bruce Richardson
On Wed, Mar 09, 2016 at 12:34:51PM +0100, Jan M?dala wrote: > I'd like to kindly request for review and comments. > > Jan Hi Jan, I've run checkpatch on these patches and below is some of the output that you might want to look at fixing. As well as these, there were a *lot* of warnings about

[dpdk-dev] [PATCH 3/3] scripts: ignore self-generated directories in validate-abi startup check

2016-03-10 Thread Ferruh Yigit
On 3/10/2016 10:53 AM, Panu Matilainen wrote: > When doing multiple runs of validate-abi.sh, the git status check > will more often than not unnecessarily fail with "Working directory not > clean" error because of the compat_result and compile target directories > from the previous run. Filter out

[dpdk-dev] [PATCH 2/3] scripts: avoid editing defconfig_* files in validate-abi.sh

2016-03-10 Thread Ferruh Yigit
On 3/10/2016 10:53 AM, Panu Matilainen wrote: > The defconfig_* files are templates which are not supposed to be > edited, and doing so tends to leave unwanted cruft behind. Edit > the "working copy" config instead, which is the intended DPDK way. > > Signed-off-by: Panu Matilainen > --- >

[dpdk-dev] [PATCH v3 1/1] drivers/net/i40e: add ethdev functions

2016-03-10 Thread Mcnamara, John
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Remy Horton > Sent: Wednesday, March 9, 2016 1:29 PM > To: Zhang, Helin > Cc: dev at dpdk.org > Subject: [dpdk-dev] [PATCH v3 1/1] drivers/net/i40e: add ethdev functions > > Implements driver support for

  1   2   3   >