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 B3CB642C6A; Fri, 9 Jun 2023 08:58:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5E4D41144; Fri, 9 Jun 2023 08:58:30 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 00C3240A84 for ; Fri, 9 Jun 2023 08:58:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686293909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bHjaIgpsYrjQbZk326uLxJuuxy+7uzmO65ijIuCV7dE=; b=bflGARs1HETbgAaLKPYPenfSyOFXOynSP8EmVTnJLdBPivo+EL6g4+EluUOn9nTDOhSNdo 6EmDbvyWG6cRFWiinX+edCBpN34U0W2NrjGdGqMcofDvmv///waosTI/kPtncgNiGOs5B0 QfvoFtjsP2s4yilvIAhu1v4XGcrqOnY= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-394-aJ_iNWIoOh6UKap2ftwoOw-1; Fri, 09 Jun 2023 02:58:28 -0400 X-MC-Unique: aJ_iNWIoOh6UKap2ftwoOw-1 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-2568461a928so311189a91.1 for ; Thu, 08 Jun 2023 23:58:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686293907; x=1688885907; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bHjaIgpsYrjQbZk326uLxJuuxy+7uzmO65ijIuCV7dE=; b=YORrk/TB6WVefreQPfZB2DPow6O11ZsJp9OrzQ5AAQcyWyW0+DVedHo6Tfq/nt1pt4 awvaTo7PJrzbdMJSLXBBCWRB+ZP7/TwqEbPADu7hQ0lxhtijA4jI0eTPSR4Tg476l/CG zd8aF0PvpPFOOs3qaZXclAuYpzZA0Ybz8GjWpzaprU9do80QINrtbMkOIRXwHd/kzS2L hjPfUCvD1lhY0qA1Z/FLXN9CRAuNJTTkY9zoJbvf6fIRpi5XkAbFei0lTukRWOSjk+ty ZHbZsN0o8VrG4v+FRFKw6vi82q5gKj+YD0RRtovaGLjavyLajJu3kfdRkmnZou/7dTJ4 dlrw== X-Gm-Message-State: AC+VfDxBlsx+cZNekO+G9VBV3Ppr5+1g5yGAVw913PYeJ8f7Zad7dobf laQfaq3y3F6nLOQy3obGljLQYOYiwTHw2X8wRIGOxlyD9WF3tAWJLKOgUEvd3mRAcNT0CCj4quK NekY2y4h5/x/0sToZsYc= X-Received: by 2002:a17:90a:c393:b0:259:4a25:a77b with SMTP id h19-20020a17090ac39300b002594a25a77bmr385635pjt.15.1686293907346; Thu, 08 Jun 2023 23:58:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ77YNH5g77/vzgddkxNzMRkRP2Tx+ZpEHlpNd96rp/r6aHG1CgnwTJYVUwQBQhb/EhJztGuulMZYYrMDTVtHcA= X-Received: by 2002:a17:90a:c393:b0:259:4a25:a77b with SMTP id h19-20020a17090ac39300b002594a25a77bmr385630pjt.15.1686293907079; Thu, 08 Jun 2023 23:58:27 -0700 (PDT) MIME-Version: 1.0 References: <20230609054156.605581-1-zhichaox.zeng@intel.com> In-Reply-To: <20230609054156.605581-1-zhichaox.zeng@intel.com> From: David Marchand Date: Fri, 9 Jun 2023 08:58:15 +0200 Message-ID: Subject: Re: [PATCH] net/iavf: fix old GCC compilation warnings To: Zhichao Zeng Cc: dev@dpdk.org, qi.z.zhang@intel.com, daxuex.gao@intel.com, Bruce Richardson , Konstantin Ananyev , Jingjing Wu , Beilei Xing , Wenjun Wu X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Fri, Jun 9, 2023 at 7:35=E2=80=AFAM Zhichao Zeng wrote: > > The code uses the Wimplicit-fallthrough compile option to ignore > falls through warnings in switch case, but this option was introduced > by GCC 7 and old GCC do not recognize the option. > > Add judgment to avoid warnings about unrecognized options in old GCC. > > Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on SSE") > Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on AVX2") > Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on AVX512") > Signed-off-by: Zhichao Zeng This is ugly. I don't think we introduced a marker for this in EAL, but at least I see other drivers use /* fallthrough */. Prefer this form, please. IOW: diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c index b754122c51..81ea154519 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_sse.c +++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c @@ -1126,24 +1126,26 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *r= xq, nb_pkts_recd +=3D var; #ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) { inflection_point =3D (inflection_point <=3D var) ? inflection_point : 0; switch (inflection_point) { case 1: *RTE_MBUF_DYNFIELD(rx_pkts[pos + 0], iavf_timestamp_dynfield_offset + 4, uint32_t *) +=3D 1; + /* fallthrough */ case 2: etc... --=20 David Marchand