lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 8 Mar 2024 14:58:31 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Geetha sowjanya <gakula@...vell.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, kuba@...nel.org, 
	davem@...emloft.net, pabeni@...hat.com, sgoutham@...vell.com, 
	sbhatta@...vell.com, hkelam@...vell.com
Subject: Re: [net PATCH] octeontx2-pf: Do not use HW TSO when gso_size < 16bytes

On Fri, Mar 8, 2024 at 12:57 PM Geetha sowjanya <gakula@...vell.com> wrote:
>
> Hardware doesn't support packet segmentation when segment size
> is < 16 bytes. Hence add an additional check and use SW
> segmentation in such case.
>
> Fixes: 86d7476078b8 ("octeontx2-pf: TCP segmentation offload support").
> Signed-off-by: Geetha sowjanya <gakula@...vell.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
> index f828d32737af..2ac56abb3a0e 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
> @@ -967,6 +967,13 @@ static bool is_hw_tso_supported(struct otx2_nic *pfvf,
>  {
>         int payload_len, last_seg_size;
>
> +       /* Due to hw issue segment size less than 16 bytes
> +        * are not supported. Hence do not offload such TSO
> +        * segments.
> +        */
> +       if (skb_shinfo(skb)->gso_size < 16)
> +               return false;
> +
>         if (test_bit(HW_TSO, &pfvf->hw.cap_flag))
>                 return true;

How is this driver doing SW segmentation at this stage ?

You might perform this check in ndo_features_check() instead ?

otx2_sq_append_skb() is also forcing a linearization if
skb_shinfo(skb)->nr_frags >= OTX2_MAX_FRAGS_IN_SQE

This is quite bad, this one definitely should use ndo_features_check()
to mask NETIF_F_GSO_MASK for GSO packets.

Look at typhoon_features_check() for an example.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ