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 8CA2FA00BE; Wed, 8 Jul 2020 00:22:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B252F1DEE6; Wed, 8 Jul 2020 00:22:39 +0200 (CEST) Received: from mail-ej1-f97.google.com (mail-ej1-f97.google.com [209.85.218.97]) by dpdk.org (Postfix) with ESMTP id E1FFA1DED9 for ; Wed, 8 Jul 2020 00:22:34 +0200 (CEST) Received: by mail-ej1-f97.google.com with SMTP id dp18so48357363ejc.8 for ; Tue, 07 Jul 2020 15:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vPpYiujbeup8kh85sY/ZydL37H4jrJgHBLsxGa2Up3E=; b=hyZBNCSSXZvnL3HjwyAzZDdU71fa++dnaFqV0FjcvjDqxjozQirq3iY9gbMb6OllQe G8YszCwwNfItQW6bLzkHSeO+Rf3drxGRroWfp+zbz+Lj2emlMxPhTmM4o16CS0sP3lhD Rp0DgsuI4fbxGNo09VMwN3DeeED+TrXo2l8p4= 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=vPpYiujbeup8kh85sY/ZydL37H4jrJgHBLsxGa2Up3E=; b=nQ9uEH/4CVxOuSejEnUuy8s1t55sb55GKuTkSdM/AolZRBxBHlzdtQbXpMWahUI+7H 3GZPn0CCcYpTqflPfDka2Iu7LYO3ctQAN0s/N8bXlztDQAvfKHfMUJU7xXTgyUETB0ig Y2dOTU+Sh7dP5w114fNTTE6ikgFU8XwBV8VhJ3Sbwq4QUiTCAf3SzrCLdXeu7gPzTee4 ewRtzpiGxSmmmADOisN09KAXkscaxspUxucuuEV2dpUq2zEJ9ynyIQaBJ39B8cu6E96+ BunITLORRzxHWkahvlD5MyMFB+uKdIOhjktgwLaZvKdDk5ERv9yVWB9MTLDk5i32NtNy RmZQ== X-Gm-Message-State: AOAM532P8eRo7IvloZIOgeKy5yw+MCYKY/rLukF849kkgufx3dfxwKMl XLzHuq25w+nd2MkP2XKqaF/N82S8ap//fASp5wuxBqB8oUNtRufGu7hqdTRSk63FknzB2Rsjkd5 ih6sdJMcN0p7s+d6nVB5Dz/VTkDadPgWvLdacCbTSgQI6ipatnrGg8nhS3pFWw/vbqyTlbvTRkk DE2Q== X-Google-Smtp-Source: ABdhPJwjRWEss7VC6GjHZfAKzQku6ywTINwxohxfXNQ0e6jkCXFCUbH+A9eH0vDwUHWmMIS2K0zSvuxXlivb X-Received: by 2002:a17:906:1491:: with SMTP id x17mr50576942ejc.416.1594160554435; Tue, 07 Jul 2020 15:22:34 -0700 (PDT) Received: from C02VPB22HTD6.wifi.broadcom.net ([192.19.223.252]) by smtp-relay.gmail.com with ESMTPS id gj18sm12603ejb.18.2020.07.07.15.22.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jul 2020 15:22:34 -0700 (PDT) X-Relaying-Domain: broadcom.com From: Ajit Khaparde To: dev@dpdk.org Cc: Lance Richardson , Somnath Kotur Date: Tue, 7 Jul 2020 15:22:24 -0700 Message-Id: <20200707222225.33446-3-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20200707222225.33446-1-ajit.khaparde@broadcom.com> References: <20200707222225.33446-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 2/3] net/bnxt: support Rx/Tx burst mode info 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" From: Lance Richardson Retrieve burst mode options according to the selected Rx/Tx burst function name. Update 20.08 release notes with this information. Signed-off-by: Lance Richardson Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- doc/guides/nics/features/bnxt.ini | 1 + doc/guides/rel_notes/release_20_08.rst | 1 + drivers/net/bnxt/bnxt_ethdev.c | 46 ++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini index 37a99e336..f1f300c8b 100644 --- a/doc/guides/nics/features/bnxt.ini +++ b/doc/guides/nics/features/bnxt.ini @@ -9,6 +9,7 @@ Link status = Y Link status event = Y Rx interrupt = Y Queue start/stop = Y +Burst mode info = Y MTU update = Y Jumbo frame = Y Scattered Rx = Y diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst index 02fa2235a..e84258a13 100644 --- a/doc/guides/rel_notes/release_20_08.rst +++ b/doc/guides/rel_notes/release_20_08.rst @@ -101,6 +101,7 @@ New Features * Added support for new resource manager API. * Added support for VXLAN encap/decap. * Added support for rte_flow_query for COUNT action. + * Added support for rx_burst_mode_get and tx_burst_mode_get. * **Added support for BPF_ABS/BPF_IND load instructions.** diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index e447b74dd..1dc85e6df 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2668,6 +2668,50 @@ bnxt_txq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.tx_deferred_start = txq->tx_deferred_start; } +static int +bnxt_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id, + struct rte_eth_burst_mode *mode) +{ + eth_rx_burst_t pkt_burst = dev->rx_pkt_burst; + + if (pkt_burst == bnxt_recv_pkts) { + snprintf(mode->info, sizeof(mode->info), "%s", + "Scalar"); + return 0; + } +#ifdef RTE_ARCH_X86 + if (pkt_burst == bnxt_recv_pkts_vec) { + snprintf(mode->info, sizeof(mode->info), "%s", + "Vector SSE"); + return 0; + } +#endif + + return -EINVAL; +} + +static int +bnxt_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id, + struct rte_eth_burst_mode *mode) +{ + eth_tx_burst_t pkt_burst = dev->tx_pkt_burst; + + if (pkt_burst == bnxt_xmit_pkts) { + snprintf(mode->info, sizeof(mode->info), "%s", + "Scalar"); + return 0; + } +#ifdef RTE_ARCH_X86 + if (pkt_burst == bnxt_xmit_pkts_vec) { + snprintf(mode->info, sizeof(mode->info), "%s", + "Vector SSE"); + return 0; + } +#endif + + return -EINVAL; +} + int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu) { struct bnxt *bp = eth_dev->data->dev_private; @@ -4244,6 +4288,8 @@ static const struct eth_dev_ops bnxt_dev_ops = { .set_mc_addr_list = bnxt_dev_set_mc_addr_list_op, .rxq_info_get = bnxt_rxq_info_get_op, .txq_info_get = bnxt_txq_info_get_op, + .rx_burst_mode_get = bnxt_rx_burst_mode_get, + .tx_burst_mode_get = bnxt_tx_burst_mode_get, .dev_led_on = bnxt_dev_led_on_op, .dev_led_off = bnxt_dev_led_off_op, .xstats_get_by_id = bnxt_dev_xstats_get_by_id_op, -- 2.21.1 (Apple Git-122.3)