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 10446A04DD for ; Wed, 28 Oct 2020 11:48:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 060B44CA7; Wed, 28 Oct 2020 11:48:08 +0100 (CET) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 8F8B04CA7 for ; Wed, 28 Oct 2020 11:48:06 +0100 (CET) Received: by mail-wr1-f65.google.com with SMTP id s9so5144144wro.8 for ; Wed, 28 Oct 2020 03:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VV7BwgkkIGhRGed6iZffYCOKDdlKnhjv6PHTe1quNzw=; b=m+qOiO97EiyIo5MSHJsAo/ukj+srfSrTjevIKs1NUNjQ4rx4115s9bj1FYiF/KzvgX wRb/HYzqurZebhdGWzFaV0+EmZ5zIVj8DiTx4H9BxcRKA4x8pDhvynsBVeNPt3452lPQ EYfdgXKXJvnYHCWEtoG9CuzyBB+5GvlxMmxB3K/OXMREGs1+Ms/hPWP3haRuQmDMTkvQ EyBPMipRhDPNk/c1jKH4Gd4Zpm+Nn3RRtu4a/Tt7roM2apX9i3xfqWzI0lCu726M7ISe tW6b8g7mBUBsmDVRjaxdsehIRAVZSJ/AryBVVzq3fyo9lORw62mjiSNYR8XA7kcFFYeM BPuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VV7BwgkkIGhRGed6iZffYCOKDdlKnhjv6PHTe1quNzw=; b=Yv8LHhSZlNgvbJl8mPGzKuGvjGhEhG9/CYhbGUTzfMUwfBvaguXjFPd/nN+I1XUP50 FgT8kgQUtyx6NgNZ7CWtdqzuZCqbXbtd8CxDkVOw5JghR77Bp4AUYLXxoByXSiW23Cow kOBqdks90ZXYbGvAu1JJh6J04+o6KiHnLL7gigLTh/TJxV1RMpO4jnEf29CojdDpL1PZ L6moibXRPQ+j3Lo0NU3x26TabbmmKZUo/2cmDqmPZ46eJhx+uVJbLB3Mb23RYg6/a0vP 3/eKqkyEoIY0+JYGNz64pN4r2yQEVHbyxxY0AXT4/0ygLwW0eyUScK0DQOPvk5+RoUYg 1dzg== X-Gm-Message-State: AOAM533bPMR2+ynOTpt/f5Bb5Jq9soIUohU9/3w3bEFvZ4oDraWUHgxx rPDr0jvl1bUk+eRNLiOH9G0x+AV1FivhH+5j X-Google-Smtp-Source: ABdhPJx2nzzMNcionW0dnQz3a2RicrwBSWGkDswWZQZc4Y6YDRBw2Cy3HbjJ5MVvcnziAGFuQ9q6hw== X-Received: by 2002:adf:ee44:: with SMTP id w4mr8364028wro.114.1603882086323; Wed, 28 Oct 2020 03:48:06 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id b18sm5971847wmj.41.2020.10.28.03.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:48:05 -0700 (PDT) From: luca.boccassi@gmail.com To: Heinrich Kuhn Cc: Simon Horman , dpdk stable Date: Wed, 28 Oct 2020 10:43:16 +0000 Message-Id: <20201028104606.3504127-37-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/nfp: expand device info get' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From c7f41e206d1219ab92f79a0d53c048e604ffb491 Mon Sep 17 00:00:00 2001 From: Heinrich Kuhn Date: Wed, 2 Sep 2020 13:52:27 +0200 Subject: [PATCH] net/nfp: expand device info get [ upstream commit 69a0f8750aa349ed27fa7b635e2b47f74f11431a ] Report Rx and Tx descriptor related limitations in the nfp dev_info_get callback function. This commit also adds NFP_ALIGN_RING_DESC to replace a static integer value used during rx/tx queue setups to validate descriptor alignment. Signed-off-by: Heinrich Kuhn Signed-off-by: Simon Horman --- drivers/net/nfp/nfp_net.c | 30 ++++++++++++++++++++++++------ drivers/net/nfp/nfp_net_pmd.h | 6 ++++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 082aa46825..54ea66b9d4 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -1250,6 +1250,20 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) .tx_rs_thresh = DEFAULT_TX_RSBIT_THRESH, }; + dev_info->rx_desc_lim = (struct rte_eth_desc_lim) { + .nb_max = NFP_NET_MAX_RX_DESC, + .nb_min = NFP_NET_MIN_RX_DESC, + .nb_align = NFP_ALIGN_RING_DESC, + }; + + dev_info->tx_desc_lim = (struct rte_eth_desc_lim) { + .nb_max = NFP_NET_MAX_TX_DESC, + .nb_min = NFP_NET_MIN_TX_DESC, + .nb_align = NFP_ALIGN_RING_DESC, + .nb_seg_max = NFP_TX_MAX_SEG, + .nb_mtu_seg_max = NFP_TX_MAX_MTU_SEG, + }; + dev_info->flow_type_rss_offloads = ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_NONFRAG_IPV4_UDP | @@ -1513,15 +1527,17 @@ nfp_net_rx_queue_setup(struct rte_eth_dev *dev, const struct rte_memzone *tz; struct nfp_net_rxq *rxq; struct nfp_net_hw *hw; + uint32_t rx_desc_sz; hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); PMD_INIT_FUNC_TRACE(); /* Validating number of descriptors */ - if (((nb_desc * sizeof(struct nfp_net_rx_desc)) % 128) != 0 || - (nb_desc > NFP_NET_MAX_RX_DESC) || - (nb_desc < NFP_NET_MIN_RX_DESC)) { + rx_desc_sz = nb_desc * sizeof(struct nfp_net_rx_desc); + if (rx_desc_sz % NFP_ALIGN_RING_DESC != 0 || + nb_desc > NFP_NET_MAX_RX_DESC || + nb_desc < NFP_NET_MIN_RX_DESC) { PMD_DRV_LOG(ERR, "Wrong nb_desc value"); return -EINVAL; } @@ -1660,15 +1676,17 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, struct nfp_net_txq *txq; uint16_t tx_free_thresh; struct nfp_net_hw *hw; + uint32_t tx_desc_sz; hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); PMD_INIT_FUNC_TRACE(); /* Validating number of descriptors */ - if (((nb_desc * sizeof(struct nfp_net_tx_desc)) % 128) != 0 || - (nb_desc > NFP_NET_MAX_TX_DESC) || - (nb_desc < NFP_NET_MIN_TX_DESC)) { + tx_desc_sz = nb_desc * sizeof(struct nfp_net_tx_desc); + if (tx_desc_sz % NFP_ALIGN_RING_DESC != 0 || + nb_desc > NFP_NET_MAX_TX_DESC || + nb_desc < NFP_NET_MIN_TX_DESC) { PMD_DRV_LOG(ERR, "Wrong nb_desc value"); return -EINVAL; } diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h index cc1055c49a..466a11aca2 100644 --- a/drivers/net/nfp/nfp_net_pmd.h +++ b/drivers/net/nfp/nfp_net_pmd.h @@ -33,6 +33,12 @@ struct nfp_net_adapter; #define NFP_NET_MAX_RX_DESC (32 * 1024) #define NFP_NET_MIN_RX_DESC 64 +/* Descriptor alignment */ +#define NFP_ALIGN_RING_DESC 128 + +#define NFP_TX_MAX_SEG UINT8_MAX +#define NFP_TX_MAX_MTU_SEG 8 + /* Bar allocation */ #define NFP_NET_CRTL_BAR 0 #define NFP_NET_TX_BAR 2 -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:12.941426071 +0000 +++ 0037-net-nfp-expand-device-info-get.patch 2020-10-28 10:35:11.484829729 +0000 @@ -1,15 +1,15 @@ -From 69a0f8750aa349ed27fa7b635e2b47f74f11431a Mon Sep 17 00:00:00 2001 +From c7f41e206d1219ab92f79a0d53c048e604ffb491 Mon Sep 17 00:00:00 2001 From: Heinrich Kuhn Date: Wed, 2 Sep 2020 13:52:27 +0200 Subject: [PATCH] net/nfp: expand device info get +[ upstream commit 69a0f8750aa349ed27fa7b635e2b47f74f11431a ] + Report Rx and Tx descriptor related limitations in the nfp dev_info_get callback function. This commit also adds NFP_ALIGN_RING_DESC to replace a static integer value used during rx/tx queue setups to validate descriptor alignment. -Cc: stable@dpdk.org - Signed-off-by: Heinrich Kuhn Signed-off-by: Simon Horman --- @@ -18,7 +18,7 @@ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c -index 2d20d4ce94..f5e4cd339d 100644 +index 082aa46825..54ea66b9d4 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -1250,6 +1250,20 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -85,7 +85,7 @@ return -EINVAL; } diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h -index cb2d19afe6..1295c5959e 100644 +index cc1055c49a..466a11aca2 100644 --- a/drivers/net/nfp/nfp_net_pmd.h +++ b/drivers/net/nfp/nfp_net_pmd.h @@ -33,6 +33,12 @@ struct nfp_net_adapter;