[dpdk-dev] [RFC] Generic flow director/filtering/classification API

2016-07-18 Thread Adrien Mazarguil
of single bit ID but it could be implemented through a different action for less capable devices. PMDs that support 32 bit IDs could reuse the same code for both features. I understand you'd prefer having this feature always present, however we already know that not all PMDs/devices support it, and like everything else this is a kind of offload that needs to be explicitly requested by the application as it may not be needed. If we go with the separate action, then perhaps it would make sense to rename "ID" to "MARK" to make things clearer: RTE_FLOW_ACTION_TYPE_FLAG /* Flag packets processed by flow rule. */ RTE_FLOW_ACTION_TYPE_MARK /* Attach a 32 bit value to a packet. */ I guess the result of the FLAG action would be something in ol_flag. Thoughts? > > I think applications have to implement SW fallbacks all the time, as even > > some sort of guarantee on the flow rule processing time may not be enough > > to avoid misdirected packets and related security issues. > [Sugesh] Software fallback will be there always. However I am little bit > confused on > the way software going to identify the packets that are already hardware > processed . I feel we need some > notification in the packet itself, when a hardware rule hits. ID/flag/any > other options? Yeah I think so too, as long as it is optional because we cannot assume all PMDs will support it. > > Let's wait for applications to start using this API and then consider an > > extra > > set of asynchronous / real-time functions when the need arises. It should > > not > > impact the way rules are specified > [Sugesh] Sure. I think the rule definition may not impact with this. Thanks for your comments. -- Adrien Mazarguil 6WIND

[dpdk-dev] [RFC] Generic flow director/filtering/classification API

2016-07-19 Thread Adrien Mazarguil
d, rte can reconfigure the rules. Is the > concern that PMD may adjust the sequence of the rules according to the > priority, so every NIC has a different list of rules? But PMD can adjust them > again when rte reconfiguring the rules. What about PMDs able to stop and restart ports without destroying their own flow rules? If we assume flow rules must be destroyed when stopping a port, these PMDs are needlessly penalized with slower stop/start cycles. Think about it assuming thousands of flow rules. Thus from an application point of view, whatever happens when stopping and restarting a port should not matter. If a flow rule was present before, it must still be present afterwards. If the PMD had to destroy flow rules and re-create them, it does not actually matter if they differ slightly at the HW level, as long as: - Existing opaque flow rule pointers (rte_flow) are still valid to the PMD and refer to the same rules. - The overall behavior of all rules is the same. The list of rules you think of (patterns / actions) is maintained by applications (not RTE), and only if they need them. RTE would needlessly duplicate this. -- Adrien Mazarguil 6WIND

[dpdk-dev] [RFC] Generic flow director/filtering/classification API

2016-07-20 Thread Adrien Mazarguil
of (patterns / actions) is maintained by > > applications > > (not RTE), and only if they need them. RTE would needlessly duplicate this. > As said before, need more details to understand this. Maybe an example is > better :) The generic format both RTE and applications might understand is the one described in this API (struct rte_flow_pattern and struct rte_flow_actions). If we wanted RTE to maintain some sort of per-port state for flow rule specifications, it would have to be a copy of these structures arranged somehow (list or something else). If we consider that PMDs need to keep a context object associated to a flow rule (the opaque struct rte_flow *), then RTE would most likely have to store it along with the flow specification. Such a list may not be useful to applications (list lookups take time), so they would implement their own redundant method. They might also require extra room to attach some application context to flow rules. A generic list cannot plan for it. Applications know what they want to do with flow rules and are responsible for managing them efficiently with RTE out of the way. I'm not sure if this answered your question, if not, please describe a scenario where a RTE-managed list of flow rules would be mandatory. -- Adrien Mazarguil 6WIND

[dpdk-dev] [RFC] Generic flow director/filtering/classification API

2016-07-20 Thread Adrien Mazarguil
n the device globally so packets which are not matched are not affected by RSS processing. As a result it might not be possible to configure two flow rules specifying incompatible RSS actions simultaneously if the underlying device supports only a single global RSS context. Are we on the same page? -- Adrien Mazarguil 6WIND

[dpdk-dev] [RFC] Generic flow director/filtering/classification API

2016-07-21 Thread Adrien Mazarguil
of flow rules in any order. If rules a/b/c can be created, then it won't make sense from an application point of view if c/a/b for some reason cannot and the PMD maintainers will rightfully get a bug report. > More comments below. > > On Tuesday, July 07/05/16, 2016 at 20:16:46 +0200,

[dpdk-dev] [RFC] Generic flow director/filtering/classification API

2016-07-21 Thread Adrien Mazarguil
Hi Jerin, Sorry, looks like I missed your reply. Please see below. On Mon, Jul 11, 2016 at 04:11:43PM +0530, Jerin Jacob wrote: > On Tue, Jul 05, 2016 at 08:16:46PM +0200, Adrien Mazarguil wrote: > > Hi Adrien, > > Overall this proposal looks very good. I c

[dpdk-dev] about rx checksum flags

2016-05-30 Thread Adrien Mazarguil
UNKNOWN packets (like today), drop BAD packets (like today) and > drop NONE packets (this is a new feature that has to be explicitly > enabled by the application). > > > Any comment? Considering mlx4 and mlx5 can only return "good" or "unknown" checksums, I'm all for updating the API as suggested. > Olivier > > > [1] http://dpdk.org/ml/archives/dev/2015-January/011550.html -- Adrien Mazarguil 6WIND

[dpdk-dev] about rx checksum flags

2016-05-31 Thread Adrien Mazarguil
t has to be explicitly > >enabled by the application). > > > > > >Any comment? > > Why not take care of PKT_RX_IP_CKSUM_BAD? Is it too easy for sw to handle? I thought PKT_RX_IP_CKSUM_BAD was to be modified in a similar fashion, but since you raise the issue, mlx4/mlx5 need this as well. These boards only report "good" checksums for L3 and L4. > For virtio, there's only one bit, VIRTIO_NET_HDR_F_DATA_VALID, to indicate > that checksum is valid. Shall we differentiate L3 checksum and L4 checksum > in rte_mbuf.ol_flags? > > Thanks, > Jianfeng > > > > >Olivier > > > > > >[1] http://dpdk.org/ml/archives/dev/2015-January/011550.html > -- Adrien Mazarguil 6WIND

[dpdk-dev] [RFC v2] Generic flow director/filtering/classification API

2016-11-02 Thread Adrien Mazarguil
t longer! > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Adrien Mazarguil > > Sent: Friday, September 30, 2016 1:11 AM > > To: dev at dpdk.org > > Cc: Thomas Monjalon > > Subject: Re: [dpdk-dev] [RFC v2] Generic flow > >

[dpdk-dev] dpdk16.11 RC2 package ipv4 reassembly example can't work

2016-11-02 Thread Adrien Mazarguil
16.04. > tcpdump_reset_code_reassembly_failed.pcap: sniff packets by tcpdump on 16.11 > reset_code_reassembly_successful_.jpg: reassembly a packets successful detail > info > dpdk16.11_reassembly_failed.jpg: reassembly a packets failed detail info > -- Adrien Mazarguil 6WIND

[dpdk-dev] [RFC]Generic flow filtering API Sample Application

2016-11-02 Thread Adrien Mazarguil
Hi Wei, On Wed, Nov 02, 2016 at 05:27:50AM +, Zhao1, Wei wrote: > Hi All, > Now we are planning for an sample application for Generic flow > filtering API feature, and I have finished the RFC for this example app. > Now Adrien Mazarguil has send v2 version of Generic flow >

[dpdk-dev] [PATCH] net/mlx5: fix wrong use of vector instruction

2016-11-02 Thread Adrien Mazarguil
uint8_t *)raw, (uint8_t *)addr); > + memcpy((uint8_t *)raw, ((uint8_t *)addr), 16); > length -= MLX5_WQE_DWORD_SIZE; > addr += MLX5_WQE_DWORD_SIZE; > /* Replace the Ethernet type by the VLAN if necessary. */ > -- > 1.8.3.1 Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH 0/3] fix Rx checksum offloads

2016-11-02 Thread Adrien Mazarguil
> drivers/net/mlx4/mlx4.c | 21 -- > drivers/net/mlx5/mlx5_prm.h | 37 +- > drivers/net/mlx5/mlx5_rxtx.c | 93 > > 3 files changed, 87 insertions(+), 64 deletions(-) > > -- > 2.1.4 Thanks

[dpdk-dev] [PATCH 0/2] update mlx5 release note and guide

2016-11-02 Thread Adrien Mazarguil
se_16_11.rst | 136 > ++--- > 2 files changed, 114 insertions(+), 30 deletions(-) > > -- > 2.1.4 Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] dpdk16.11 RC2 package ipv4 reassembly example can't work

2016-11-04 Thread Adrien Mazarguil
On Fri, Nov 04, 2016 at 06:36:30AM +, Lu, Wenzhuo wrote: > Hi Adrien, > > > -Original Message- > > From: Adrien Mazarguil [mailto:adrien.mazarguil at 6wind.com] > > Sent: Wednesday, November 2, 2016 11:21 PM > > To: Lu, Wenzhuo > > Cc: Ananyev, K

[dpdk-dev] [RFC v2] Generic flow director/filtering/classification API

2016-11-09 Thread Adrien Mazarguil
mentation (although context-aware command completion should already help quite a bit in this regard). - A few pattern item / action properties cannot be configured yet (e.g. rss_conf parameter for RSS action) and a few completions (e.g. possible queue IDs) should be added. -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH 00/22] Generic flow API (rte_flow)

2016-11-16 Thread Adrien Mazarguil
. - API documentation (based on RFC). - testpmd flow command documentation (although context-aware command completion should already help quite a bit in this regard). - A few pattern item / action properties cannot be configured yet (e.g. rss_conf parameter for RSS action) and a few completio

[dpdk-dev] [PATCH 02/22] cmdline: add support for dynamic tokens

2016-11-16 Thread Adrien Mazarguil
). Because no structures are modified (existing fields are reused), this commit has no impact on the current ABI. Signed-off-by: Adrien Mazarguil --- lib/librte_cmdline/cmdline_parse.c | 60 + lib/librte_cmdline/cmdline_parse.h | 21 2 files changed, 74

[dpdk-dev] [PATCH 01/22] ethdev: introduce generic flow API

2016-11-16 Thread Adrien Mazarguil
is self-standing, no need to look up elsewhere. Existing filter types will be deprecated and removed in the near future. Signed-off-by: Adrien Mazarguil --- MAINTAINERS| 4 + lib/librte_ether/Makefile | 3 + lib/librte_ether/rte_eth_ctrl.h| 1

[dpdk-dev] [PATCH 03/22] cmdline: add alignment constraint

2016-11-16 Thread Adrien Mazarguil
This prevents sigbus errors on architectures that cannot handle unexpected unaligned accesses to the output buffer. Signed-off-by: Adrien Mazarguil --- lib/librte_cmdline/cmdline_parse.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/librte_cmdline

[dpdk-dev] [PATCH 04/22] app/testpmd: implement basic support for rte_flow

2016-11-16 Thread Adrien Mazarguil
Add basic management functions for the generic flow API (validate, create, destroy, flush, query and list). Flow rule objects and properties are arranged in lists associated with each port. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 1 + app/test-pmd/config.c | 484

[dpdk-dev] [PATCH 05/22] app/testpmd: add flow command

2016-11-16 Thread Adrien Mazarguil
Managing generic flow API functions from command line requires the use of dynamic tokens for convenience as flow rules are not fixed and cannot be defined statically. This commit adds specific flexible parser code and object for a new "flow" command in separate file. Signed-off-

[dpdk-dev] [PATCH 06/22] app/testpmd: add rte_flow integer support

2016-11-16 Thread Adrien Mazarguil
Parse all integer types and handle conversion to network byte order in a single function. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 148 +++ 1 file changed, 148 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd

[dpdk-dev] [PATCH 07/22] app/testpmd: add flow list command

2016-11-16 Thread Adrien Mazarguil
Syntax: flow list {port_id} [group {group_id}] [...] List configured flow rules on a port. Output can optionally be limited to a given set of group identifiers. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 4 ++ app/test-pmd/cmdline_flow.c | 141

[dpdk-dev] [PATCH 08/22] app/testpmd: add flow flush command

2016-11-16 Thread Adrien Mazarguil
Syntax: flow flush {port_id} Destroy all flow rules on a port. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 3 +++ app/test-pmd/cmdline_flow.c | 43 +++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/app/test-pmd

[dpdk-dev] [PATCH 09/22] app/testpmd: add flow destroy command

2016-11-16 Thread Adrien Mazarguil
Syntax: flow destroy {port_id} rule {rule_id} [...] Destroy a given set of flow rules associated with a port. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 3 ++ app/test-pmd/cmdline_flow.c | 106 ++- 2 files changed, 108 insertions

[dpdk-dev] [PATCH 10/22] app/testpmd: add flow validate/create commands

2016-11-16 Thread Adrien Mazarguil
not match. - PASSTHRU: action that leaves packets up for additional processing by subsequent flow rules. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 14 ++ app/test-pmd/cmdline_flow.c | 314 ++- 2 files changed, 327 insertions(+), 1

[dpdk-dev] [PATCH 11/22] app/testpmd: add flow query command

2016-11-16 Thread Adrien Mazarguil
Syntax: flow query {port_id} {rule_id} {action} Query a specific action of an existing flow rule. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline.c | 3 + app/test-pmd/cmdline_flow.c | 121 ++- 2 files changed, 123 insertions(+), 1 deletion

[dpdk-dev] [PATCH 12/22] app/testpmd: add rte_flow item spec handler

2016-11-16 Thread Adrien Mazarguil
ask: sets bit-mask affecting both spec and last from arbitrary value. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 110 +++ 1 file changed, 110 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index e70e

[dpdk-dev] [PATCH 13/22] app/testpmd: add rte_flow item spec prefix length

2016-11-16 Thread Adrien Mazarguil
Generating bit-masks from prefix lengths is often more convenient than providing them entirely (e.g. to define IPv4 and IPv6 subnets). This commit adds the "prefix" operator that assigns generated bit-masks to any pattern item specification field. Signed-off-by: Adrien Mazarguil ---

[dpdk-dev] [PATCH 14/22] app/testpmd: add rte_flow bit-field support

2016-11-16 Thread Adrien Mazarguil
Several rte_flow structures expose bit-fields that cannot be set in a generic fashion at byte level. Add bit-mask support to handle them. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 59 1 file changed, 59 insertions(+) diff --git

[dpdk-dev] [PATCH 15/22] app/testpmd: add item any to flow command

2016-11-16 Thread Adrien Mazarguil
This pattern item matches any protocol in place of the current layer and has two properties: - min: minimum number of layers covered (0 or more). - max: maximum number of layers covered (0 means infinity). Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 30

[dpdk-dev] [PATCH 16/22] app/testpmd: add various items to flow command

2016-11-16 Thread Adrien Mazarguil
- PF: match packets addressed to the physical function. - VF: match packets addressed to a virtual function ID. - PORT: device-specific physical port index to use. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 53 1 file changed, 53

[dpdk-dev] [PATCH 17/22] app/testpmd: add item raw to flow command

2016-11-16 Thread Adrien Mazarguil
: byte string to look for. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 206 +++ 1 file changed, 206 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index c61e31e..6f2f26c 100644 --- a/app/test-pmd

[dpdk-dev] [PATCH 18/22] app/testpmd: add items eth/vlan to flow command

2016-11-16 Thread Adrien Mazarguil
These pattern items match basic Ethernet headers (source, destination and type) and related 802.1Q/ad VLAN headers. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 126 +++ 1 file changed, 126 insertions(+) diff --git a/app/test-pmd

[dpdk-dev] [PATCH 19/22] app/testpmd: add items ipv4/ipv6 to flow command

2016-11-16 Thread Adrien Mazarguil
Add the ability to match basic fields from IPv4 and IPv6 headers (source and destination addresses only). Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 177 +++ 1 file changed, 177 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b

[dpdk-dev] [PATCH 20/22] app/testpmd: add L4 items to flow command

2016-11-16 Thread Adrien Mazarguil
Add the ability to match a few properties of common L4[.5] protocol headers: - ICMP: type and code. - UDP: source and destination ports. - TCP: source and destination ports. - SCTP: source and destination ports. - VXLAN: network identifier. Signed-off-by: Adrien Mazarguil --- app/test-pmd

[dpdk-dev] [PATCH 21/22] app/testpmd: add various actions to flow command

2016-11-16 Thread Adrien Mazarguil
- MARK: attach 32 bit value to packets. - FLAG: flag packets. - DROP: drop packets. - COUNT: enable counters for a rule. - PF: redirect packets to physical device function. - VF: redirect packets to virtual device function. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 121

[dpdk-dev] [PATCH 22/22] app/testpmd: add queue actions to flow command

2016-11-16 Thread Adrien Mazarguil
- QUEUE: assign packets to a given queue index. - DUP: duplicate packets to a given queue index. - RSS: spread packets among several queues. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 152 +++ 1 file changed, 152 insertions(+) diff

[dpdk-dev] [PATCH 1/3] net/mlx5: fix leak when starvation occurs

2016-11-17 Thread Adrien Mazarguil
__rte_mbuf_raw_free(pkt); > - pkt = seg; > + pkt = rep; > } > break; > } > -- > 2.1.4 Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH 2/3] net/mlx5: fix wrong htons

2016-11-17 Thread Adrien Mazarguil
t; + wqe = &(*txq->wqes)[ntohs(cqe->wqe_counter) & > ((1 << txq->wqe_n) - 1)].hdr; > elts_tail = wqe->ctrl[3]; > assert(elts_tail < (1 << txq->wqe_n)); > -- > 2.1.4 Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH 3/3] net/mlx5: do not invalidate title CQE

2016-11-17 Thread Adrien Mazarguil
idx = rxq->cq_ci + 1; > uint16_t end = zip->cq_ci; > > while (idx != end) { > -- > 2.1.4 Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH 01/22] ethdev: introduce generic flow API

2016-11-18 Thread Adrien Mazarguil
Hi Beilei, On Fri, Nov 18, 2016 at 06:36:31AM +, Xing, Beilei wrote: > Hi Adrien, > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Adrien Mazarguil > > Sent: Thursday, November 17, 2016 12:23 AM > > To: dev at dpdk.or

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

2016-11-22 Thread Adrien Mazarguil
gt; RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__); > RTE_PMD_REGISTER_PCI_TABLE(net_mlx5, mlx5_pci_id_map); > +RTE_PMD_REGISTER_KMOD_DEP(net_mlx5, "* igb_uio | uio_pci_generic | vfio"); RTE_PMD_REGISTER_KMOD_DEP(net_mlx5, "* ib_uverbs & mlx5_core & mlx5_ib"); -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH v12 0/6] add Tx preparation

2016-11-30 Thread Adrien Mazarguil
then, "it is OK, we do not need any checksum preparation for TSO". Actually I do not think we'll ever need tx_prep() unless we add our own quirks to struct rte_eth_desc_lim (and friends) which are currently quietly handled by TX burst functions. -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH v2] cryptodev: fix compilation error in SUSE 11 SP2

2016-10-05 Thread Adrien Mazarguil
; @@ -773,7 +773,7 @@ struct rte_cryptodev_sym_session { > } __rte_aligned(8); > /**< Public symmetric session details */ > > - char _private[]; > + __extension__ char _private[0]; > /**< Private session material */ > }; > > -- > 2.7.4 Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH] net/mlx: align drivers to latest naming convention

2016-10-07 Thread Adrien Mazarguil
uot; > +#define MLX5_DRIVER_NAME "net_mlx5" > > /* Maximum number of simultaneous MAC addresses. */ > #define MLX5_MAX_MAC_ADDRESSES 128 > -- > 2.7.4 Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] [RFC v2] Generic flow director/filtering/classification API

2016-10-10 Thread Adrien Mazarguil
Hi Wei, On Mon, Oct 10, 2016 at 09:42:53AM +, Zhao1, Wei wrote: > Hi Adrien Mazarguil, > > In your v2 version of rte_flow.txt , there is an action type > RTE_FLOW_ACTION_TYPE_MARK, but there is no definition of struct > rte_flow_action_mark. > And there is an de

[dpdk-dev] [RFC v2] Generic flow director/filtering/classification API

2016-10-11 Thread Adrien Mazarguil
Hi Wei, On Tue, Oct 11, 2016 at 01:47:53AM +, Zhao1, Wei wrote: > Hi Adrien Mazarguil, > There is a struct rte_flow_action_rss in rte_flow.txt, the member > rss_conf is a pointer type, is there any convenience in using pointer? > Why not using struct rte_eth_rss_conf r

[dpdk-dev] [PATCH] net/mlx5: fix init on secondary process

2016-10-11 Thread Adrien Mazarguil
t; primary_txq->elts_n, > primary_txq_ctrl->socket, > NULL) == 0) { > -- > 2.1.4 -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH] net/mlx5: fix Rx function selection

2016-10-11 Thread Adrien Mazarguil
quot;) > > Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil > --- > drivers/net/mlx5/mlx5_rxq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c > index b9a5fe6..fe27d22 1006

[dpdk-dev] [PATCH v3 0/5] Add flow director and RX VLAN stripping support

2016-03-03 Thread Adrien Mazarguil
To preserve compatibility with Mellanox OFED 3.1, flow director and RX VLAN stripping code is only enabled if compiled with 3.2. Changes in v3: - Fixed flow registration issue caused by missing masks in flow rules. - Fixed packet duplication with overlapping FDIR rules. - Added FDIR flush command

[dpdk-dev] [PATCH v3 1/5] mlx5: refactor special flows handling

2016-03-03 Thread Adrien Mazarguil
ed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c | 4 +- drivers/net/mlx5/mlx5.h | 6 +- drivers/net/mlx5/mlx5_defs.h| 3 + drivers/net/mlx5/mlx5_rxmode.c | 321 ++-- drivers/net/mlx5/mlx5_rxq.c

[dpdk-dev] [PATCH v3 2/5] mlx5: add special flows (broadcast and IPv6 multicast)

2016-03-03 Thread Adrien Mazarguil
From: Yaacov Hazan <yaac...@mellanox.com> Until now, broadcast frames were handled like unicast. Moving the related flow to the special flows table frees up the related unicast MAC entry. The same method is used to handle IPv6 multicast frames. Signed-off-by: Yaacov Hazan Signed-off-by:

[dpdk-dev] [PATCH v3 3/5] mlx5: make flow steering rule generator more generic

2016-03-03 Thread Adrien Mazarguil
From: Yaacov Hazan <yaac...@mellanox.com> Upcoming flow director support will reuse this function to generate filter rules. Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_mac.c| 4 ++-- drivers/net/mlx5/mlx5_rxmode.c | 5 +++-- drivers/ne

[dpdk-dev] [PATCH v3 4/5] mlx5: add support for flow director

2016-03-03 Thread Adrien Mazarguil
From: Yaacov Hazan <yaac...@mellanox.com> Add support for flow director filters (RTE_FDIR_MODE_PERFECT and RTE_FDIR_MODE_PERFECT_MAC_VLAN modes). This feature requires MLNX_OFED >= 3.2. Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil Signed-off-by: Raslan Darawsheh

[dpdk-dev] [PATCH v3 5/5] mlx5: add support for RX VLAN stripping

2016-03-03 Thread Adrien Mazarguil
From: Yaacov Hazan <yaac...@mellanox.com> Allows HW to strip the 802.1Q header from incoming frames and report it through the mbuf structure. This feature requires MLNX_OFED >= 3.2. Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil --- doc/guides/nics/mlx5.rst

[dpdk-dev] [PATCH v3 0/7] Performance optimizations for mlx5 and mlx4

2016-03-03 Thread Adrien Mazarguil
erformance (mlx4 and mlx5). Adrien Mazarguil (1): mlx: use aligned memory to register regions Nelio Laranjeiro (6): mlx5: prefetch next TX mbuf header and data mlx5: reorder TX/RX queue structure mlx5: remove one indirection level from RX/TX functions mlx5: process offload flags only when

[dpdk-dev] [PATCH v3 1/7] mlx5: prefetch next TX mbuf header and data

2016-03-03 Thread Adrien Mazarguil
From: Nelio Laranjeiro This change improves performance noticeably. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c

[dpdk-dev] [PATCH v3 2/7] mlx5: reorder TX/RX queue structure

2016-03-03 Thread Adrien Mazarguil
From: Nelio Laranjeiro Remove padding and move important fields to the beginning for better performance. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.h | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff

[dpdk-dev] [PATCH v3 3/7] mlx5: remove one indirection level from RX/TX functions

2016-03-03 Thread Adrien Mazarguil
From: Nelio Laranjeiro Avoid dereferencing pointers twice to get to fast Verbs functions by storing them directly in RX/TX queue structures. Signed-off-by: Nelio Laranjeiro Signed-off-by: Yaacov Hazan --- drivers/net/mlx5/Makefile| 1 +

[dpdk-dev] [PATCH v3 4/7] mlx5: process offload flags only when requested

2016-03-03 Thread Adrien Mazarguil
From: Nelio Laranjeiro Improve performance by processing offloads only when requested by the application. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff

[dpdk-dev] [PATCH v3 5/7] mlx5: avoid lkey retrieval for inlined packets

2016-03-03 Thread Adrien Mazarguil
From: Nelio Laranjeiro Improves performance as the lkey is not needed by hardware in this case. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git

[dpdk-dev] [PATCH v3 6/7] mlx5: free buffers immediately after completion

2016-03-03 Thread Adrien Mazarguil
From: Nelio Laranjeiro This lowers the amount of cache misses. Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c

[dpdk-dev] [PATCH v3 7/7] mlx: use aligned memory to register regions

2016-03-03 Thread Adrien Mazarguil
The first and last memory pool elements are usually cache-aligned but not page-aligned, particularly when using huge pages. Hardware performance can be improved significantly by registering memory regions starting and ending on page boundaries. Signed-off-by: Adrien Mazarguil --- drivers/net

[dpdk-dev] [PATCH v2 0/7] Assorted fixes for mlx4 and mlx5

2016-03-03 Thread Adrien Mazarguil
This patchset addresses several minor issues, release notes are updated accordingly. Note: should be applied after "Performance optimizations for mlx5 and mlx4". Changes in v2: - None, submitted again due to dependency with previous patchset. Adrien Mazarguil (3): mlx5: manage a

[dpdk-dev] [PATCH v2 1/7] mlx5: fix possible crash during initialization

2016-03-03 Thread Adrien Mazarguil
From: Or Ami RSS configuration should not be freed when priv is NULL. Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get") Signed-off-by: Or Ami --- doc/guides/rel_notes/release_16_04.rst | 4 drivers/net/mlx5/mlx5.c| 6 -- 2 files

[dpdk-dev] [PATCH v2 2/7] mlx5: check if port is configured as Ethernet device

2016-03-03 Thread Adrien Mazarguil
From: Or Ami If the port link layer is not Ethernet, notify the user. Signed-off-by: Or Ami --- doc/guides/rel_notes/release_16_04.rst | 5 + drivers/net/mlx5/mlx5.c| 7 +++ 2 files changed, 12 insertions(+) diff --git

[dpdk-dev] [PATCH v2 3/7] mlx5: manage all special flow types at once

2016-03-03 Thread Adrien Mazarguil
This commit adds helpers to remove redundant code. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c | 5 + drivers/net/mlx5/mlx5.h | 2 ++ drivers/net/mlx5/mlx5_rxmode.c | 40 drivers/net/mlx5/mlx5_trigger.c | 10

[dpdk-dev] [PATCH v2 4/7] mlx5: remove redundant debugging message

2016-03-03 Thread Adrien Mazarguil
Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxmode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c index bcf4231..730527e 100644 --- a/drivers/net/mlx5/mlx5_rxmode.c +++ b/drivers/net/mlx5/mlx5_rxmode.c

[dpdk-dev] [PATCH v2 5/7] mlx5: apply VLAN filtering to broadcast and IPv6 multicast flows

2016-03-03 Thread Adrien Mazarguil
Unlike promiscuous and allmulticast flows, those should remain VLAN-specific. Signed-off-by: Adrien Mazarguil --- doc/guides/rel_notes/release_16_04.rst | 4 ++ drivers/net/mlx5/mlx5_rxmode.c | 105 + drivers/net/mlx5/mlx5_rxq.c| 5

[dpdk-dev] [PATCH v2 6/7] mlx5: fix RX checksum offload in non L3/L4 packets

2016-03-03 Thread Adrien Mazarguil
From: Yaacov Hazan Change rxq_cq_to_ol_flags() to set checksum flags according to packet type, so for non L3/L4 packets the mbuf chksum_bad flags will not be set. Fixes: 67fa62bc672d ("mlx5: support checksum offload") Signed-off-by: Yaacov Hazan ---

[dpdk-dev] [PATCH v2 7/7] mlx4: make sure that number of RX queues is a power of 2

2016-03-03 Thread Adrien Mazarguil
From: Robin Jarry In the documentation it is specified that the hardware only supports a number of RX queues if it is a power of 2. Since ibv_exp_create_qp may not return an error when the number of queues is unsupported by hardware, sanitize the value in dev_configure.

[dpdk-dev] [PATCH v2 0/5] Implement missing features in mlx5

2016-03-03 Thread Adrien Mazarguil
This patchset adds to mlx5 a few features available in mlx4 (TX from secondary processes) or provided by Verbs (support for HW packet padding, TX VLAN insertion). Release notes and documentation are updated accordingly. Note: should be applied after "Assorted fixes for mlx4 and mlx5". Changes

[dpdk-dev] [PATCH v2 1/5] mlx5: add callbacks to support link (up / down) changes

2016-03-03 Thread Adrien Mazarguil
From: Or Ami Burst functions are updated to make sure applications cannot attempt to send/receive after link is brought down. Signed-off-by: Or Ami --- doc/guides/rel_notes/release_16_04.rst | 4 ++ drivers/net/mlx5/mlx5.c| 2 + drivers/net/mlx5/mlx5.h

[dpdk-dev] [PATCH v2 2/5] mlx5: allow operation in secondary processes

2016-03-03 Thread Adrien Mazarguil
From: Or Ami Secondary processes are expected to use queues and other resources allocated by the primary, however Verbs resources can only be shared between processes when inherited through fork(). This limitation can be worked around for TX by configuring separate queues

[dpdk-dev] [PATCH v2 3/5] mlx5: add RX CRC stripping configuration

2016-03-03 Thread Adrien Mazarguil
From: Olga Shern Until now, CRC was always stripped by hardware. This feature can be configured since MLNX_OFED >= 3.2. Signed-off-by: Olga Shern --- doc/guides/nics/mlx5.rst | 2 ++ doc/guides/rel_notes/release_16_04.rst | 6 ++

[dpdk-dev] [PATCH v2 4/5] mlx5: add support for HW packet padding

2016-03-03 Thread Adrien Mazarguil
From: Olga Shern Environment variable MLX5_PMD_ENABLE_PADDING enables HW packet padding in PCI bus transactions. When packet size is cache aligned and CRC stripping is enabled, 4 fewer bytes are written to the PCI bus. Enabling padding makes such packets aligned again. In

[dpdk-dev] [PATCH v2 5/5] mlx5: add VLAN insertion offload

2016-03-03 Thread Adrien Mazarguil
uested, however ConnectX-4 Lx boards cannot take advantage of multi-packet send optimizations anymore. Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil --- config/common_linuxapp | 1 + doc/guides/nics/mlx5.rst | 9 +++ doc/guides/rel_notes/release_16_

[dpdk-dev] [PATCH v2 0/3] ABI change for RETA, cmdline

2016-03-03 Thread Adrien Mazarguil
ists in > increasing only RDLINE_BUF_SIZE define from 256 to 512 bytes [1]. > > [1] http://dpdk.org/ml/archives/dev/2015-November/027643.html Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH v2 5/5] mlx5: add VLAN insertion offload

2016-03-16 Thread Adrien Mazarguil
On Fri, Mar 11, 2016 at 03:24:43PM +, Bruce Richardson wrote: > On Thu, Mar 03, 2016 at 03:27:59PM +0100, Adrien Mazarguil wrote: > > From: Yaacov Hazan > > > > VLAN insertion is done in software by the PMD by default unless > > CONFIG_RTE_LIBRTE_MLX5_VERB

[dpdk-dev] [PATCH v3 0/5] Implement missing features in mlx5

2016-03-17 Thread Adrien Mazarguil
This patchset adds to mlx5 a few features available in mlx4 (TX from secondary processes) or provided by Verbs (support for HW packet padding, TX VLAN insertion). Release notes and documentation are updated accordingly. Changes in v3: - Removed compilation option for TX VLAN insertion, the

[dpdk-dev] [PATCH v3 1/5] mlx5: add callbacks to support link (up / down) changes

2016-03-17 Thread Adrien Mazarguil
From: Or Ami Burst functions are updated to make sure applications cannot attempt to send/receive after link is brought down. Signed-off-by: Or Ami --- doc/guides/rel_notes/release_16_04.rst | 4 ++ drivers/net/mlx5/mlx5.c| 2 + drivers/net/mlx5/mlx5.h

[dpdk-dev] [PATCH v3 2/5] mlx5: allow operation in secondary processes

2016-03-17 Thread Adrien Mazarguil
From: Or Ami Secondary processes are expected to use queues and other resources allocated by the primary, however Verbs resources can only be shared between processes when inherited through fork(). This limitation can be worked around for TX by configuring separate queues

[dpdk-dev] [PATCH v3 3/5] mlx5: add RX CRC stripping configuration

2016-03-17 Thread Adrien Mazarguil
From: Olga Shern Until now, CRC was always stripped by hardware. This feature can be configured since MLNX_OFED >= 3.2. Signed-off-by: Olga Shern --- doc/guides/nics/mlx5.rst | 2 ++ doc/guides/rel_notes/release_16_04.rst | 6 ++

[dpdk-dev] [PATCH v3 4/5] mlx5: add support for HW packet padding

2016-03-17 Thread Adrien Mazarguil
From: Olga Shern Environment variable MLX5_PMD_ENABLE_PADDING enables HW packet padding in PCI bus transactions. When packet size is cache aligned and CRC stripping is enabled, 4 fewer bytes are written to the PCI bus. Enabling padding makes such packets aligned again. In

[dpdk-dev] [PATCH v3 5/5] mlx5: add VLAN insertion offload

2016-03-17 Thread Adrien Mazarguil
ed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil --- doc/guides/nics/mlx5.rst | 2 + doc/guides/rel_notes/release_16_04.rst | 6 ++ drivers/net/mlx5/Makefile | 5 ++ drivers/net/mlx5/mlx5.c| 12 +++- drivers/net/mlx5/mlx5.h| 1 + d

[dpdk-dev] [PATCH v11 5/8] ethdev: add speed capabilities

2016-03-18 Thread Adrien Mazarguil
EED_40G | > + ETH_LINK_SPEED_50G; > priv_unlock(priv); > } Missing: ETH_LINK_SPEED_100G, ETH_LINK_SPEED_20G and ETH_LINK_SPEED_56G. Same as above, these capabilities actually depend on the adapter type and should be probed. I think ETH_LINK_SPEED_100M should work as well but I can't find it mentioned anywhere, let's leave it out for now. -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration

2016-03-18 Thread Adrien Mazarguil
--- > drivers/net/mlx5/mlx5.h| 1 + > drivers/net/mlx5/mlx5_ethdev.c | 1 + > drivers/net/mlx5/mlx5_rss.c| 7 ++- > drivers/net/mlx5/mlx5_rxq.c| 2 +- > 4 files changed, 5 insertions(+), 6 deletions(-) Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH 2/2] mlx5: fix handling of NULL RSS key

2016-03-18 Thread Adrien Mazarguil
; > Signed-off-by: Nelio Laranjeiro > --- > drivers/net/mlx5/mlx5_rss.c | 6 -- > 1 file changed, 6 deletions(-) Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND

[dpdk-dev] [PATCH 00/10] Fix build errors related to exported headers

2016-04-05 Thread Adrien Mazarguil
GNU printf-like variadic macros as there is no magic keyword for these Adrien Mazarguil (10): lib: add extension keyword to braced-groups within expressions lib: add extension keyword to large enum values lib: use C99 syntax for zero-size arrays lib: add extension keyword to nonstandard

[dpdk-dev] [PATCH 01/10] lib: add extension keyword to braced-groups within expressions

2016-04-05 Thread Adrien Mazarguil
expressions Signed-off-by: Adrien Mazarguil --- lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h | 3 ++- lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h | 3 ++- lib/librte_eal/common/include/arch/x86/rte_memcpy.h| 4 ++-- lib/librte_eal/common/include/arch/x86/rte_vect.h | 6

[dpdk-dev] [PATCH 02/10] lib: add extension keyword to large enum values

2016-04-05 Thread Adrien Mazarguil
to range of `int' Signed-off-by: Adrien Mazarguil --- lib/librte_eal/common/include/rte_memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/common/include/rte_memory.h b/lib/librte_eal/common/include/rte_memory.h index f8dbece..09b5b99 100644 --- a/lib/librte_eal/common

[dpdk-dev] [PATCH 03/10] lib: use C99 syntax for zero-size arrays

2016-04-05 Thread Adrien Mazarguil
the following errors: error: ISO C forbids zero-size array `[...]' Signed-off-by: Adrien Mazarguil --- lib/librte_acl/rte_acl.h | 2 +- lib/librte_cryptodev/rte_cryptodev.h | 2 +- lib/librte_cryptodev/rte_cryptodev_pmd.h

[dpdk-dev] [PATCH 04/10] lib: add extension keyword to nonstandard bit-fields

2016-04-05 Thread Adrien Mazarguil
extension Note: the standard does not require implementations to issue a diagnostic message with these, and such errors do not occur with recent GCC or clang versions. However, GCC 4.7 is still common and using the extension keyword is easier than checking compiler version. Signed-off-by: Adrien

[dpdk-dev] [PATCH 05/10] lib: add extension keyword to structs with no members

2016-04-05 Thread Adrien Mazarguil
-by: Adrien Mazarguil --- lib/librte_mempool/rte_mempool.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 9745bf0..a46e661 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -169,6 +169,7

[dpdk-dev] [PATCH 06/10] lib: add extension keyword to unnamed structs/unions

2016-04-05 Thread Adrien Mazarguil
by default. This commit prevents the following errors: error: ISO C99 doesn't support unnamed structs/unions error: struct has no named members Signed-off-by: Adrien Mazarguil --- lib/librte_cryptodev/rte_crypto.h | 3 +++ lib/librte_cryptodev/rte_crypto_sym.h

[dpdk-dev] [PATCH 07/10] lib: fix missing include dependencies

2016-04-05 Thread Adrien Mazarguil
incomplete type error: `CHAR_BIT' undeclared here (not in a function) error: `struct timespec' declared inside parameter list Signed-off-by: Adrien Mazarguil --- lib/librte_cfgfile/rte_cfgfile.h | 2 ++ lib/librte_cmdline/cmdline.h

[dpdk-dev] [PATCH 08/10] lib: add extension keyword to forward reference to enum types

2016-04-05 Thread Adrien Mazarguil
to `enum' types Signed-off-by: Adrien Mazarguil --- lib/librte_eal/common/include/generic/rte_cpuflags.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_eal/common/include/generic/rte_cpuflags.h b/lib/librte_eal/common/include/generic/rte_cpuflags.h index c1da357..71321f3 100644

[dpdk-dev] [PATCH 09/10] lib: remove named variadic macros in exported headers

2016-04-05 Thread Adrien Mazarguil
__VA_ARGS__ with an extra dummy argument to format strings. This commit prevents the following errors: error: ISO C does not permit named variadic macros Signed-off-by: Adrien Mazarguil --- lib/librte_cryptodev/rte_cryptodev.h | 32 +- lib/librte_cryptodev

<    1   2   3   4   5   >