> On Wed, 18 Dec 2024 14:30:36 +0800 > Chaoyong He <chaoyong...@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.