From patchwork Fri Nov 1 13:36:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wangxiaoyun (Cloud)" X-Patchwork-Id: 62309 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4C6FA00BE; Fri, 1 Nov 2019 14:21:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB2381C1B7; Fri, 1 Nov 2019 14:21:10 +0100 (CET) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id B92A21C1AC for ; Fri, 1 Nov 2019 14:21:09 +0100 (CET) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 823DAB37478B5BFBD474 for ; Fri, 1 Nov 2019 21:21:03 +0800 (CST) Received: from tester.localdomain (10.175.119.39) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 1 Nov 2019 21:20:53 +0800 From: Xiaoyun wang To: CC: , , , , , , , Xiaoyun wang Date: Fri, 1 Nov 2019 21:36:42 +0800 Message-ID: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v5 1/5] net/hinic/base: fix code style check issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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); From patchwork Fri Nov 1 13:36:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wangxiaoyun (Cloud)" X-Patchwork-Id: 62310 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E60CFA00BE; Fri, 1 Nov 2019 14:21:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB06E1BFBD; Fri, 1 Nov 2019 14:21:58 +0100 (CET) Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id 592181BF1B for ; Fri, 1 Nov 2019 14:21:57 +0100 (CET) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3B6C25DB6E733830041C for ; Fri, 1 Nov 2019 21:21:54 +0800 (CST) Received: from tester.localdomain (10.175.119.39) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 1 Nov 2019 21:21:47 +0800 From: Xiaoyun wang To: CC: , , , , , , , Xiaoyun wang Date: Fri, 1 Nov 2019 21:36:43 +0800 Message-ID: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v5 2/5] net/hinic: fix offload info calculating problem for TSO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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; From patchwork Fri Nov 1 13:36:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wangxiaoyun (Cloud)" X-Patchwork-Id: 62311 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A774BA00BE; Fri, 1 Nov 2019 14:22:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8026F1D483; Fri, 1 Nov 2019 14:22:27 +0100 (CET) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 7C2FE1BFC1 for ; Fri, 1 Nov 2019 14:22:25 +0100 (CET) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A1069123ECD5E23E8F78 for ; Fri, 1 Nov 2019 21:22:24 +0800 (CST) Received: from tester.localdomain (10.175.119.39) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 1 Nov 2019 21:22:17 +0800 From: Xiaoyun wang To: CC: , , , , , , , Xiaoyun wang Date: Fri, 1 Nov 2019 21:36:44 +0800 Message-ID: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v5 3/5] net/hinic: optimize mbuf alloc function with initialized X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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); From patchwork Fri Nov 1 13:36:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wangxiaoyun (Cloud)" X-Patchwork-Id: 62312 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81ED4A00BE; Fri, 1 Nov 2019 14:23:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5A2F31BFC1; Fri, 1 Nov 2019 14:23:02 +0100 (CET) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 049E21BFBD for ; Fri, 1 Nov 2019 14:23:01 +0100 (CET) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 25D354BACB3C60142C6D for ; Fri, 1 Nov 2019 21:23:00 +0800 (CST) Received: from tester.localdomain (10.175.119.39) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 1 Nov 2019 21:22:51 +0800 From: Xiaoyun wang To: CC: , , , , , , , Xiaoyun wang Date: Fri, 1 Nov 2019 21:36:45 +0800 Message-ID: <01aaf8b7007d5c8f7ed65396b71638e87ac9fd87.1572613507.git.cloud.wangxiaoyun@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v5 4/5] net/hinic: remove Flow Director feature from doc files X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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.** From patchwork Fri Nov 1 13:36:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wangxiaoyun (Cloud)" X-Patchwork-Id: 62313 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8566BA00BE; Fri, 1 Nov 2019 14:23:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5CEC41BFC4; Fri, 1 Nov 2019 14:23:38 +0100 (CET) Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id A20321BFBD for ; Fri, 1 Nov 2019 14:23:35 +0100 (CET) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 92E962AA6BAF6A821E3 for ; Fri, 1 Nov 2019 21:23:30 +0800 (CST) Received: from tester.localdomain (10.175.119.39) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 1 Nov 2019 21:23:23 +0800 From: Xiaoyun wang To: CC: , , , , , , , Xiaoyun wang Date: Fri, 1 Nov 2019 21:36:46 +0800 Message-ID: <20d0a1f428a842e560550417c92df0e3ace4cd52.1572613507.git.cloud.wangxiaoyun@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v5 5/5] net/hinic: remove Free Tx mbuf on demand from hinic.ini X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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