Re: [RFC PATCHv6 3/7] ipvs: use u64_stats_t for the per-cpu counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Hello,

On Sat, 12 Nov 2022, Julian Anastasov wrote:

> +			for (;;) {
> +				start += u64_stats_fetch_begin(&c->syncp);

	Hm, this should be assignment and not addition...
Not a problem for 64-bit tests.

> +				kconns += u64_stats_read(&c->cnt.conns);
> +				kinpkts += u64_stats_read(&c->cnt.inpkts);
> +				koutpkts += u64_stats_read(&c->cnt.outpkts);
> +				kinbytes += u64_stats_read(&c->cnt.inbytes);
> +				koutbytes += u64_stats_read(&c->cnt.outbytes);
> +				if (!u64_stats_fetch_retry(&c->syncp, start))
> +					break;
> +#if BITS_PER_LONG == 32
> +				kconns = conns;
> +				kinpkts = inpkts;
> +				koutpkts = outpkts;
> +				kinbytes = inbytes;
> +				koutbytes = outbytes;
> +#endif

Regards

--
Julian Anastasov <ja@xxxxxx>




[Index of Archives]     [Linux Filesystem Devel]     [Linux NFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [X.Org]

  Powered by Linux