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 AA0B9A0524; Thu, 29 Apr 2021 22:09:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CBC6410DD; Thu, 29 Apr 2021 22:09:23 +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 105A7410D7 for ; Thu, 29 Apr 2021 22:09:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619726961; 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: in-reply-to:in-reply-to:references:references; bh=SfRcS7ZY6jVwSoDKDhFBqhakgVX2MB6nHxDO4Tdm51k=; b=LGmtL1pT0Z8X8OlcZ+0tAFONLz8PUpMVroAN/abQRi7cME5g0IjhZUFMClYr/D6TQ0eXoN 5uqCp2t6Mduhb9Qxhq3805zECVv+k9ZM8TQV5qSm7bHnErazUkZ2r7p7Jjm95DGxWzEbHd KhbhmbC48xhjlJsXnAKv9MZsq86vjJg= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-509-GgwHLfroPvyW8jnRve3hvg-1; Thu, 29 Apr 2021 16:09:19 -0400 X-MC-Unique: GgwHLfroPvyW8jnRve3hvg-1 Received: by mail-vk1-f199.google.com with SMTP id v16-20020a1fac100000b02901ce81711b6aso11708602vke.1 for ; Thu, 29 Apr 2021 13:09:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SfRcS7ZY6jVwSoDKDhFBqhakgVX2MB6nHxDO4Tdm51k=; b=bPYyH5SmjeM7CCDT8Mab+BTLpUvFKOyyMzCdcgHrEPsBm2e24pnmb3aAJkyufx02KM 4PWZBbTzkEATNTqGYzGfdwniKPpHT0Yl3Wsncjj87sHjfgwcpyXOsjLLkBtpFJnqauCH Hm3LTBXcJytPC4S053lfFrO2GXj5eXkRvGkIFPXqApJXT7+2xUCSk1NmavBSENbbgTzu ODIDo8HElKusEassRXdlstRloBoVb6q7MP82++jifk/tL8GcZGswMtFO6Nngl9gpJ3w1 iMTkAxpJv/p0fcbg/r6jwEyKxytNjdBCPQ8z2FChrgK++aV6sV4wn26p1eM8HlwY9iba 0DNw== X-Gm-Message-State: AOAM533u4xfcKMQho8WkjHsy8dAMUFz4ZXkMutYSJenxkd9Bn7FvxI+D UNe6FcUGfl+njaLLCqihX9pXUSJGZ+DE3lhCeNMrOB2WyQvL2sUhwYoZmVTC2U5d77Kd1iKDhDi gI7IqIx5nRE1PiCjLmJ0= X-Received: by 2002:ab0:60d5:: with SMTP id g21mr1316825uam.53.1619726958769; Thu, 29 Apr 2021 13:09:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhS+kpF2J0i+S25MfDXk50+8Q0WiHGziiLg0PRXbbOZXmyR/Gkvgef9TjHa7oxi8tRhCKDkHd5MOzqQGp6xTI= X-Received: by 2002:ab0:60d5:: with SMTP id g21mr1316799uam.53.1619726958516; Thu, 29 Apr 2021 13:09:18 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <7a03c3ac-95bf-ff34-3485-71ec03145a05@redhat.com> From: David Marchand Date: Thu, 29 Apr 2021 22:09:07 +0200 Message-ID: To: Maxime Coquelin Cc: dev , Olivier Matz , Flavio Leitner , Ilya Maximets , Chenbo Xia , Jijiang Liu , "Stokes, Ian" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Thu, Apr 29, 2021 at 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/ Ok. > > > 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(-) A release note update is missing. -- David Marchand