All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Chaoyong He <chaoyong.he@corigine.com>
Cc: dev@dpdk.org, oss-drivers@corigine.com,
	Peng Zhang <peng.zhang@corigine.com>
Subject: Re: [PATCH] net/nfp: implement the burst mode get operation
Date: Wed, 18 Dec 2024 08:39:07 -0800	[thread overview]
Message-ID: <20241218083907.0658491e@hermes.local> (raw)
In-Reply-To: <20241218063036.1697438-1-chaoyong.he@corigine.com>

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.

  reply	other threads:[~2024-12-18 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18  6:30 [PATCH] net/nfp: implement the burst mode get operation Chaoyong He
2024-12-18 16:39 ` Stephen Hemminger [this message]
2024-12-19  1:25   ` Chaoyong He
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=20241218083907.0658491e@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.