From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2E0C745EDD; Wed, 18 Dec 2024 17:39:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1840C40DF5; Wed, 18 Dec 2024 17:39:11 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 4655F40DDE for ; Wed, 18 Dec 2024 17:39:10 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-728e81257bfso5647482b3a.2 for ; Wed, 18 Dec 2024 08:39:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734539949; x=1735144749; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=2lsoBQLbSJ/XOtj757hVirhiKef/WEQKThFA7pUX+ik=; b=WHYsBgbSuM9RUqFklRrWy+gp+l3Dz1Mr+tvUAFuZjM9DkgNpAsn5YVqCCegw7WO4pI TV3OYwrW5Ld8mTVL3s2cmPFfRXNfmWlE1xL6rJ6ijTINTQgF7jzuxZjM2oZDH9yeCa5h F6s2P3UP0Eju4nemEq6eeQFzZI/7QbwH6LJo31lFb1NoIXh67UBgf538m1ow3BxEQ8Ji jazicKP2MpTqzlpYfrzZQC3d5+QTfiiBTwyjr3/f/8O6/536ZQ3FKLVbaDTSF690bpnK bxHWiu1YAA+IMAtItxDwX9EiaCzJX+sRQIA33ZoBwbdf+zBs4lBlTL8kWDfOE23TA+f4 lacQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734539949; x=1735144749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2lsoBQLbSJ/XOtj757hVirhiKef/WEQKThFA7pUX+ik=; b=I0Mmh2y8zbqVylpzDzFz32V0yD1MQb++vU8vVLnS+W9FVVidtRx5t+WjER9H0rs5cb kWujgavA9TRhbnRM+EYrqKTNqIJThgeIGP/aJnIUeVzti46SLdwOOHjOnV92nBA5VK+a nlM6I3EEOwRZYowCUuyKBGvrw6h6PVmEu3giyHW+OjAYFR34HJE1tyuSoZ9UCkOgYQcL WJeqxEWQnWjeVL1edm8Zn9ixBH7m1a5q88tNcnHkJiXz3rPJALFr6bDe3YeuYVQDGICO LCelYDt324XbZ6BGbU0o3J6k43WkIrgaWGh9x9CLeJaBtIJi/vDfTHNng969l66z7Q/3 rnOQ== X-Gm-Message-State: AOJu0YwA9FGA2dRGl7U0nv7fC1vEm0AhtqTyW5C/hFHnQY5JALjqbslw L5YzgWaLR8iEsD3lb5yCE+wkRbsdmIN5TxT8S6G3cJISEsD3vtBKF3Tqbb4ccvc= X-Gm-Gg: ASbGncuofFNrxXckjK2Ukguf4zndw0qSbWPfPwotZ9PQwhPF+kOYei5Uy3jhtf9re1N 61zamwOMACciE9RV1ewub9Ui4oehDV7+mzzrYzHLNqXocFnVBIC6yJMmU36vUZ/ugASBBPv5Nix 2/bIG8up7EedvVKTQpkM27/ACwF7l4iyKvnm6nAfIeKNqH+qtqW8JZkNRNa72JqU7yf2JPa5/7S Br6C00GRmUV98/Qhi647/pkeHIy0lLmXV2oHdDuQ0Z+3J7ikmvVQfC26F7cBhrT4519cC1L+qSS Cn+FQfNE4wXCEJEP119KQ+rwFUz7fbLW0Q== X-Google-Smtp-Source: AGHT+IG5HjoS5g5LiQPUXvEXSh12haR6NB3btzI34ZhAJLQt2kWF4VizyPqbJnEoGkRdNEfLKGtVhw== X-Received: by 2002:a05:6a20:6a24:b0:1e1:9de5:4543 with SMTP id adf61e73a8af0-1e5b47fc5ecmr4924939637.14.1734539949436; Wed, 18 Dec 2024 08:39:09 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-801d5c380afsm7660859a12.76.2024.12.18.08.39.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 08:39:09 -0800 (PST) Date: Wed, 18 Dec 2024 08:39:07 -0800 From: Stephen Hemminger To: Chaoyong He Cc: dev@dpdk.org, oss-drivers@corigine.com, Peng Zhang Subject: Re: [PATCH] net/nfp: implement the burst mode get operation Message-ID: <20241218083907.0658491e@hermes.local> In-Reply-To: <20241218063036.1697438-1-chaoyong.he@corigine.com> References: <20241218063036.1697438-1-chaoyong.he@corigine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 18 Dec 2024 14:30:36 +0800 Chaoyong He 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.