[dpdk-dev] [PATCH v2 4/4] vhost: fix offload flags in Rx path

Maxime Coquelin maxime.coquelin at redhat.com
Thu Apr 29 15:31:17 CEST 2021



On 4/29/21 3:30 PM, Maxime Coquelin wrote:
> 
> 
> On 4/29/21 10:04 AM, David Marchand wrote:
>> The vhost library current configures Tx offloading (PKT_TX_*) on any
> 
> s/current/currently/
> 
>> packet received from a guest virtio device which asks for some offloading.
>>
>> This is problematic, as Tx offloading is something that the application
>> must ask for: the application needs to configure devices
>> to support every used offloads (ip, tcp checksumming, tso..), and the
>> various l2/l3/l4 lengths must be set following any processing that
>> happened in the application itself.
>>
>> On the other hand, the received packets are not marked wrt current
>> packet l3/l4 checksumming info.
>>
>> Copy virtio rx processing to fix those offload flags but accepting
>> VIRTIO_NET_HDR_GSO_ECN and VIRTIO_NET_HDR_GSO_UDP too.
>>
>> The vhost example has been updated accordingly: TSO is applied to any
>> packet marked LRO.
>>
>> Fixes: 859b480d5afd ("vhost: add guest offload setting")
>>
>> Signed-off-by: David Marchand <david.marchand at redhat.com>
>> ---
>> Changes since v1:
>> - updated vhost example,
>> - restored VIRTIO_NET_HDR_GSO_ECN and VIRTIO_NET_HDR_GSO_UDP support,
>> - restored log on buggy offload request,
>>
>> ---
>>  examples/vhost/main.c  |  42 +++++++------
>>  lib/vhost/virtio_net.c | 139 +++++++++++++++++------------------------
>>  2 files changed, 78 insertions(+), 103 deletions(-)
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> 

As I understand it, this change kind of break the ABI, but it is
actually fixing a misuse of the mbuf API, so I think we should
take this patch.



More information about the dev mailing list