On 27 May 2024, at 16:56, Ilya Maximets wrote:

> 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 <[email protected]>
>> ---
>>  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.

ACK, will make it an error case in v2. Mike any reason why you added the extra 
check in the else clause rather than keep it as is?

Cheers,

Eelco

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to