Skip to contentSkip to conversation

fixes for hns3 PMD

PATCH In review Min Hu (Connor) 2 participants 8 messages Apr 20, 2021 Network drivers

lore
Share & tools
lore
#3 lore raw

PATCH 3/5 net/hns3: fix unchecked function call

In reply to Min Hu (Connor)

In hns3 PMD, as the handler always return 0, the return value of a function 'rte_kvargs_process' no need to be checked. But the API definition has return value, so 'void' could be used to ignore that.

Fixes a124f9e9591b ("net/hns3: add runtime config to select IO burst function")
---
 drivers/net/hns3/hns3_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/hns3/hns3_ethdev.c +3 -3
index b29aab5..60267e1 100644
@@ -7268,11 +7268,11 @@ hns3_parse_devargs(struct rte_eth_dev *dev)
 	if (!kvlist)
 		return;
 
-	rte_kvargs_process(kvlist, HNS3_DEVARG_RX_FUNC_HINT,
+	(void)rte_kvargs_process(kvlist, HNS3_DEVARG_RX_FUNC_HINT,
 			   &hns3_parse_io_hint_func, &rx_func_hint);
-	rte_kvargs_process(kvlist, HNS3_DEVARG_TX_FUNC_HINT,
+	(void)rte_kvargs_process(kvlist, HNS3_DEVARG_TX_FUNC_HINT,
 			   &hns3_parse_io_hint_func, &tx_func_hint);
-	rte_kvargs_process(kvlist, HNS3_DEVARG_DEV_CAPS_MASK,
+	(void)rte_kvargs_process(kvlist, HNS3_DEVARG_DEV_CAPS_MASK,
 			   &hns3_parse_dev_caps_mask, &dev_caps_mask);
 	rte_kvargs_free(kvlist);
 
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/5 net/hns3: fix enum variable used as boolean

In reply to Min Hu (Connor)

params->leaf.cman has enum type which is not isomorphic with boolean type, however it is used as a boolean expression.

This patch fixed it.

Fixes c09c7847d892 ("net/hns3: support traffic management")
---
 drivers/net/hns3/hns3_tm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hns3/hns3_tm.c +1 -1
index 165d1fb..aae4970 100644
@@ -385,7 +385,7 @@ hns3_tm_leaf_node_param_check(struct rte_eth_dev *dev __rte_unused,
 		return -EINVAL;
 	}
 
-	if (params->leaf.cman) {
+	if (params->leaf.cman != RTE_TM_CMAN_TAIL_DROP) {
 		error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS_CMAN;
 		error->message = "congestion management not supported";
 		return -EINVAL;
Signature · 1 line
2.7.4
#0 lore raw

cover fixes for hns3 PMD

This patch contains three coding fixes and two doc fixes.

Min Hu (Connor) (5):
net/hns3: delete unused macro
net/hns3: fix enum variable used as boolean
net/hns3: fix unchecked function call
doc: update hns3 feature list
doc: fix Rx burst function doc

 doc/guides/nics/features/hns3.ini | 1 +
 doc/guides/nics/hns3.rst          | 2 +-
 drivers/net/hns3/hns3_ethdev.c    | 6 +++---
 drivers/net/hns3/hns3_rxtx.h      | 1 -
 drivers/net/hns3/hns3_tm.c        | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/5 net/hns3: delete unused macro

'HNS3_RXD_LKBK_B' was defined in previous versions but no used. This patch deleted it.

Fixes bba636698316 ("net/hns3: support Rx/Tx and related operations")
---
 drivers/net/hns3/hns3_rxtx.h | 1 -
 1 file changed, 1 deletion(-)
drivers/net/hns3/hns3_rxtx.h +0 -1
index f7b457b..703c4b7 100644
@@ -106,7 +106,6 @@
 #define HNS3_RXD_L3L4P_B			11
 
 #define HNS3_RXD_TS_VLD_B			14
-#define HNS3_RXD_LKBK_B				15
 #define HNS3_RXD_GRO_SIZE_S			16
 #define HNS3_RXD_GRO_SIZE_M			(0x3fff << HNS3_RXD_GRO_SIZE_S)
 
Signature · 1 line
2.7.4
#4 lore raw

PATCH 4/5 doc: update hns3 feature list

In reply to Min Hu (Connor)

Hns3 PMD has supported SR-IOV in 19.11 version.
This patch added feature description in hns3.ini.

---
 doc/guides/nics/features/hns3.ini | 1 +
 1 file changed, 1 insertion(+)
doc/guides/nics/features/hns3.ini +1 -0
index 0f89c60..2a46dde 100644
@@ -25,6 +25,7 @@ Multicast MAC filter = Y
 RSS hash             = Y
 RSS key update       = Y
 RSS reta update      = Y
+SR-IOV               = Y
 DCB                  = Y
 VLAN filter          = Y
 Flow control         = Y
Signature · 1 line
2.7.4
#6 lore raw

PATCH 5/5 doc: fix Rx burst function doc

In reply to Min Hu (Connor)

The patch 'net/hns3: rename Rx burst function' changed `simple' Rx function name from 'scalar' to 'scalar simple', but doc ignored that.

This patch fixed it.

Fixes aa5baf47e1a3 ("net/hns3: rename Rx burst function")
---
 doc/guides/nics/hns3.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
doc/guides/nics/hns3.rst +1 -1
index fa45721..52d6718 100644
@@ -59,7 +59,7 @@ Runtime Config Options
   ``sve``, if supported use the ``sve`` Rx function which indicates the
   sve algorithm.
   ``simple``, if supported use the ``simple`` Rx function which indicates
-  the scalar algorithm.
+  the scalar simple algorithm.
   ``common``, if supported use the ``common`` Rx function which indicates
   the scalar scattered algorithm.
 
Signature · 1 line
2.7.4
#5 lore raw

Re: [dpdk-dev] [PATCH 4/5] doc: update hns3 feature list

In reply to Min Hu (Connor)
Quoted 3 lines · Min Hu (Connor)

Hns3 PMD has supported SR-IOV in 19.11 version.
This patch added feature description in hns3.ini.

Can you please add the commit id of the patch that adds the actual support? It can be added as fixes tag.

Quoted 18 lines
---
  doc/guides/nics/features/hns3.ini | 1 +
  1 file changed, 1 insertion(+)
doc/guides/nics/features/hns3.ini +1 -0
index 0f89c60..2a46dde 100644
@@ -25,6 +25,7 @@ Multicast MAC filter = Y
  RSS hash             = Y
  RSS key update       = Y
  RSS reta update      = Y
+SR-IOV               = Y
  DCB                  = Y
  VLAN filter          = Y
  Flow control         = Y
#7 lore raw
In reply to Min Hu (Connor)
Quoted 8 lines · Min Hu (Connor)

This patch contains three coding fixes and two doc fixes.

Min Hu (Connor) (5):
net/hns3: delete unused macro
net/hns3: fix enum variable used as boolean
net/hns3: fix unchecked function call
doc: update hns3 feature list
doc: fix Rx burst function doc

Except from 4/5,
Series applied to dpdk-next-net/main, thanks.

4/5 can be sent separately with commit log update.