From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 04BE8A0527; Sat, 25 Jul 2020 05:49:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F26E1C067; Sat, 25 Jul 2020 05:48:59 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id 373661C05C for ; Sat, 25 Jul 2020 05:48:57 +0200 (CEST) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id BBBBC96503FB9C3A9A33; Sat, 25 Jul 2020 11:48: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.487.0; Sat, 25 Jul 2020 11:48:47 +0800 From: Xiaoyun wang To: CC: , , , , , , , , , , Xiaoyun wang Date: Sat, 25 Jul 2020 11:48:24 +0800 Message-ID: <1708e8d459d3888316a70d4eabfc3172c67eb0e9.1595648149.git.cloud.wangxiaoyun@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v1 3/4] net/hinic/base: modify vhd type for SDI 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 ovs offload scenario, when fw processes the virtio header, there is no need to offset; and for standard card scenarios, fw does not care about the vhd_type parameter, so in order to be compatible with the two scenarios, use 0 offset instead. Signed-off-by: Xiaoyun wang --- drivers/net/hinic/base/hinic_pmd_nicio.c | 2 +- drivers/net/hinic/base/hinic_pmd_nicio.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c index 2914e99..576fe59 100644 --- a/drivers/net/hinic/base/hinic_pmd_nicio.c +++ b/drivers/net/hinic/base/hinic_pmd_nicio.c @@ -578,7 +578,7 @@ int hinic_init_qp_ctxts(struct hinic_hwdev *hwdev) rx_buf_sz = nic_io->rq_buf_size; /* update rx buf size to function table */ - err = hinic_set_rx_vhd_mode(hwdev, 0, rx_buf_sz); + err = hinic_set_rx_vhd_mode(hwdev, HINIC_VHD_TYPE_0B, rx_buf_sz); if (err) { PMD_DRV_LOG(ERR, "Set rx vhd mode failed, rc: %d", err); return err; diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.h b/drivers/net/hinic/base/hinic_pmd_nicio.h index 9a487d0..600c073 100644 --- a/drivers/net/hinic/base/hinic_pmd_nicio.h +++ b/drivers/net/hinic/base/hinic_pmd_nicio.h @@ -8,6 +8,11 @@ #define RX_BUF_LEN_16K 16384 #define RX_BUF_LEN_1_5K 1536 +/* vhd type */ +#define HINIC_VHD_TYPE_0B 2 +#define HINIC_VHD_TYPE_10B 1 +#define HINIC_VHD_TYPE_12B 0 + #define HINIC_Q_CTXT_MAX 42 /* performance: ci addr RTE_CACHE_SIZE(64B) alignment */ -- 1.8.3.1