netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Eric Dumazet <edumazet@google.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	netdev@vger.kernel.org
Subject: Re: [net-next:main 26/50] net/ipv4/tcp.c:4673:2: error: call to '__compiletime_assert_1030' declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct tcp_sock, __cacheline_group_end__tcp_sock_write_txrx) - offsetofend(struct tcp_sock, __cacheline_group_begin__tcp_sock_...
Date: Wed, 10 Apr 2024 10:28:31 -0700	[thread overview]
Message-ID: <db4d4a48-b581-4060-b611-996543336cd2@gmail.com> (raw)
In-Reply-To: <CANn89iJ8EcqiF8YCPhDxcp5t79J1RLzTh6GHHgAxbTXbC+etRA@mail.gmail.com>



On 4/8/2024 10:08 PM, Eric Dumazet wrote:
> On Tue, Apr 9, 2024 at 1:06 AM Vladimir Oltean <olteanv@gmail.com> wrote:
>>
>> Hi Eric,
>>
>> On Mon, Apr 08, 2024 at 10:49:35PM +0800, kernel test robot wrote:
>>>>> net/ipv4/tcp.c:4673:2: error: call to '__compiletime_assert_1030' declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct tcp_sock, __cacheline_group_end__tcp_sock_write_txrx) - offsetofend(struct tcp_sock, __cacheline_group_begin__tcp_sock_write_txrx) > 92
>>>> 4673                CACHELINE_ASSERT_GROUP_SIZE(struct tcp_sock, tcp_sock_write_txrx, 92);
>>
>> I can confirm the same compile time assertion with an armv7 gcc 7.3.1 compiler.
>> If I revert commit 86dad9aebd0d ("Revert "tcp: more struct tcp_sock adjustments")
>> it goes away.
>>
>> Before the change (actually with it reverted), I can see that the
>> tcp_sock_write_txrx cacheline group begins at offset 1821 with a 3 byte
>> hole, and ends at offset 1897 (it has 76 bytes).
> 
> 
> ...
> 
>> It gained 20 bytes in the change. Most notably, it gained a 4 byte hole
>> between pred_flags and tcp_clock_cache.
>>
>> I haven't followed the development of these optimizations, and I tried a
>> few trivial things, some of which didn't work, and some of which did.
>> Of those that worked, the most notable one was letting the 2 u64 fields,
>> tcp_clock_cache and tcp_mstamp, be the first members of the group, and
>> moving the __be32 pred_flags right below them.
>>
>> Obviously my level of confidence in the fix is quite low, so it would be
>> great if you could cast an expert eye onto this.
> 
> I am on it, do not worry, thanks !

Also just got hit by this on an ARMv7 build configuration as well.

Jakub, I do not see a 32-bit build in the various checks being run for a 
patch, could you add one, if nothing else a i386 build and a 
multi_v7_defconfig build would get us a good build coverage.

Thanks!
-- 
Florian

  reply	other threads:[~2024-04-10 17:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08 14:49 [net-next:main 26/50] net/ipv4/tcp.c:4673:2: error: call to '__compiletime_assert_1030' declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct tcp_sock, __cacheline_group_end__tcp_sock_write_txrx) - offsetofend(struct tcp_sock, __cacheline_group_begin__tcp_sock_ kernel test robot
2024-04-08 23:06 ` Vladimir Oltean
2024-04-09  5:08   ` Eric Dumazet
2024-04-10 17:28     ` Florian Fainelli [this message]
2024-04-10 17:33       ` Eric Dumazet
2024-04-11  1:36         ` Jakub Kicinski
2024-04-11 19:21           ` Florian Fainelli
2024-04-12  1:37             ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db4d4a48-b581-4060-b611-996543336cd2@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=olteanv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).