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 478B6A0C41 for ; Tue, 30 Nov 2021 17:41:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41C2141186; Tue, 30 Nov 2021 17:41:14 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 424BC411CB for ; Tue, 30 Nov 2021 17:41:13 +0100 (CET) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 1AABB3F1ED for ; Tue, 30 Nov 2021 16:41:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290473; bh=IadRvuVtofCgSrr6fcEqiJ1mBqchNE9QE8vecwo1TxU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=e7Vh/4Ch+rB6jFD/7VQ4vhsm2inl3SizQkY2nHx9KeCXoeHg7yLH2ah8btdwNZWgY vfMuT1lSfbsNUyd/SwqXKaLMHQ7Wnx0Wg6XbX63ko1hoXAw751VgJCq/AAHx9Zvb3n P2vh4EZaLY4asbG2wKX+6WVGxV70fFEnbDMuuZbKcIZ92Y3T4dud5a/y9jYSkmRSHI TPxNvCVwCMw1b6tS86yWTeLBawMNP9y4mUyRE3zhcHv488K3xcFdD6TXfu34fQji1m LHdMLtueAJVluyZZiUSsGbT5xxWjBkLyxfgzif1ZIUqQYdExKfObqQZkBDT5Uttgh3 cZ2uxEegQjcVA== Received: by mail-ed1-f69.google.com with SMTP id bx28-20020a0564020b5c00b003e7c42443dbso17409471edb.15 for ; Tue, 30 Nov 2021 08:41:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IadRvuVtofCgSrr6fcEqiJ1mBqchNE9QE8vecwo1TxU=; b=oTafmWGoePbozTE1tNuMrlRaMOctTGc/ZHfS8re7kDr7wWDUFPvZv9/8Uka0HkOuHf axNGM4HvLCTzZqjpTegM++o8pCM264FaMnEnj4ZNyfNqy4M8omcP/b8XahOqewO6fgNF QpTvQED3pp7u0vFz49dfFrKaZ/TETxa9MIzbOqjELLICR37rJopMqyH5Hbr4fq/gRshk k2dXzVD+kvIHMbySoNf2XIUQMufMKQva2nVR4sbZmOGrcHIs6mijr4ObUcFsW93ZM/Fs n6RF31vPG7c1URVtbXN4r+gz2gpL+75kFivD6fMNVA3/O4F6imPenhqZ7pTCZYSIkUBR FIWw== X-Gm-Message-State: AOAM533OqkTal7LMaeO95R7D6Nl2Md3hvgLnEIZT/SkL1V7ETIBKowcb v0xe85zJcIY44RC5i4VbQluk4I8LHJU6eyO00CmmmpgL3Ldop2QjNPHbMuWFFEuFt2ulon2fPAc 1nu2umxet8gxY+XtnKEkbkKW1 X-Received: by 2002:a05:6402:84f:: with SMTP id b15mr18674edz.375.1638290472702; Tue, 30 Nov 2021 08:41:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2/oa0ZvlNiL5XUmTA68X3v+lCxnJzQArVFdzwVbtvSRL8cXKNB7+YWBxMp+7AQfmjWcbYXw== X-Received: by 2002:a05:6402:84f:: with SMTP id b15mr18613edz.375.1638290472300; Tue, 30 Nov 2021 08:41:12 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id kx3sm9154519ejc.112.2021.11.30.08.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:41:11 -0800 (PST) From: christian.ehrhardt@canonical.com To: Eli Britstein Cc: Olivier Matz , dpdk stable Subject: patch 'mbuf: avoid cast-align warning in data offset macro' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:35:03 +0100 Message-Id: <20211130163605.2460997-99-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/6c88235a91df0cc538d8035870eb8fbdb52e0b55 Thanks. Christian Ehrhardt --- >From 6c88235a91df0cc538d8035870eb8fbdb52e0b55 Mon Sep 17 00:00:00 2001 From: Eli Britstein Date: Thu, 21 Oct 2021 11:51:31 +0300 Subject: [PATCH] mbuf: avoid cast-align warning in data offset macro [ upstream commit da0333c8790b365c6aa8665888a20253c4166bfe ] In rte_pktmbuf_mtod_offset macro, there is a casting from char * to type 't', which may cause cast-align warning when using strict cast align flag with supporting gcc: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 CFLAGS="-Wcast-align=strict" make V=1 -C examples/l2fwd clean static main.c: In function 'l2fwd_mac_updating': /dpdk/build/include/rte_mbuf_core.h:719:3: warning: cast increases required alignment of target type [-Wcast-align] 719 | ((t)((char *)(m)->buf_addr + (m)->data_off + (o))) | ^ /dpdk/build/include/rte_mbuf_core.h:733:32: note: in expansion of macro 'rte_pktmbuf_mtod_offset' 733 | #define rte_pktmbuf_mtod(m, t) rte_pktmbuf_mtod_offset(m, t, 0) | ^~~~~~~~~~~~~~~~~~~~~~~ As the code assumes correct alignment, add first a (void *) casting, to avoid the warning. Fixes: af75078fece3 ("first public release") Signed-off-by: Eli Britstein Acked-by: Olivier Matz --- lib/librte_mbuf/rte_mbuf_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h index e7f38422e7..b97b811366 100644 --- a/lib/librte_mbuf/rte_mbuf_core.h +++ b/lib/librte_mbuf/rte_mbuf_core.h @@ -739,7 +739,7 @@ struct rte_mbuf_ext_shared_info { * The type to cast the result into. */ #define rte_pktmbuf_mtod_offset(m, t, o) \ - ((t)((char *)(m)->buf_addr + (m)->data_off + (o))) + ((t)(void *)((char *)(m)->buf_addr + (m)->data_off + (o))) /** * A macro that points to the start of the data in the mbuf. -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:11.606680909 +0100 +++ 0099-mbuf-avoid-cast-align-warning-in-data-offset-macro.patch 2021-11-30 16:50:05.898874322 +0100 @@ -1 +1 @@ -From da0333c8790b365c6aa8665888a20253c4166bfe Mon Sep 17 00:00:00 2001 +From 6c88235a91df0cc538d8035870eb8fbdb52e0b55 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit da0333c8790b365c6aa8665888a20253c4166bfe ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org @@ -31 +32 @@ - lib/mbuf/rte_mbuf_core.h | 2 +- + lib/librte_mbuf/rte_mbuf_core.h | 2 +- @@ -34,5 +35,5 @@ -diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h -index 117a72a134..321a419c71 100644 ---- a/lib/mbuf/rte_mbuf_core.h -+++ b/lib/mbuf/rte_mbuf_core.h -@@ -823,7 +823,7 @@ struct rte_mbuf_ext_shared_info { +diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h +index e7f38422e7..b97b811366 100644 +--- a/lib/librte_mbuf/rte_mbuf_core.h ++++ b/lib/librte_mbuf/rte_mbuf_core.h +@@ -739,7 +739,7 @@ struct rte_mbuf_ext_shared_info {