On 5/27/24 13:01, Eelco Chaudron wrote:
> This patch fixes a uninitialized gso_type case in
> netdev_linux_prepend_vnet_hdr().
> 
> Fixes: 3337e6d91c5b ("userspace: Enable L4 checksum offloading by default.")
> Signed-off-by: Eelco Chaudron <echau...@redhat.com>
> ---
>  lib/netdev-linux.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
> index eb0c5c624..239dc3299 100644
> --- a/lib/netdev-linux.c
> +++ b/lib/netdev-linux.c
> @@ -7142,7 +7142,8 @@ netdev_linux_prepend_vnet_hdr(struct dp_packet *b, int 
> mtu)
>      struct virtio_net_hdr v;
>      struct virtio_net_hdr *vnet = &v;
>  
> -    if (dp_packet_hwol_is_tso(b)) {
> +    if (dp_packet_hwol_is_tso(b)
> +        && (dp_packet_hwol_is_ipv4(b) || dp_packet_hwol_tx_ipv6(b))) {

Hmm.  This should generally not happen.  But, in case it does,
I think we need to print a warning and return with error instead
of ignoring the TSO request.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to