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 CA21FA0C40 for ; Fri, 30 Jul 2021 12:57:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B829340042; Fri, 30 Jul 2021 12:57:46 +0200 (CEST) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id 8FA7540141 for ; Fri, 30 Jul 2021 12:57:45 +0200 (CEST) Received: by mail-wr1-f50.google.com with SMTP id b7so10781421wri.8 for ; Fri, 30 Jul 2021 03:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PFxDGTEjlp3vRoNLEsJI5tOZ/7t8CuulFshbJVYc9tE=; b=DLlNTM+YsHc1tGSW7QCaSxfuicEzRpvayWmR9A7rd53YQeGoe6HS3yn67kZPRgHPTy iZGjYxvUmKeA/F4MyiJsYNoU3oXaqhPEd27RChfSXVxenxH24TxeWXxE+T9zifXELEeE J+fdcEg4cMTn5+LI/TssUuccBNOTZjILYd+TuGnEusTOFAfXZVsDGGHu73rRUunSHtJM Nn5AgMeUolnMYaT883C1dOD38z6BLXjsPk6Fr0KRI+vFFCfCLJxosOJQkdlElICg1Wuf 8dFp1V3yi5H6JanGtxtnD8vRtbN7ezDwf8uZ84BLVngQ8UGTKAmPYoO+jKpVG/r4Ntce owng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PFxDGTEjlp3vRoNLEsJI5tOZ/7t8CuulFshbJVYc9tE=; b=f74sujfupU/fRyMX55OKFNaHTKKjbQdK+XK9lJu/OBF5ow8LOPPOqSkIfIOPjnqTyA ZYIYyNJRSZWXraZ6s6mFMAMEvo4RfLDGiKhPIYE8inTd0Slq7yb9viidGvUVMRk516Gd orXQpH1r05f068rgaE2X4/cTquO4Ne/HzYD/tD6LGxJhHjqvO73AxGNda3hWEpToK1gy kOw76gCtnVScx/T3NryatiN0I+S+naeOA6x3HkMHL+ND5m7nPB6ubQ80DMgRxULpJKRJ NpcWTtdlNZNjhvb+cnrD9FtPylvpOaLJwoOQU7rmAonGtKU/q3e8kCZgqnLg0HTK3sL7 onjA== X-Gm-Message-State: AOAM530FVAfbgIJAnWU7HWmCIokyD6QdD6fb2jWLI/R/FJztZO3SNwIX coKXY7zTBDQPjk9Yihsl93nm+g== X-Google-Smtp-Source: ABdhPJyYHSMEPMByXGxWQtxJKkwK6aaTFI5lnTxtHJb6SAnqW6fkY3TsOdSm0woV5RaXySdi//bVvw== X-Received: by 2002:adf:e10c:: with SMTP id t12mr2366673wrz.36.1627642665353; Fri, 30 Jul 2021 03:57:45 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id j14sm1338247wru.58.2021.07.30.03.57.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jul 2021 03:57:44 -0700 (PDT) Date: Fri, 30 Jul 2021 12:57:43 +0200 From: Olivier Matz To: Eli Britstein Cc: dev@dpdk.org, Ilya Maximets , Gaetan Rivet , Majd Dibbiny , Asaf Penso , Thomas Monjalon , Harry Van Haaren , stable@dpdk.org Message-ID: References: <20210713064910.12793-1-elibr@nvidia.com> <20210713064910.12793-2-elibr@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210713064910.12793-2-elibr@nvidia.com> Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 1/3] net: avoid cast-align warning in VLAN insert function 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 Sender: "stable" On Tue, Jul 13, 2021 at 09:49:08AM +0300, Eli Britstein wrote: > In rte_vlan_insert there is a casting of rte_pktmbuf_prepend returned > value to (struct rte_ether_hdr *), which causes cast-align warning when > using gcc flags '-Werror -Wcast-align': > > In file included from .../include/rte_ethdev.h:165, > from lib/netdev-dpdk.c:33: > .../include/rte_ether.h: In function 'rte_vlan_insert': > .../include/rte_ether.h:375:7: error: cast increases required alignment > of target type [-Werror=cast-align] > 375 | nh = (struct rte_ether_hdr *) > | ^ > > As the code assumes correct alignment, add first a (void *) casting, to > avoid the warning. > > Fixes: c974021a5949 ("ether: add soft vlan encap/decap") > Cc: stable@dpdk.org > > Signed-off-by: Eli Britstein Acked-by: Olivier Matz