The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jay Vosburgh <jv@jvosburgh.net>
To: Hangbin Liu <hangbin.liu@linux.dev>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hangbin Liu <liuhangbin@gmail.com>,
	Hangbin Liu <liuhangbin@kylinos.cn>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net v2] bonding: fix u32 overflow in compute_gap()
Date: Mon, 17 Aug 2026 08:26:36 -0700	[thread overview]
Message-ID: <4137413.1786980396@famine> (raw)
In-Reply-To: <aoKwp6gTtSrnzR2n@fedora>

Hangbin Liu <hangbin.liu@linux.dev> wrote:

>Hi Jay,
>On Fri, Aug 14, 2026 at 01:39:23PM +0800, Hangbin Liu wrote:
[...]
>>  struct alb_bond_info {
>>  	struct tlb_client_info	*tx_hashtbl; /* Dynamically allocated */
>> -	u32			unbalanced_load;
>> +	s64			unbalanced_load;
>>  	atomic_t		tx_rebalance_counter;
>>  	int			lp_counter;
>>  	/* -------- rlb parameters -------- */
>
>Sashiko reported that on a 32-bit system, these s64 numbers' read/write
>operations and division will tear. We need to use div_s64() for divisions
>and may also need to convert the number to atomic64_t for read/write operations.
>
>Do you know how bonding support works on a 32-bit system? Should we handle it?

	Bonding should function correctly on a 32 bit system for as long
as the base kernel continues to support 32 bit builds.

	-J

---
	-Jay Vosburgh, jv@jvosburgh.net

      reply	other threads:[~2026-08-17 15:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  5:39 [PATCH net v2] bonding: fix u32 overflow in compute_gap() Hangbin Liu
2026-08-17  6:56 ` Hangbin Liu
2026-08-17 15:26   ` Jay Vosburgh [this message]

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=4137413.1786980396@famine \
    --to=jv@jvosburgh.net \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hangbin.liu@linux.dev \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=liuhangbin@kylinos.cn \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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