From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>,
Peng Zhang <peng.zhang@corigine.com>,
Long Wu <long.wu@corigine.com>
Subject: [PATCH 1/5] net/nfp: complete the logic of print capacity
Date: Wed, 13 Dec 2023 11:24:12 +0800 [thread overview]
Message-ID: <20231213032416.1988817-2-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20231213032416.1988817-1-chaoyong.he@corigine.com>
Complete the logic of print capacity, print all the capacity and
extend capacity.
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
drivers/net/nfp/nfp_net_common.c | 59 ++++++++++++++++++++++----------
1 file changed, 41 insertions(+), 18 deletions(-)
diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index eeb0aaae26..79ce1dd837 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -306,28 +306,51 @@ void
nfp_net_log_device_information(const struct nfp_net_hw *hw)
{
uint32_t cap = hw->super.cap;
+ uint32_t cap_ext = hw->super.cap_ext;
PMD_INIT_LOG(INFO, "VER: %u.%u, Maximum supported MTU: %d",
hw->ver.major, hw->ver.minor, hw->max_mtu);
- PMD_INIT_LOG(INFO, "CAP: %#x, %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", cap,
- cap & NFP_NET_CFG_CTRL_PROMISC ? "PROMISC " : "",
- cap & NFP_NET_CFG_CTRL_L2BC ? "L2BCFILT " : "",
- cap & NFP_NET_CFG_CTRL_L2MC ? "L2MCFILT " : "",
- cap & NFP_NET_CFG_CTRL_RXCSUM ? "RXCSUM " : "",
- cap & NFP_NET_CFG_CTRL_TXCSUM ? "TXCSUM " : "",
- cap & NFP_NET_CFG_CTRL_RXVLAN ? "RXVLAN " : "",
- cap & NFP_NET_CFG_CTRL_TXVLAN ? "TXVLAN " : "",
- cap & NFP_NET_CFG_CTRL_RXVLAN_V2 ? "RXVLANv2 " : "",
- cap & NFP_NET_CFG_CTRL_TXVLAN_V2 ? "TXVLANv2 " : "",
- cap & NFP_NET_CFG_CTRL_RXQINQ ? "RXQINQ " : "",
- cap & NFP_NET_CFG_CTRL_SCATTER ? "SCATTER " : "",
- cap & NFP_NET_CFG_CTRL_GATHER ? "GATHER " : "",
- cap & NFP_NET_CFG_CTRL_LIVE_ADDR ? "LIVE_ADDR " : "",
- cap & NFP_NET_CFG_CTRL_LSO ? "TSO " : "",
- cap & NFP_NET_CFG_CTRL_LSO2 ? "TSOv2 " : "",
- cap & NFP_NET_CFG_CTRL_RSS ? "RSS " : "",
- cap & NFP_NET_CFG_CTRL_RSS2 ? "RSSv2 " : "");
+ PMD_INIT_LOG(INFO, "CAP: %#x", cap);
+ PMD_INIT_LOG(INFO, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+ cap & NFP_NET_CFG_CTRL_ENABLE ? "ENABLE " : "",
+ cap & NFP_NET_CFG_CTRL_PROMISC ? "PROMISC " : "",
+ cap & NFP_NET_CFG_CTRL_L2BC ? "L2BCFILT " : "",
+ cap & NFP_NET_CFG_CTRL_L2MC ? "L2MCFILT " : "",
+ cap & NFP_NET_CFG_CTRL_RXCSUM ? "RXCSUM " : "",
+ cap & NFP_NET_CFG_CTRL_TXCSUM ? "TXCSUM " : "",
+ cap & NFP_NET_CFG_CTRL_RXVLAN ? "RXVLAN " : "",
+ cap & NFP_NET_CFG_CTRL_TXVLAN ? "TXVLAN " : "",
+ cap & NFP_NET_CFG_CTRL_SCATTER ? "SCATTER " : "",
+ cap & NFP_NET_CFG_CTRL_GATHER ? "GATHER " : "",
+ cap & NFP_NET_CFG_CTRL_LSO ? "TSO " : "",
+ cap & NFP_NET_CFG_CTRL_RXQINQ ? "RXQINQ " : "",
+ cap & NFP_NET_CFG_CTRL_RXVLAN_V2 ? "RXVLANv2 " : "",
+ cap & NFP_NET_CFG_CTRL_RINGCFG ? "RINGCFG " : "",
+ cap & NFP_NET_CFG_CTRL_RSS ? "RSS " : "",
+ cap & NFP_NET_CFG_CTRL_IRQMOD ? "IRQMOD " : "",
+ cap & NFP_NET_CFG_CTRL_RINGPRIO ? "RINGPRIO " : "",
+ cap & NFP_NET_CFG_CTRL_MSIXAUTO ? "MSIXAUTO " : "",
+ cap & NFP_NET_CFG_CTRL_TXRWB ? "TXRWB " : "",
+ cap & NFP_NET_CFG_CTRL_L2SWITCH ? "L2SWITCH " : "",
+ cap & NFP_NET_CFG_CTRL_TXVLAN_V2 ? "TXVLANv2 " : "",
+ cap & NFP_NET_CFG_CTRL_VXLAN ? "VXLAN " : "",
+ cap & NFP_NET_CFG_CTRL_NVGRE ? "NVGRE " : "",
+ cap & NFP_NET_CFG_CTRL_MSIX_TX_OFF ? "MSIX_TX_OFF " : "",
+ cap & NFP_NET_CFG_CTRL_LSO2 ? "TSOv2 " : "",
+ cap & NFP_NET_CFG_CTRL_RSS2 ? "RSSv2 " : "",
+ cap & NFP_NET_CFG_CTRL_CSUM_COMPLETE ? "CSUM " : "",
+ cap & NFP_NET_CFG_CTRL_LIVE_ADDR ? "LIVE_ADDR " : "");
+
+ PMD_INIT_LOG(INFO, "CAP_WORD1: %#x", cap_ext);
+ PMD_INIT_LOG(INFO, "%s%s%s%s%s%s%s",
+ cap_ext & NFP_NET_CFG_CTRL_PKT_TYPE ? "PKT_TYPE " : "",
+ cap_ext & NFP_NET_CFG_CTRL_IPSEC ? "IPSEC " : "",
+ cap_ext & NFP_NET_CFG_CTRL_IPSEC_SM_LOOKUP ? "IPSEC_SM " : "",
+ cap_ext & NFP_NET_CFG_CTRL_IPSEC_LM_LOOKUP ? "IPSEC_LM " : "",
+ cap_ext & NFP_NET_CFG_CTRL_MULTI_PF ? "MULTI_PF " : "",
+ cap_ext & NFP_NET_CFG_CTRL_FLOW_STEER ? "FLOW_STEER " : "",
+ cap_ext & NFP_NET_CFG_CTRL_IN_ORDER ? "VIRTIO_IN_ORDER " : "");
PMD_INIT_LOG(INFO, "max_rx_queues: %u, max_tx_queues: %u",
hw->max_rx_queues, hw->max_tx_queues);
--
2.39.1
next prev parent reply other threads:[~2023-12-13 3:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-13 3:24 [PATCH 0/5] unify the usage of capacity and control Chaoyong He
2023-12-13 3:24 ` Chaoyong He [this message]
2023-12-13 3:24 ` [PATCH 2/5] net/nfp: modify the logic of set promisc mode Chaoyong He
2023-12-13 3:24 ` [PATCH 3/5] net/nfp: modify the logic of set MAC address Chaoyong He
2023-12-13 3:24 ` [PATCH 4/5] net/nfp: use ctrl to check the mode of features Chaoyong He
2023-12-13 3:24 ` [PATCH 5/5] net/nfp: use ctrl extend " Chaoyong He
2023-12-14 16:08 ` [PATCH 0/5] unify the usage of capacity and control Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231213032416.1988817-2-chaoyong.he@corigine.com \
--to=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=long.wu@corigine.com \
--cc=oss-drivers@corigine.com \
--cc=peng.zhang@corigine.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).