From: Stephen Hemminger <stephen@networkplumber.org>
To: Dimon Zhao <dimon.zhao@nebula-matrix.com>
Cc: dev@dpdk.org, Alvin Wang <alvin.wang@nebula-matrix.com>,
Leon Yu <leon.yu@nebula-matrix.com>,
Sam Chen <sam.chen@nebula-matrix.com>
Subject: Re: [PATCH v1 3/4] net/nbl: add support for imissed stats
Date: Fri, 7 Nov 2025 08:05:15 -0800 [thread overview]
Message-ID: <20251107080515.0f9b86db@phoenix> (raw)
In-Reply-To: <20251107073459.3532524-4-dimon.zhao@nebula-matrix.com>
On Thu, 6 Nov 2025 23:34:58 -0800
Dimon Zhao <dimon.zhao@nebula-matrix.com> wrote:
> +static int nbl_dev_update_hw_stats(struct rte_eth_dev *eth_dev)
> +{
> + struct nbl_adapter *adapter = ETH_DEV_TO_NBL_DEV_PF_PRIV(eth_dev);
> + struct nbl_dev_mgt *dev_mgt = NBL_ADAPTER_TO_DEV_MGT(adapter);
> + struct nbl_dispatch_ops *disp_ops = NBL_DEV_MGT_TO_DISP_OPS(dev_mgt);
> + struct nbl_dev_net_mgt *net_dev = NBL_DEV_MGT_TO_NET_DEV(dev_mgt);
> + u32 *uvn_stat_pkt_drop;
> + int i = 0;
> + int ret = 0;
> +
> + if (!net_dev->hw_stats_inited)
> + return 0;
> + uvn_stat_pkt_drop = rte_zmalloc("nbl_uvn_stat_pkt_drop",
> + sizeof(*uvn_stat_pkt_drop) * (eth_dev->data->nb_rx_queues), 0);
Since the lifetime of this array is only for this function, please use standard pool.
uvn_stat_pkt_drop = calloc(eth_dev->data->nb_rx_queues, sizeof(u32));
next prev parent reply other threads:[~2025-11-07 16:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 7:34 [PATCH v1 0/4] NBL add new features Dimon Zhao
2025-11-07 7:34 ` [PATCH v1 1/4] net/nbl: change default Rx extension header size to 12 bytes Dimon Zhao
2025-11-07 7:34 ` [PATCH v1 2/4] net/nbl: add support for Tx and Rx VLAN offload Dimon Zhao
2025-11-07 16:10 ` Stephen Hemminger
2025-11-07 7:34 ` [PATCH v1 3/4] net/nbl: add support for imissed stats Dimon Zhao
2025-11-07 16:05 ` Stephen Hemminger [this message]
2025-11-07 7:34 ` [PATCH v1 4/4] net/nbl: update documentation and maintainers Dimon Zhao
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=20251107080515.0f9b86db@phoenix \
--to=stephen@networkplumber.org \
--cc=alvin.wang@nebula-matrix.com \
--cc=dev@dpdk.org \
--cc=dimon.zhao@nebula-matrix.com \
--cc=leon.yu@nebula-matrix.com \
--cc=sam.chen@nebula-matrix.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).