From patchwork Fri Sep 25 05:37:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenbo Xia X-Patchwork-Id: 78782 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 8C01EA04C0; Fri, 25 Sep 2020 07:41:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 719161E4C0; Fri, 25 Sep 2020 07:41:03 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id E6EC81DE7E; Fri, 25 Sep 2020 07:41:00 +0200 (CEST) IronPort-SDR: rLSDGZyqlaDFb2rHML/gvvuFT7qkhaM2JCDLRj0+tmQF+4UuVOhyxTPU4HO426qAA0FfgnB/O0 g9mWdJr9XcRg== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="149203075" X-IronPort-AV: E=Sophos;i="5.77,300,1596524400"; d="scan'208";a="149203075" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 22:40:59 -0700 IronPort-SDR: KmKXmGyhVIfAsxFvlg51hsAlpvUWo9/TQWD+Bcve5Z7cu02IDOwq/HWgfVGqMoGIULFk6zUc2C t8qpufKObQgw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,300,1596524400"; d="scan'208";a="323242849" Received: from npg-dpdk-virtio-xiachenbo-nw.sh.intel.com ([10.67.119.123]) by orsmga002.jf.intel.com with ESMTP; 24 Sep 2020 22:40:51 -0700 From: Chenbo Xia To: dev@dpdk.org Cc: shepard.siegel@atomicrules.com, ed.czeck@atomicrules.com, john.miller@atomicrules.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, qiming.yang@intel.com, qi.z.zhang@intel.com, rmody@marvell.com, shshaikh@marvell.com, sbhosle@broadcom.com, kishore.padmanabha@broadcom.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, xiaoyun.li@intel.com, ferruh.yigit@intel.com, jingjing.wu@intel.com, irusskikh@marvell.com, wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com, nikhil.rao@intel.com, konstantin.ananyev@intel.com, jerin.jacob@caviumnetworks.com, marko.kovacevic@intel.com, orika@nvidia.com, bruce.richardson@intel.com, radu.nicolau@intel.com, akhil.goyal@nxp.com, tomasz.kantecki@intel.com, skori@marvell.com, pbhagavatula@marvell.com, john.mcnamara@intel.com, stable@dpdk.org Date: Fri, 25 Sep 2020 13:37:00 +0800 Message-Id: <20200925053702.80367-1-chenbo.xia@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200804174147.64473-1-chenbo.xia@intel.com> References: <20200804174147.64473-1-chenbo.xia@intel.com> Subject: [dpdk-dev] [PATCH v2 1/3] net: fix variable size of ethdev port id 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" The ethdev port id should be 16 bits now. This patch changes the variable size of port id in some net drivers from 8 bits to 16 bits. Fixes: cf18d4def295 ("net/ark: provide API for hardware modules UDM and DDM") Fixes: 09b23f8b9df6 ("net/bnxt: fix port stop process and cleanup resources") Fixes: 769de16872ab ("net/bnxt: fix port default rule create/destroy") Fixes: 50370662b727 ("net/ice: support device and queue ops") Fixes: a50d7cbbdad7 ("net/qede: support registers dump") Cc: stable@dpdk.org Signed-off-by: Chenbo Xia --- drivers/net/ark/ark_udm.h | 2 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 6 +++--- drivers/net/ice/ice_rxtx.h | 4 ++-- drivers/net/qede/base/bcm_osal.h | 2 +- drivers/net/qede/qede_regs.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/ark/ark_udm.h b/drivers/net/ark/ark_udm.h index 5846c825b..32eb82faa 100644 --- a/drivers/net/ark/ark_udm.h +++ b/drivers/net/ark/ark_udm.h @@ -19,7 +19,7 @@ struct ark_rx_meta { uint64_t timestamp; uint64_t user_data; - uint8_t port; + uint16_t port; uint8_t dst_queue; uint16_t pkt_len; }; diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c index e8927f629..3d148029e 100644 --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c @@ -646,7 +646,7 @@ static void bnxt_ulp_destroy_vfr_default_rules(struct bnxt *bp, bool global) { struct bnxt_ulp_vfr_rule_info *info; - uint8_t port_id; + uint16_t port_id; struct rte_eth_dev *vfr_eth_dev; struct bnxt_vf_representor *vfr_bp; diff --git a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c index 2d0c3bccc..fdd2692f6 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c +++ b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c @@ -402,7 +402,7 @@ void bnxt_ulp_destroy_df_rules(struct bnxt *bp, bool global) { struct bnxt_ulp_df_rule_info *info; - uint8_t port_id; + uint16_t port_id; if (!BNXT_TRUFLOW_EN(bp) || BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev)) @@ -466,7 +466,7 @@ int32_t bnxt_ulp_create_df_rules(struct bnxt *bp) { struct bnxt_ulp_df_rule_info *info; - uint8_t port_id; + uint16_t port_id; int rc; if (!BNXT_TRUFLOW_EN(bp) || @@ -540,7 +540,7 @@ bnxt_ulp_create_vfr_default_rules(struct rte_eth_dev *vfr_ethdev) struct rte_eth_dev *parent_dev = vfr->parent_dev; struct bnxt *bp = parent_dev->data->dev_private; uint16_t vfr_port_id = vfr_ethdev->data->port_id; - uint8_t port_id; + uint16_t port_id; int rc; if (!bp || !BNXT_TRUFLOW_EN(bp)) diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h index 9fa57b3b2..e4309b8b9 100644 --- a/drivers/net/ice/ice_rxtx.h +++ b/drivers/net/ice/ice_rxtx.h @@ -68,7 +68,7 @@ struct ice_rx_queue { uint16_t rxrearm_start; /**< the idx we start the re-arming from */ uint64_t mbuf_initializer; /**< value to init mbufs */ - uint8_t port_id; /* device port ID */ + uint16_t port_id; /* device port ID */ uint8_t crc_len; /* 0 if CRC stripped, 4 otherwise */ uint8_t fdir_enabled; /* 0 if FDIR disabled, 1 when enabled */ uint16_t queue_id; /* RX queue index */ @@ -112,7 +112,7 @@ struct ice_tx_queue { uint8_t pthresh; /**< Prefetch threshold register. */ uint8_t hthresh; /**< Host threshold register. */ uint8_t wthresh; /**< Write-back threshold reg. */ - uint8_t port_id; /* Device port identifier. */ + uint16_t port_id; /* Device port identifier. */ uint16_t queue_id; /* TX queue index. */ uint32_t q_teid; /* TX schedule node id. */ uint16_t reg_idx; diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h index 5d4df5907..814000039 100644 --- a/drivers/net/qede/base/bcm_osal.h +++ b/drivers/net/qede/base/bcm_osal.h @@ -372,7 +372,7 @@ void qede_hw_err_notify(struct ecore_hwfn *p_hwfn, /* TODO: */ #define OSAL_SCHEDULE_RECOVERY_HANDLER(hwfn) nothing -int qede_save_fw_dump(uint8_t port_id); +int qede_save_fw_dump(uint16_t port_id); #define OSAL_SAVE_FW_DUMP(port_id) qede_save_fw_dump(port_id) diff --git a/drivers/net/qede/qede_regs.c b/drivers/net/qede/qede_regs.c index 1f2dbc6e7..d2ea1c910 100644 --- a/drivers/net/qede/qede_regs.c +++ b/drivers/net/qede/qede_regs.c @@ -242,7 +242,7 @@ qede_write_fwdump(const char *dump_file, void *dump, size_t len) } int -qede_save_fw_dump(uint8_t port_id) +qede_save_fw_dump(uint16_t port_id) { struct rte_eth_dev *eth_dev = &rte_eth_devices[port_id]; struct rte_dev_reg_info regs; From patchwork Fri Sep 25 05:37:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenbo Xia X-Patchwork-Id: 78783 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 C5523A04C0; Fri, 25 Sep 2020 07:41:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A4D031E4E9; Fri, 25 Sep 2020 07:41:13 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id F3E301E4E1; Fri, 25 Sep 2020 07:41:10 +0200 (CEST) IronPort-SDR: p9ozxdlXBBjY5qIRTYg4hZoaDvd1mpP0RxD8JjgfZdAlLMQ9FSpl4WlixkclSRlFW3oOkymt7O 4M44ORVBPfhQ== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="141469445" X-IronPort-AV: E=Sophos;i="5.77,300,1596524400"; d="scan'208";a="141469445" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 22:41:10 -0700 IronPort-SDR: IuIECK+8AdsNXexUFixWKCa1e2offghq19LfyhAHCVjDS0QBK4NVdrVKGvlcfDbFtdii37gSxO tdulXQqoiffg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,300,1596524400"; d="scan'208";a="323242961" Received: from npg-dpdk-virtio-xiachenbo-nw.sh.intel.com ([10.67.119.123]) by orsmga002.jf.intel.com with ESMTP; 24 Sep 2020 22:41:02 -0700 From: Chenbo Xia To: dev@dpdk.org Cc: shepard.siegel@atomicrules.com, ed.czeck@atomicrules.com, john.miller@atomicrules.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, qiming.yang@intel.com, qi.z.zhang@intel.com, rmody@marvell.com, shshaikh@marvell.com, sbhosle@broadcom.com, kishore.padmanabha@broadcom.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, xiaoyun.li@intel.com, ferruh.yigit@intel.com, jingjing.wu@intel.com, irusskikh@marvell.com, wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com, nikhil.rao@intel.com, konstantin.ananyev@intel.com, jerin.jacob@caviumnetworks.com, marko.kovacevic@intel.com, orika@nvidia.com, bruce.richardson@intel.com, radu.nicolau@intel.com, akhil.goyal@nxp.com, tomasz.kantecki@intel.com, skori@marvell.com, pbhagavatula@marvell.com, john.mcnamara@intel.com, stable@dpdk.org Date: Fri, 25 Sep 2020 13:37:01 +0800 Message-Id: <20200925053702.80367-2-chenbo.xia@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200925053702.80367-1-chenbo.xia@intel.com> References: <20200804174147.64473-1-chenbo.xia@intel.com> <20200925053702.80367-1-chenbo.xia@intel.com> Subject: [dpdk-dev] [PATCH v2 2/3] app: fix variable size of ethdev port id 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" The ethdev port id should be 16 bits now. This patch changes the variable size of port id in applications from 8 bits to 16 bits. Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters") Fixes: 46cf97e4bbfa ("eventdev: add test for eth Tx adapter") Cc: stable@dpdk.org Signed-off-by: Chenbo Xia --- app/test-pmd/bpf_cmd.c | 4 ++-- app/test/test_event_eth_tx_adapter.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c index 0f984ccf4..16e3c3b3b 100644 --- a/app/test-pmd/bpf_cmd.c +++ b/app/test-pmd/bpf_cmd.c @@ -55,7 +55,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = { struct cmd_bpf_ld_result { cmdline_fixed_string_t bpf; cmdline_fixed_string_t dir; - uint8_t port; + uint16_t port; uint16_t queue; cmdline_fixed_string_t op; cmdline_fixed_string_t flags; @@ -153,7 +153,7 @@ cmdline_parse_inst_t cmd_operate_bpf_ld_parse = { struct cmd_bpf_unld_result { cmdline_fixed_string_t bpf; cmdline_fixed_string_t dir; - uint8_t port; + uint16_t port; uint16_t queue; }; diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c index 3af749280..707303090 100644 --- a/app/test/test_event_eth_tx_adapter.c +++ b/app/test/test_event_eth_tx_adapter.c @@ -45,7 +45,7 @@ static uint64_t eid = ~0ULL; static uint32_t tid; static inline int -port_init_common(uint8_t port, const struct rte_eth_conf *port_conf, +port_init_common(uint16_t port, const struct rte_eth_conf *port_conf, struct rte_mempool *mp) { const uint16_t rx_ring_size = RING_SIZE, tx_ring_size = RING_SIZE; @@ -104,7 +104,7 @@ port_init_common(uint8_t port, const struct rte_eth_conf *port_conf, } static inline int -port_init(uint8_t port, struct rte_mempool *mp) +port_init(uint16_t port, struct rte_mempool *mp) { struct rte_eth_conf conf = { 0 }; return port_init_common(port, &conf, mp); From patchwork Fri Sep 25 05:37:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenbo Xia X-Patchwork-Id: 78784 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 7ED01A04C0; Fri, 25 Sep 2020 07:41:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 566111E4C9; Fri, 25 Sep 2020 07:41:23 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2F5721E4C8; Fri, 25 Sep 2020 07:41:21 +0200 (CEST) IronPort-SDR: yj21HiCE1+vxZIGHa7yMFB5TIFCI/lZEDOL9m9C8S3WG063zzsQsUyAg50Q1paag7hnNYEoqlw aRnODeFPSw2g== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="158794986" X-IronPort-AV: E=Sophos;i="5.77,300,1596524400"; d="scan'208";a="158794986" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 22:41:20 -0700 IronPort-SDR: GtAiZ++seB1fjzX/+QG1revRBFFgDcCuHtaADkPBbJPT6ZBHN74bbjD9V/eFVPtFn6INLtuF35 3wgiWK7gXUXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,300,1596524400"; d="scan'208";a="323243053" Received: from npg-dpdk-virtio-xiachenbo-nw.sh.intel.com ([10.67.119.123]) by orsmga002.jf.intel.com with ESMTP; 24 Sep 2020 22:41:11 -0700 From: Chenbo Xia To: dev@dpdk.org Cc: shepard.siegel@atomicrules.com, ed.czeck@atomicrules.com, john.miller@atomicrules.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, qiming.yang@intel.com, qi.z.zhang@intel.com, rmody@marvell.com, shshaikh@marvell.com, sbhosle@broadcom.com, kishore.padmanabha@broadcom.com, michael.baucom@broadcom.com, venkatkumar.duvvuru@broadcom.com, xiaoyun.li@intel.com, ferruh.yigit@intel.com, jingjing.wu@intel.com, irusskikh@marvell.com, wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com, nikhil.rao@intel.com, konstantin.ananyev@intel.com, jerin.jacob@caviumnetworks.com, marko.kovacevic@intel.com, orika@nvidia.com, bruce.richardson@intel.com, radu.nicolau@intel.com, akhil.goyal@nxp.com, tomasz.kantecki@intel.com, skori@marvell.com, pbhagavatula@marvell.com, john.mcnamara@intel.com, stable@dpdk.org Date: Fri, 25 Sep 2020 13:37:02 +0800 Message-Id: <20200925053702.80367-3-chenbo.xia@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200925053702.80367-1-chenbo.xia@intel.com> References: <20200804174147.64473-1-chenbo.xia@intel.com> <20200925053702.80367-1-chenbo.xia@intel.com> Subject: [dpdk-dev] [PATCH v2 3/3] doc: fix variable size of ethdev port id 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" The ethdev port id should be 16 bits now. This patch changes the variable size of port id in docs from 8 bits to 16 bits. Fixes: fdec9301f52d ("doc: add flow classify guides") Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API") Cc: stable@dpdk.org Signed-off-by: Chenbo Xia --- doc/guides/sample_app_ug/flow_classify.rst | 2 +- doc/guides/sample_app_ug/flow_filtering.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/guides/sample_app_ug/flow_classify.rst b/doc/guides/sample_app_ug/flow_classify.rst index dc40b4d6f..31175cff0 100644 --- a/doc/guides/sample_app_ug/flow_classify.rst +++ b/doc/guides/sample_app_ug/flow_classify.rst @@ -271,7 +271,7 @@ Forwarding application is shown below: .. code-block:: c static inline int - port_init(uint8_t port, struct rte_mempool *mbuf_pool) + port_init(uint16_t port, struct rte_mempool *mbuf_pool) { struct rte_eth_conf port_conf = port_conf_default; const uint16_t rx_rings = 1, tx_rings = 1; diff --git a/doc/guides/sample_app_ug/flow_filtering.rst b/doc/guides/sample_app_ug/flow_filtering.rst index 5e5a6cd8a..d3653e57b 100644 --- a/doc/guides/sample_app_ug/flow_filtering.rst +++ b/doc/guides/sample_app_ug/flow_filtering.rst @@ -384,7 +384,7 @@ This function is located in the ``flow_blocks.c`` file. .. code-block:: c static struct rte_flow * - generate_ipv4_flow(uint8_t port_id, uint16_t rx_q, + generate_ipv4_flow(uint16_t port_id, uint16_t rx_q, uint32_t src_ip, uint32_t src_mask, uint32_t dest_ip, uint32_t dest_mask, struct rte_flow_error *error)