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 7D0A543D00; Thu, 21 Mar 2024 18:55:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 029C942D45; Thu, 21 Mar 2024 18:55:53 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 75754402C2 for ; Thu, 21 Mar 2024 18:55:51 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 9CDC620B74C0; Thu, 21 Mar 2024 10:55:50 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9CDC620B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1711043750; bh=+KZHu9qdWkZJFAFGhJEVUjwFezhTt3d8l3CKcaZ5AVQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BSMzqm9+1dbi6x5ZepQnk9PyP6nJCsN6wWFlH7UmCB1sZWIX4e+TqE3yUk4QjWon/ LLvGMcVVjUoDz+PXlyBb8RFS6IbWm3e651JpnTHpkcWRsVV+coWgCa1Io25ywpukxR UtvXeepfdZvwDfV//DZwxVoR1fCjv38H6EymTBMM= Date: Thu, 21 Mar 2024 10:55:50 -0700 From: Tyler Retzlaff To: Ferruh Yigit Cc: Jiawen Wu , Honnappa Nagarahalli , dev@dpdk.org Subject: Re: [PATCH 1/2] net/txgbe: add vectorized functions for Rx/Tx Message-ID: <20240321175550.GA9249@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20240201030019.21336-1-jiawenwu@trustnetic.com> <20240201030019.21336-2-jiawenwu@trustnetic.com> <4a0e5000-3ae3-4894-a23d-715801f3c3b7@amd.com> <07f901da6ed4$a3914660$eab3d320$@trustnetic.com> <91a42fb8-e0c8-4efb-9eea-f25e5cb2ec43@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <91a42fb8-e0c8-4efb-9eea-f25e5cb2ec43@amd.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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 Thu, Mar 21, 2024 at 04:27:26PM +0000, Ferruh Yigit wrote: > On 3/5/2024 8:10 AM, Jiawen Wu wrote: > > <...> > > >>> +++ b/drivers/net/txgbe/txgbe_rxtx_vec_neon.c > >>> @@ -0,0 +1,604 @@ > >>> +/* SPDX-License-Identifier: BSD-3-Clause > >>> + * Copyright(c) 2015-2024 Beijing WangXun Technology Co., Ltd. > >>> + * Copyright(c) 2010-2015 Intel Corporation > >>> + */ > >>> + > >>> +#include > >>> +#include > >>> +#include > >>> + > >>> +#include "txgbe_ethdev.h" > >>> +#include "txgbe_rxtx.h" > >>> +#include "txgbe_rxtx_vec_common.h" > >>> + > >>> +#pragma GCC diagnostic ignored "-Wcast-qual" > >>> + > >> > >> Is this pragma really required? > > > > Yes. Otherwise, there are warnings in the compilation: > > > > [1909/2921] Compiling C object drivers/libtmp_rte_net_txgbe.a.p/net_txgbe_txgbe_rxtx_vec_neon.c.o > > ../drivers/net/txgbe/txgbe_rxtx_vec_neon.c: In function ‘txgbe_rxq_rearm’: > > ../drivers/net/txgbe/txgbe_rxtx_vec_neon.c:37:15: warning: cast discards ‘volatile’ qualifier from pointer target type [-Wcast-qual] > > vst1q_u64((uint64_t *)&rxdp[i], zero); > > ^ > > ../drivers/net/txgbe/txgbe_rxtx_vec_neon.c:60:13: warning: cast discards ‘volatile’ qualifier from pointer target type [-Wcast-qual] > > vst1q_u64((uint64_t *)rxdp++, dma_addr0); > > ^ > > ../drivers/net/txgbe/txgbe_rxtx_vec_neon.c:65:13: warning: cast discards ‘volatile’ qualifier from pointer target type [-Wcast-qual] > > vst1q_u64((uint64_t *)rxdp++, dma_addr1); > > > > Hi Honnappa, > > There are multiple drivers ignores "-Wcast-qual" for neon implementation. > > Is there a better, more proper way to address this warning? rather than suppress the warning you could just cast away the volatile qualifier the common approach is to cast through uintptr_t to discard. volatile uint64_t *vp; uint64_t *p = (uint64_t *)(uintptr_t)vp; perhaps better than broad suppression of warnings. but does require code be reviewed to be certain it is okay to have the qualifier removed which i suspect is okay in functions that are inline assembly or intrinsics. > > > Thanks, > ferruh