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 EDCCBA0547; Thu, 29 Apr 2021 15:30:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC993410DD; Thu, 29 Apr 2021 15:30:27 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5F112406FF for ; Thu, 29 Apr 2021 15:30:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619703025; 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=n6Sp1ie5O3H6WnO57woOAUfQv1Wa8SlNQMUIer1/Z/o=; b=QxeyQf4NwiS/f6qLuqHAmC2MgZBTAhniwyNKAzoxhjUuYh+wl+FzZ4Yhx7nqh9BfRmzdz2 0/eg2uVC/CsCQyIwPz/kcTRPDOQPluVa62ijre4ZOxKUPTNxm/aFOUcd9fIbx/mLC6/R0M sKy/UhrFOQkDWyLUfZ2yGkBMqv3urPo= 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-260-sFOEIVUPMka382rR7DNHgg-1; Thu, 29 Apr 2021 09:30:23 -0400 X-MC-Unique: sFOEIVUPMka382rR7DNHgg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EEEA0107ACFA; Thu, 29 Apr 2021 13:30:19 +0000 (UTC) Received: from [10.36.110.52] (unknown [10.36.110.52]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA8F960C5B; Thu, 29 Apr 2021 13:30:14 +0000 (UTC) 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> From: Maxime Coquelin Message-ID: <7a03c3ac-95bf-ff34-3485-71ec03145a05@redhat.com> Date: Thu, 29 Apr 2021 15:30:13 +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: <20210429080438.15032-5-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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: 8bit 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 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