From: Chaoyong He <chaoyong.he@corigine.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
oss-drivers <oss-drivers@corigine.com>,
Nole Zhang <peng.zhang@corigine.com>
Subject: RE: [PATCH] net/nfp: implement the burst mode get operation
Date: Thu, 19 Dec 2024 01:25:30 +0000 [thread overview]
Message-ID: <SJ0PR13MB5545E6CD6B4FE4CC84EF7C059E062@SJ0PR13MB5545.namprd13.prod.outlook.com> (raw)
In-Reply-To: <20241218083907.0658491e@hermes.local>
> On Wed, 18 Dec 2024 14:30:36 +0800
> Chaoyong He <chaoyong.he@corigine.com> wrote:
>
> > +int
> > +nfp_net_rx_burst_mode_get(struct rte_eth_dev *eth_dev,
> > + uint16_t queue_id __rte_unused,
> > + struct rte_eth_burst_mode *mode)
> > +{
> > + eth_rx_burst_t pkt_burst;
> > +
> > + pkt_burst = eth_dev->rx_pkt_burst;
> > + if (pkt_burst == nfp_net_recv_pkts) {
> > + snprintf(mode->info, RTE_ETH_BURST_MODE_INFO_SIZE,
> "%s",
> > + "Scalar");
> > + } else if (pkt_burst == nfp_net_vec_avx2_recv_pkts) {
> > + snprintf(mode->info, RTE_ETH_BURST_MODE_INFO_SIZE,
> "%s",
> > + "Vector AVX2");
> > + } else {
> > + return -EINVAL;
> > + }
> > +
> > + return 0;
> > +}
> > +
>
> The coccinelle script want to replace that snprintf with strlcpy
>
> Also don't need {} for one line statement but its ok as is.
Okay, I will send a new version patch.
next prev parent reply other threads:[~2024-12-19 1:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 6:30 Chaoyong He
2024-12-18 16:39 ` Stephen Hemminger
2024-12-19 1:25 ` Chaoyong He [this message]
2024-12-19 1:49 ` [PATCH v2] " Chaoyong He
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=SJ0PR13MB5545E6CD6B4FE4CC84EF7C059E062@SJ0PR13MB5545.namprd13.prod.outlook.com \
--to=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=oss-drivers@corigine.com \
--cc=peng.zhang@corigine.com \
--cc=stephen@networkplumber.org \
/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).