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 3E32E45C87; Tue, 5 Nov 2024 10:28:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C803A402B3; Tue, 5 Nov 2024 10:28:09 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id A71194025D for ; Tue, 5 Nov 2024 10:28:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730798888; 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=X+e3xHNv+fOvlexuBwr/Eyoz0SF6KhNUaFXnl6l6EdQ=; b=IfkPW5VJzu9GgroGuu74tr1t9apsuhdJYroYjpeqEG/bIRuqlMAQcpEr4Vz3YyFxfDsRoG s8pPK7GYjeuDly9jQvdjndqEkB160mH6hs9eek8QMp1qUphUMWlzl2829c4biTsgvaFuL+ njnD6MSzKuwTuNRtagW8LDvUYB9ZSts= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-63-jdjER3_VN5eYL8hqPPmnLw-1; Tue, 05 Nov 2024 04:28:07 -0500 X-MC-Unique: jdjER3_VN5eYL8hqPPmnLw-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2fb51681ac6so26498131fa.1 for ; Tue, 05 Nov 2024 01:28:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730798885; x=1731403685; 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=X+e3xHNv+fOvlexuBwr/Eyoz0SF6KhNUaFXnl6l6EdQ=; b=ELcc4bUx93XJ/oYdSTBjLBrHApaR0WH2NmtyDms+SYS4CeFR3GNNyq5g6ziIq7llM9 ES9BZw0oQ9Ed4lpwQexBw1wF3HUugXQYXwxuKXqP3IjLByCofAZPd/TVvjb+AWkQ63NG zWRco69iDuHic5tlYcf536IC0+Btwm88BOH6XkMU+2bNA83jGWe/5/llAPZzJKJ5+a9D OYp9YNY+oI3npata3IWUOtDKgL9FNNeFHuj4iHy98U83Q9Yo+Cq9x9T3dRinG6gXlikP Ik3yFikskSOcC8PWnkkcPJdeH+qQyGlPhQAIrKFC8C2MdODd0eCIngEXedcF/96omLPI b1ng== X-Gm-Message-State: AOJu0YwNnKd/+AamDfbnDn0D4Swv1Rn0UgArjCOUe7jxXdjiu9LUt5oW GYpUj4PRrKsSvw7pXG4b22i0KYm8n0H3dBHqQAYxIZoU1NHnn66zVazrFMHTKTVQTMDMJBC2Dqg YEcrDXRyacct2llXrDdHRfCX6GJOpdnI8qPyfGCQeRARu0ff4Lp0REbydbTl3mOL67DqxUYwsBz 2oVX3KgccSRmf67l4= X-Received: by 2002:a05:651c:114a:b0:2fa:faed:e86b with SMTP id 38308e7fff4ca-2fdef2778bdmr64263431fa.13.1730798885308; Tue, 05 Nov 2024 01:28:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHN4/bXnnYs/JZ+OpTQ3GqumrvLiIan+NMv/cwR5qbXjc4dvrtz46tzM6A4wGU2ucuDB5mj+1RvEUTWFPbbDho= X-Received: by 2002:a05:651c:114a:b0:2fa:faed:e86b with SMTP id 38308e7fff4ca-2fdef2778bdmr64263281fa.13.1730798884880; Tue, 05 Nov 2024 01:28:04 -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: Tue, 5 Nov 2024 10:27:53 +0100 Message-ID: Subject: Re: [PATCH] net: fix IPv4 cksum simple function To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: dev@dpdk.org, Robin Jarry , Stephen Hemminger , Chengwen Feng , Bruce Richardson , Andre Muezerie , Thomas Monjalon X-Mimecast-Spam-Score: 0 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: > > diff --git a/lib/net/rte_ip4.h b/lib/net/rte_ip4.h > > index 4dd0058cc5..f9b8333332 100644 > > --- a/lib/net/rte_ip4.h > > +++ b/lib/net/rte_ip4.h > > @@ -39,7 +39,7 @@ extern "C" { > > /** > > * IPv4 Header > > */ > > -struct rte_ipv4_hdr { > > +struct __rte_aligned(2) rte_ipv4_hdr { > > > I wonder why we have a convention of putting __rte_packed after the struc= t, and not between the "struct" tag and the name of the struct. > It would make the code much more readable having it here, like __rte_alig= ned(). > I agree that the previous convention was not great, as it has resulted in some funny jokes, like getting some __rte_XXX variables (in the absence of the right header inclusion defining __rte_XXX attribute macro). __rte_aligned() "conventional" location has been changed recently by Tyler. __rte_packed is still conventionnally placed in a "legacy" position around the dpdk tree. It could probably be moved in the same way. But there is still the question of packed structures with MSVC. Tyler proposal seemed to rely on the current __rte_packed conventional posi= tion. https://patchwork.dpdk.org/project/dpdk/patch/1713225913-20792-2-git-send-e= mail-roretzla@linux.microsoft.com/ Note that I am not a fan of this push/pop stuff. Maybe Andre will find a better solution. In any case, I prefer we keep __rte_packed position as is until this question is resolved. --=20 David Marchand