Re: [PATCH net 2/2] nfp: flower: fix hardware offload for the transfer layer port

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

 



On Fri,  8 Dec 2023 08:59:56 +0200 Louis Peens wrote:
> +		if (mangle_action->mangle.offset == offsetof(struct tcphdr, source)) {
> +			mangle_action->mangle.val =
> +				(__force u32)cpu_to_be32(mangle_action->mangle.val << 16);
> +			mangle_action->mangle.mask =
> +				(__force u32)cpu_to_be32(mangle_action->mangle.mask << 16 | 0xFFFF);

This a bit odd. Here you fill in the "other half" of the mask with Fs...

> +		}
> +		if (mangle_action->mangle.offset == offsetof(struct tcphdr, dest)) {
> +			mangle_action->mangle.offset = 0;
> +			mangle_action->mangle.val =
> +				(__force u32)cpu_to_be32(mangle_action->mangle.val);
> +			mangle_action->mangle.mask =
> +				(__force u32)cpu_to_be32(mangle_action->mangle.mask);
> +		}

.. but here you just let it be zero.

If it's correct it'd be good to explain in the commit msg why.
-- 
pw-bot: cr




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux