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 2A6F8A00C4; Fri, 5 Aug 2022 17:37:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBE4342C0C; Fri, 5 Aug 2022 17:37:27 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id A8F1A400D6 for ; Fri, 5 Aug 2022 17:37:26 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id o5-20020a17090a3d4500b001ef76490983so3217720pjf.2 for ; Fri, 05 Aug 2022 08:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AgMZMxwqJz7tIWky5KEnAtd6r+YcrDFCHJ5lgdAWc9M=; b=q3pCL7DqQRoMtEz3YWldWxIdY5I4Fw7ENyPksJ4vkSdIqK5cX8wwqsP8dnRy2B9371 4Bv6uXK9ouJF4Hw6IN70B+a2Vev3SHNqMdC1JR49QxSgS7PUNCKfvmgivJjvndvEma0A ZKzhjDDSUn19AGb2P23qIIv67NOeJPoTy5TiL+jV7g1ClUAUXFhUptpusz5ytu+hrSt9 Ivzv70VXwv0zj2yQJ8NktBTzfJixHOy42P/td/2esrRqKkg/rzeoAcXox/kXeUhhQR87 TJqCuqf2bLMiPZNX1IqsNmiHh7Uni86OAbJ+oJRdMYoz0rPaUfibFt862XX1z9f/VCqz nJVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AgMZMxwqJz7tIWky5KEnAtd6r+YcrDFCHJ5lgdAWc9M=; b=2928/vzDM6BcifQvpe7Z3eaJTo/xB6AEkXFOUXOh4XYacxD0C/F/Mc4U04ln/KKZKk Mi4bvEm8Lkp1c7N3NF8vKStui0Qig3IGXJdSAP/1rzSgwwQgQWmvMtgN9s0xvs29nq+R 4AUtEwOOdZtTanNhVmMHeyAONYX33leKk76mwGSMbUSPgMdw9u5upilWRF73Blihfn3d +OFbIeHbIsaikMlyVSp+uRXfFCmlr/WdWGZCK2w8e2yV7pIMs0NpDApV4vGG/p95Xs3B PR2MmbQ4XpfP+uSXXZ38+hCflnP17A/G3TB9Xcu2kPFWId/nxpl4gFEKDGFoBt8G5o5e qupw== X-Gm-Message-State: ACgBeo3fOk+eOHCqX3PdgSfE1/k5pCiYnq8rBZm6PdvqPGc1jXxF+us8 jafiqVzbpTMSXIrM0yk8YOPiJg== X-Google-Smtp-Source: AA6agR5A11hx71BGUKxbBq6ms4XzMavdv9qjblK5PkYKVeEmopCPJ+CEGMBBOZrRF/ac8HmVujeioA== X-Received: by 2002:a17:902:8c82:b0:16e:e00c:5ee0 with SMTP id t2-20020a1709028c8200b0016ee00c5ee0mr7224171plo.80.1659713845866; Fri, 05 Aug 2022 08:37:25 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id d12-20020a170903230c00b0016ed5266a5csm3252988plh.170.2022.08.05.08.37.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 08:37:25 -0700 (PDT) Date: Fri, 5 Aug 2022 08:37:23 -0700 From: Stephen Hemminger To: Amit Prakash Shukla Cc: Honnappa Nagarahalli , Konstantin Ananyev , , , Subject: Re: [PATCH] ring: compilation fix with GCC-12 Message-ID: <20220805083723.6554c3fd@hermes.local> In-Reply-To: <20220805090348.1947658-1-amitprakashs@marvell.com> References: <20220805090348.1947658-1-amitprakashs@marvell.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 Fri, 5 Aug 2022 14:33:48 +0530 Amit Prakash Shukla wrote: > GCC 12 raises the following warning: > > In function '__rte_ring_dequeue_elems_128', > inlined from '__rte_ring_dequeue_elems' at > ../lib/ring/rte_ring_elem_pvt.h:262:3, > inlined from '__rte_ring_do_hts_dequeue_elem' at > ../lib/ring/rte_ring_hts_elem_pvt.h:237:3, > inlined from 'rte_ring_mc_hts_dequeue_bulk_elem' at > ../lib/ring/rte_ring_hts.h:83:9, > inlined from 'rte_ring_dequeue_bulk_elem' at > ../lib/ring/rte_ring_elem.h:391:10, > inlined from 'rte_ring_dequeue_elem' at > ../lib/ring/rte_ring_elem.h:476:9, > inlined from 'rte_ring_dequeue' at > ../lib/ring/rte_ring.h:463:9, > inlined from 'rxa_intr_ring_dequeue' at > ../lib/eventdev/rte_event_eth_rx_adapter.c:1196:10: > ../lib/ring/rte_ring_elem_pvt.h:234:25: error: 'memcpy' writing > 32 bytes into a region of size 8 overflows the destination > [-Werror=stringop-overflow=] > 234 | memcpy((void *)(obj + i), (void *)(ring + idx), 32); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Replacing memcpy with rte_memcpy fixes the GCC-12 compilation issue. > Also it would be better to change to rte_memcpy as the function is > called in fastpath. > > Bugzilla ID: 1062 > Fixes: 1fc73390bcf5 ("ring: refactor exported headers") > Cc: stable@dpdk.org > > Signed-off-by: Amit Prakash Shukla This seems to be just using a different routine and in effect wallpapering over a possibly valid warning.