DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver
@ 2019-11-01 13:36 Xiaoyun wang
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 1/5] net/hinic/base: fix code style check issue Xiaoyun wang
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Xiaoyun wang @ 2019-11-01 13:36 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, zhouguoyang, wulike1, luoxianjun, shahar.belkar,
	tanya.brokhman, xuanziyang2, Xiaoyun wang

This patch fixes code style check issue, offload info calculating problem 
for TSO offload. Replace mbuf alloc function with initialized, remove
Flow Director feature from doc files and add Flow API feature to
hinic.ini, Remove Free Tx mbuf on demand from hinic.ini.

--
v4->v5:
  - Fix code style check issue
  - Fix offload info calculating problem for TSO
  - Replace mbuf alloc function with initialized
  - Remove Flow Director feature from doc files
  - Remove Free Tx mbuf on demand from hinic.ini

v3->v4:
  - Fix receive performance code review comments
  - Fix 32-bit build errs for mbox logs
  - Modify skb description as mbuf
 
v2->v3:
  - Split hinic.ini and hinic.rst to related feature patches
  - Add min_mtu & max_mtu initialization for hinic_dev_infos_get
  - Fix fdir config patch with net/hinic/base
  - Split link patch into link and fw version getting 2 patches
  - Update pmd doc files to new next version 
  - Add comments for cover letter patch
  - Add rxq & txq info getting interfaces
  - Fix load intrinsics for receiving packets
  
v1->v2:
  - Fix RSS bugs for vxlan packets inner type
  - Add comments for new added func interface
  - Fix code review comments from patch v1
  - Fix code style problems
  - Remove ceq interfaces and definitions that not used
  - Fix aeq init bugs, firstly alloc aeq resource, then set aeq ctrl len
  - Fix bar map bugs for VF Page size larger than PF
  - Modify link state set, add enable or disable fiber in tx direction 
  - Fix mbox and mgmt channel sync lock mechanism to reduce CPU usage
  - Fix FDIR bugs for VRRP packets
  - Fit ABI changes from dpdk lib

v1:
  - Support SR-IOV function
  - Support FLOW API for packet filter
  - Support allmulticast mode
  - Support MTU set
  - Support unicast and multicast MAC set
  - Support setting link down and up
  - Support get firmware version
  - Support inner L3 checksum offload
  - Support LRO offload
  - Add hinic PMD doc files

Xiaoyun wang (5):
  net/hinic/base: fix code style check issue
  net/hinic: fix offload info calculating problem for TSO
  net/hinic: optimize mbuf alloc function with initialized
  net/hinic: remove Flow Director feature from doc files
  net/hinic: remove Free Tx mbuf on demand from hinic.ini

 doc/guides/nics/features/hinic.ini      | 3 +--
 doc/guides/nics/hinic.rst               | 2 +-
 doc/guides/rel_notes/release_19_11.rst  | 2 +-
 drivers/net/hinic/base/hinic_pmd_mbox.c | 7 +++----
 drivers/net/hinic/hinic_pmd_rx.c        | 7 ++++---
 drivers/net/hinic/hinic_pmd_tx.c        | 3 ++-
 6 files changed, 12 insertions(+), 12 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v5 1/5] net/hinic/base: fix code style check issue
  2019-11-01 13:36 [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Xiaoyun wang
@ 2019-11-01 13:36 ` Xiaoyun wang
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 2/5] net/hinic: fix offload info calculating problem for TSO Xiaoyun wang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Xiaoyun wang @ 2019-11-01 13:36 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, zhouguoyang, wulike1, luoxianjun, shahar.belkar,
	tanya.brokhman, xuanziyang2, Xiaoyun wang

This patch fixs the code style check issue for MACRO_ARG_REUSE.

Fixes: b8582d051af1 ("net/hinic/base: add HW interfaces for SR-IOV")
Signed-off-by: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_mbox.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.c b/drivers/net/hinic/base/hinic_pmd_mbox.c
index bdb94e9..3d3c1bc 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.c
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.c
@@ -131,11 +131,9 @@ enum hinic_mbox_tx_status {
 #define MBOX_RESPONSE_ERROR		0x1
 #define MBOX_MSG_ID_MASK		0xFF
 #define MBOX_MSG_ID(func_to_func)	((func_to_func)->send_msg_id)
-#define MBOX_MSG_ID_INC(func_to_func)	(MBOX_MSG_ID(func_to_func) =	\
-			(MBOX_MSG_ID(func_to_func) + 1) & MBOX_MSG_ID_MASK)
 
 enum hinic_hwif_direction_type {
-	/* driver send msg to up or up send msg to drier*/
+	/* driver send msg to up or up send msg to driver*/
 	HINIC_HWIF_DIRECT_SEND = 0,
 	/* after driver/up send msg to each other, then up/driver ack the msg */
 	HINIC_HWIF_RESPONSE,
@@ -690,7 +688,8 @@ static int hinic_mbox_to_func(struct hinic_mbox_func_to_func *func_to_func,
 	if (err)
 		return err;
 
-	msg_info.msg_id = MBOX_MSG_ID_INC(func_to_func);
+	msg_info.msg_id = (MBOX_MSG_ID(func_to_func) + 1) & MBOX_MSG_ID_MASK;
+	MBOX_MSG_ID(func_to_func) = msg_info.msg_id;
 
 	set_mbox_to_func_event(func_to_func, EVENT_START);
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v5 2/5] net/hinic: fix offload info calculating problem for TSO
  2019-11-01 13:36 [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Xiaoyun wang
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 1/5] net/hinic/base: fix code style check issue Xiaoyun wang
@ 2019-11-01 13:36 ` Xiaoyun wang
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 3/5] net/hinic: optimize mbuf alloc function with initialized Xiaoyun wang
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Xiaoyun wang @ 2019-11-01 13:36 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, zhouguoyang, wulike1, luoxianjun, shahar.belkar,
	tanya.brokhman, xuanziyang2, Xiaoyun wang

For VXLAN TSO offload, pmd driver calcutes offload info
err due to the wrong branch, which can cause hardware failed.

Fixes: c3ba1f0f20cd ("net/hinic: support inner L3 checksum offload")
Signed-off-by: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index bdbb0f4..985540a 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -811,7 +811,8 @@ static inline void hinic_xmit_mbuf_cleanup(struct hinic_txq *txq)
 
 	if (ol_flags & PKT_TX_TUNNEL_VXLAN) {
 		if ((ol_flags & PKT_TX_OUTER_IP_CKSUM) ||
-		    (ol_flags & PKT_TX_OUTER_IPV6)) {
+		    (ol_flags & PKT_TX_OUTER_IPV6) ||
+		    (ol_flags & PKT_TX_TCP_SEG)) {
 			inner_l3_offset = m->l2_len + m->outer_l2_len +
 				m->outer_l3_len;
 			off_info->outer_l2_len = m->outer_l2_len;
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v5 3/5] net/hinic: optimize mbuf alloc function with initialized
  2019-11-01 13:36 [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Xiaoyun wang
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 1/5] net/hinic/base: fix code style check issue Xiaoyun wang
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 2/5] net/hinic: fix offload info calculating problem for TSO Xiaoyun wang
@ 2019-11-01 13:36 ` Xiaoyun wang
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 4/5] net/hinic: remove Flow Director feature from doc files Xiaoyun wang
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Xiaoyun wang @ 2019-11-01 13:36 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, zhouguoyang, wulike1, luoxianjun, shahar.belkar,
	tanya.brokhman, xuanziyang2, Xiaoyun wang

When port start, driver needs to alloc mbuf resource to fill rx
queue bd section, replace rte_mbuf_raw_alloc function to
rte_pktmbuf_alloc_bulk with initialized mbuf structure to aviod
some structures being used without initialization.

Signed-off-by: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/hinic_pmd_rx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hinic/hinic_pmd_rx.c b/drivers/net/hinic/hinic_pmd_rx.c
index 743bae9..f865f2f 100644
--- a/drivers/net/hinic/hinic_pmd_rx.c
+++ b/drivers/net/hinic/hinic_pmd_rx.c
@@ -853,10 +853,11 @@ static inline u32 hinic_rx_alloc_mbuf_bulk(struct hinic_rxq *rxq,
 static struct rte_mbuf *hinic_rx_alloc_mbuf(struct hinic_rxq *rxq,
 					dma_addr_t *dma_addr)
 {
-	struct rte_mbuf *mbuf;
+	struct rte_mbuf *mbuf = NULL;
+	int rc;
 
-	mbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
-	if (unlikely(!mbuf))
+	rc = rte_pktmbuf_alloc_bulk(rxq->mb_pool, &mbuf, 1);
+	if (unlikely(rc != HINIC_OK))
 		return NULL;
 
 	*dma_addr = rte_mbuf_data_iova_default(mbuf);
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v5 4/5] net/hinic: remove Flow Director feature from doc files
  2019-11-01 13:36 [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Xiaoyun wang
                   ` (2 preceding siblings ...)
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 3/5] net/hinic: optimize mbuf alloc function with initialized Xiaoyun wang
@ 2019-11-01 13:36 ` Xiaoyun wang
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 5/5] net/hinic: remove Free Tx mbuf on demand from hinic.ini Xiaoyun wang
  2019-11-07  9:29 ` [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Ferruh Yigit
  5 siblings, 0 replies; 7+ messages in thread
From: Xiaoyun wang @ 2019-11-01 13:36 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, zhouguoyang, wulike1, luoxianjun, shahar.belkar,
	tanya.brokhman, xuanziyang2, Xiaoyun wang

This patch removes deprecated feature Flow Director from hinic.ini,
hinic.rst and release_19_11.rst, because the feature has been
removed from the feature list in the following commit:
Commit 030febb6642c ("doc: remove deprecated ethdev features"), and
adds Flow API feature which is for generic filtering to doc files.

Signed-off-by: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
---
 doc/guides/nics/features/hinic.ini     | 2 +-
 doc/guides/nics/hinic.rst              | 2 +-
 doc/guides/rel_notes/release_19_11.rst | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/features/hinic.ini b/doc/guides/nics/features/hinic.ini
index dc02b4b..05cf1fd 100644
--- a/doc/guides/nics/features/hinic.ini
+++ b/doc/guides/nics/features/hinic.ini
@@ -33,7 +33,7 @@ Inner L4 checksum    = Y
 Basic stats          = Y
 Extended stats       = Y
 Stats per queue      = Y
-Flow director        = Y
+Flow API             = Y
 Flow control         = Y
 FW version           = Y
 Multiprocess aware   = Y
diff --git a/doc/guides/nics/hinic.rst b/doc/guides/nics/hinic.rst
index 9fb80d4..f765060 100644
--- a/doc/guides/nics/hinic.rst
+++ b/doc/guides/nics/hinic.rst
@@ -30,7 +30,7 @@ Features
 - MTU update
 - Unicast MAC filter
 - Multicast MAC filter
-- Flow director
+- Flow API
 - Set Link down or up
 - FW version
 - LRO
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index f96ac38..675dee5 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -153,7 +153,7 @@ New Features
   * Enabled SR-IOV - Partially supported at this point, VFIO only.
   * Supported VLAN filter and VLAN offload.
   * Supported Unicast MAC filter and Multicast MAC filter.
-  * Supported Flow director for LACP, VRRP, BGP and so on.
+  * Supported Flow API for LACP, VRRP, BGP and so on.
   * Supported FW version get.
 
 * **Updated Mellanox mlx5 driver.**
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v5 5/5] net/hinic: remove Free Tx mbuf on demand from hinic.ini
  2019-11-01 13:36 [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Xiaoyun wang
                   ` (3 preceding siblings ...)
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 4/5] net/hinic: remove Flow Director feature from doc files Xiaoyun wang
@ 2019-11-01 13:36 ` Xiaoyun wang
  2019-11-07  9:29 ` [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Ferruh Yigit
  5 siblings, 0 replies; 7+ messages in thread
From: Xiaoyun wang @ 2019-11-01 13:36 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, zhouguoyang, wulike1, luoxianjun, shahar.belkar,
	tanya.brokhman, xuanziyang2, Xiaoyun wang

This patch removes feature Free Tx mbuf on demand from hinic.ini
because pmd driver does not support this feature.

Fixes: 1d09792a270a ("net/hinic: add build and doc files")
Signed-off-by: Xiaoyun wang <cloud.wangxiaoyun@huawei.com>
---
 doc/guides/nics/features/hinic.ini | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/guides/nics/features/hinic.ini b/doc/guides/nics/features/hinic.ini
index 05cf1fd..7d431e8 100644
--- a/doc/guides/nics/features/hinic.ini
+++ b/doc/guides/nics/features/hinic.ini
@@ -7,7 +7,6 @@
 Speed capabilities   = Y
 Link status          = Y
 Link status event    = Y
-Free Tx mbuf on demand = Y
 Queue start/stop     = Y
 MTU update           = Y
 Jumbo frame          = Y
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver
  2019-11-01 13:36 [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Xiaoyun wang
                   ` (4 preceding siblings ...)
  2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 5/5] net/hinic: remove Free Tx mbuf on demand from hinic.ini Xiaoyun wang
@ 2019-11-07  9:29 ` Ferruh Yigit
  5 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2019-11-07  9:29 UTC (permalink / raw)
  To: Xiaoyun wang, dev
  Cc: zhouguoyang, wulike1, luoxianjun, shahar.belkar, tanya.brokhman,
	xuanziyang2

On 11/1/2019 1:36 PM, Xiaoyun wang wrote:
> This patch fixes code style check issue, offload info calculating problem 
> for TSO offload. Replace mbuf alloc function with initialized, remove
> Flow Director feature from doc files and add Flow API feature to
> hinic.ini, Remove Free Tx mbuf on demand from hinic.ini.
> 
> --
> v4->v5:
>   - Fix code style check issue
>   - Fix offload info calculating problem for TSO
>   - Replace mbuf alloc function with initialized
>   - Remove Flow Director feature from doc files
>   - Remove Free Tx mbuf on demand from hinic.ini
> 
> v3->v4:
>   - Fix receive performance code review comments
>   - Fix 32-bit build errs for mbox logs
>   - Modify skb description as mbuf
>  
> v2->v3:
>   - Split hinic.ini and hinic.rst to related feature patches
>   - Add min_mtu & max_mtu initialization for hinic_dev_infos_get
>   - Fix fdir config patch with net/hinic/base
>   - Split link patch into link and fw version getting 2 patches
>   - Update pmd doc files to new next version 
>   - Add comments for cover letter patch
>   - Add rxq & txq info getting interfaces
>   - Fix load intrinsics for receiving packets
>   
> v1->v2:
>   - Fix RSS bugs for vxlan packets inner type
>   - Add comments for new added func interface
>   - Fix code review comments from patch v1
>   - Fix code style problems
>   - Remove ceq interfaces and definitions that not used
>   - Fix aeq init bugs, firstly alloc aeq resource, then set aeq ctrl len
>   - Fix bar map bugs for VF Page size larger than PF
>   - Modify link state set, add enable or disable fiber in tx direction 
>   - Fix mbox and mgmt channel sync lock mechanism to reduce CPU usage
>   - Fix FDIR bugs for VRRP packets
>   - Fit ABI changes from dpdk lib
> 
> v1:
>   - Support SR-IOV function
>   - Support FLOW API for packet filter
>   - Support allmulticast mode
>   - Support MTU set
>   - Support unicast and multicast MAC set
>   - Support setting link down and up
>   - Support get firmware version
>   - Support inner L3 checksum offload
>   - Support LRO offload
>   - Add hinic PMD doc files
> 
> Xiaoyun wang (5):
>   net/hinic/base: fix code style check issue
>   net/hinic: fix offload info calculating problem for TSO
>   net/hinic: optimize mbuf alloc function with initialized
>   net/hinic: remove Flow Director feature from doc files
>   net/hinic: remove Free Tx mbuf on demand from hinic.ini

Series applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-07  9:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-01 13:36 [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Xiaoyun wang
2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 1/5] net/hinic/base: fix code style check issue Xiaoyun wang
2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 2/5] net/hinic: fix offload info calculating problem for TSO Xiaoyun wang
2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 3/5] net/hinic: optimize mbuf alloc function with initialized Xiaoyun wang
2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 4/5] net/hinic: remove Flow Director feature from doc files Xiaoyun wang
2019-11-01 13:36 ` [dpdk-dev] [PATCH v5 5/5] net/hinic: remove Free Tx mbuf on demand from hinic.ini Xiaoyun wang
2019-11-07  9:29 ` [dpdk-dev] [PATCH v5 0/5] Some fixes for hinic PMD driver Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).