From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F21B5A0547; Thu, 29 Apr 2021 15:31:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D81D3410DD; Thu, 29 Apr 2021 15:31:29 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 01B86406FF for ; Thu, 29 Apr 2021 15:31:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619703087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m3ETWHGbbfNQVunKs6QtBFn9YumKR9U2WLMqzVdyUag=; b=iXKhrqFRmOCKTYJXVIzVUUw598gq6bMTmerHIYinU/g0BEO41BV09GGkBSBFLrll8ymG/Y +UL8mZ1+PJ5ySa0ItpFdXvZUEI1rI9AITLkPOE1UM2aMuH5vkPZw1vJewspRbEChD3ZtJ2 iHzhJkb5FX8Lh/NjmjgTeb67P/NG0Qo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-385-xvi0NeJaMfCqDGV3vco3yQ-1; Thu, 29 Apr 2021 09:31:25 -0400 X-MC-Unique: xvi0NeJaMfCqDGV3vco3yQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8E9A1501EE; Thu, 29 Apr 2021 13:31:23 +0000 (UTC) Received: from [10.36.110.52] (unknown [10.36.110.52]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 957285D6DC; Thu, 29 Apr 2021 13:31:18 +0000 (UTC) From: Maxime Coquelin To: David Marchand , dev@dpdk.org Cc: olivier.matz@6wind.com, fbl@sysclose.org, i.maximets@ovn.org, Chenbo Xia , Jijiang Liu , "Stokes, Ian" References: <20210401095243.18211-1-david.marchand@redhat.com> <20210429080438.15032-1-david.marchand@redhat.com> <20210429080438.15032-5-david.marchand@redhat.com> <7a03c3ac-95bf-ff34-3485-71ec03145a05@redhat.com> Message-ID: <54d907c8-a49a-0ccb-2886-4a27474860c1@redhat.com> Date: Thu, 29 Apr 2021 15:31:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <7a03c3ac-95bf-ff34-3485-71ec03145a05@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 4/4] vhost: fix offload flags in Rx path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 >> --- >> 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 > 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.