Some fixes for hinic PMD driver
v5 cover Some fixes for hinic PMD driver
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(-)
Signature · 1 line
1.8.3.1
PATCH v5 1/5 net/hinic/base: fix code style check issue
This patch fixs the code style check issue for MACRO_ARG_REUSE.
--- drivers/net/hinic/base/hinic_pmd_mbox.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/hinic/base/hinic_pmd_mbox.c +3 -4
@@ -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 );
Signature · 1 line
1.8.3.1
PATCH v5 2/5 net/hinic: fix offload info calculating problem for TSO
In reply to Xiaoyun wangFor VXLAN TSO offload, pmd driver calcutes offload info err due to the wrong branch, which can cause hardware failed.
--- drivers/net/hinic/hinic_pmd_tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/hinic/hinic_pmd_tx.c +2 -1
@@ -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;
Signature · 1 line
1.8.3.1
PATCH v5 3/5 net/hinic: optimize mbuf alloc function with initialized
In reply to Xiaoyun wangWhen 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.
--- drivers/net/hinic/hinic_pmd_rx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/hinic/hinic_pmd_rx.c +4 -3
@@ -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);
Signature · 1 line
1.8.3.1
PATCH v5 4/5 net/hinic: remove Flow Director feature from doc files
In reply to Xiaoyun wangThis 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.
--- 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(-)
doc/guides/nics/features/hinic.ini +1 -1
@@ -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
doc/guides/nics/hinic.rst +1 -1
@@ -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
doc/guides/rel_notes/release_19_11.rst +1 -1
@@ -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.**
Signature · 1 line
1.8.3.1
PATCH v5 5/5 net/hinic: remove Free Tx mbuf on demand from hinic.ini
In reply to Xiaoyun wangThis patch removes feature Free Tx mbuf on demand from hinic.ini because pmd driver does not support this feature.
--- doc/guides/nics/features/hinic.ini | 1 - 1 file changed, 1 deletion(-)
doc/guides/nics/features/hinic.ini +0 -1
@@ -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
Signature · 1 line
1.8.3.1
Quoted 53 lines · 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 andhinic.rstto related feature patches
- Addmin_mtu&max_mtuinitialization forhinic_dev_infos_get
- Fix fdir config patch withnet/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 libv1:
- 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
Quoted 6 lines
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.