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 B2D2545C9E; Wed, 6 Nov 2024 21:23:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CFFFF42EA7; Wed, 6 Nov 2024 21:23:06 +0100 (CET) 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 295E142E54 for ; Wed, 6 Nov 2024 21:23:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730924584; 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=JkZnG1FfTAQ30TSlBZo8pzHbdxAP/wno+ae8BnUAVas=; b=OQeZ4PMk2MBANPbPnUWF20pBsVf7Kjofts/G6+TNEfz/eSyIkEEwAlQfCiSrlhRIosI+7A UeJ4z0MRrOfe89GOawJqgjQtn9kCzl4iqew2/0cOr5+T+ZthdQWxmG0g9Egn/eH0uDlpFg qwAikfcG9zkjrUspkyqvgDhyMVQdDME= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-262-9rqDFPeFM5i3fE8Vp3gf6Q-1; Wed, 06 Nov 2024 15:23:03 -0500 X-MC-Unique: 9rqDFPeFM5i3fE8Vp3gf6Q-1 X-Mimecast-MFC-AGG-ID: 9rqDFPeFM5i3fE8Vp3gf6Q Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-539eaa055feso73701e87.1 for ; Wed, 06 Nov 2024 12:23:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730924582; x=1731529382; 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=JkZnG1FfTAQ30TSlBZo8pzHbdxAP/wno+ae8BnUAVas=; b=dwadj23cEzHpAnUh6tZCn6jb+xxTfAsOIR52LmmHKkpwnqzWt9mpD5R1Kv1TqB0SY3 W5rusAixgsWn3WBKmF6OvIiCpt1Yptm70eq7cBWEPhU+CYZ/mq8BU885fAyvrrHbl6Go ZfIBO/2m6DKogKM5RL6/KcsvrA8fF4KPUFlx+e1roF8yZhJWRFldU4n49XYy5TTBQtjA NLAc33jn5eX8LxUKMB+2zGEgtSI77bEJYJYF9ui4WBGf9wgkIYk5KX0ryiu7aEWXP0Ur yr6aPWmDD4+Hpe4ahlvbUFFoJtzp0835sI/Y3+OgRU3yxX48eu48oZWc3QhkahNQQvoM spfA== X-Gm-Message-State: AOJu0YwBGm/cwJRwyPSUxGboimqcJYVkYu8Xr1D+m3xPOekSaLXggJ0l 9L2HE6IuYLEh/gCrQFxKNTzPgkGIM3eWpk91piKoeN0j64mpia4z57tGBefKrAp6Tq4KJYBBGgr yTJq/EZ/zghPOnn3QbBZPRlGen1+Q59UyL+uI/1v0AL6vCxOh/1kS330nEwkzQk4F7a+LcNDfmR dnBWfF3CoUSSWaZqc= X-Received: by 2002:a05:6512:1047:b0:53a:aea:a9e1 with SMTP id 2adb3069b0e04-53c79ea5d42mr12172765e87.54.1730924581832; Wed, 06 Nov 2024 12:23:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2/2If+C4U8MYRgZ25M98OOpb1lrW06UrwU02nn6/YtXIV7bDRNs3FZrOYG7WyxsmY9v4eKePRpENtPOdZTLI= X-Received: by 2002:a05:6512:1047:b0:53a:aea:a9e1 with SMTP id 2adb3069b0e04-53c79ea5d42mr12172756e87.54.1730924581422; Wed, 06 Nov 2024 12:23:01 -0800 (PST) MIME-Version: 1.0 References: <20241105085912.4148208-1-david.marchand@redhat.com> <98CBD80474FA8B44BF855DF32C47DC35E9F877@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F877@smartserver.smartshare.dk> From: David Marchand Date: Wed, 6 Nov 2024 21:22:50 +0100 Message-ID: Subject: Re: [PATCH] net: fix IPv4 cksum simple function To: David Marchand Cc: dev@dpdk.org, Robin Jarry , Stephen Hemminger , Chengwen Feng , Bruce Richardson , =?UTF-8?Q?Morten_Br=C3=B8rup?= X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: rxnWV7B1TreYMX_K8P5ky9s1JvsSrfGzU2LIt64k0LU_1730924582 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 Tue, Nov 5, 2024 at 10:09=E2=80=AFAM Morten Br=C3=B8rup wrote: > > > From: David Marchand [mailto:david.marchand@redhat.com] > > Sent: Tuesday, 5 November 2024 09.59 > > > > The new function breaks compilation with -Wcast-align. > > > > In file included from /home/runner/work/ovs/ovs/dpdk- > > dir/include/rte_ip.h:9: > > /home/runner/work/ovs/ovs/dpdk-dir/include/rte_ip4.h:191:10: > > error: cast from 'const uint8_t *' (aka 'const unsigned char *') > > to 'const unaligned_uint16_t *' (aka 'const unsigned short *') > > increases required alignment from 1 to 2 [-Werror,-Wcast-align] > > v16_h =3D (const unaligned_uint16_t *)&ipv4_hdr->version_ihl; > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > Fix this by aligning rte_ipv4_hdr to two bytes, and point at the start > > of the structure rather than the first field (which happens to be 1 > > byte > > large). > > > > Fixes: f9e1d67f237a ("net: add IPv4 cksum function for simple cases") > > > > Signed-off-by: David Marchand Applied, thanks. --=20 David Marchand