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 0787C46875; Wed, 4 Jun 2025 12:18:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E59AB427CA; Wed, 4 Jun 2025 12:18:07 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 169C1427C3 for ; Wed, 4 Jun 2025 12:18:06 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id B3FFE21ECB; Wed, 4 Jun 2025 12:18:05 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v4 19/25] net/intel: generalize vectorized Rx rearm X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Wed, 4 Jun 2025 12:18:04 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9FCBE@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v4 19/25] net/intel: generalize vectorized Rx rearm Thread-Index: AdvVNezIuVLVCEJyT8OGE3kH4WMjWgAABwjA References: <53edc2bd68e42152358d731d51860c8606ef13a6.1748612803.git.anatoly.burakov@intel.com> <98CBD80474FA8B44BF855DF32C47DC35E9FCBD@smartserver.smartshare.dk> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Bruce Richardson" Cc: "Anatoly Burakov" , 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 > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > Sent: Wednesday, 4 June 2025 11.49 >=20 > On Wed, Jun 04, 2025 at 11:43:01AM +0200, Morten Br=F8rup wrote: > > > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > > > Sent: Wednesday, 4 June 2025 11.32 > > > > > > On Fri, May 30, 2025 at 02:57:15PM +0100, Anatoly Burakov wrote: [...] > > > > +#else > > > > + /* for 32-byte descriptors only support SSE */ > > > > + switch (vec_level) { > > > > + case CI_RX_VEC_LEVEL_AVX512: > > > > If you are respinning this patch, add "/* fall through */" here. > > > I disagree, it's not needed and will only make the code less readable. >=20 > > > > + case CI_RX_VEC_LEVEL_AVX2: > > > > And here. > > > > > > + case CI_RX_VEC_LEVEL_SSE: > > > > + _ci_rxq_rearm_sse(rxq); > > > > + break; > > > > + } > > > > +#endif /* RTE_NET_INTEL_USE_16BYTE_DESC */ > > > > > > > Please try building with 32-byte descriptors; the compiler should > have complained about the implicit fall through. > > > The fallthrough tags are not necessary where you have a list of tags > without any statements in between. It's common practice to have a > couple of > values match a single switch arm, and the fallthrough is obvious in > those > cases, since there are no statements between them. Once you start > having > some code for a case, then you need it, since you need to make it = clear > that it's not accidental. Thank you for clarifying, Bruce. The GCC documentation [1] doesn't mention any exception for cases = without statements, but Godbolt confirms it (not only for C11, but also = for C23), so I agree with Bruce about omitting them for readability. Sorry about the noise. ;-) [1]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html