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 08EF4A0547; Thu, 29 Apr 2021 21:18:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF532410DD; Thu, 29 Apr 2021 21:18:34 +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 D1BEE410D7 for ; Thu, 29 Apr 2021 21:18:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619723913; 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=MmYulOGrxKv7mOdTqQxd7olnziDmJ4nOdOKemI/nCcs=; b=d+oijpR35eaMvT3i9YvJGuuKbE2Yal4NF4OdYYmLfR98NRfbjTYgMatwbMCtWw6FiG1LoC Duofj/BFicYMeEMbV9KaRJGTv2Onjcmg5w4rmFlrVXX6rnEbubfW5F6GA5WXjAVetGQFv+ efMX7B+b56bYqKfIZILyv9DYk63NR0s= Received: from mail-vs1-f72.google.com (mail-vs1-f72.google.com [209.85.217.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-97-Z1RjHOlnMCy7TzwPjgI3qw-1; Thu, 29 Apr 2021 15:18:29 -0400 X-MC-Unique: Z1RjHOlnMCy7TzwPjgI3qw-1 Received: by mail-vs1-f72.google.com with SMTP id z7-20020a67ca070000b0290220c083d3acso13561962vsk.21 for ; Thu, 29 Apr 2021 12:18:29 -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=MmYulOGrxKv7mOdTqQxd7olnziDmJ4nOdOKemI/nCcs=; b=cXPB2Fom+nNFGYCBmyRQOvQe/FxDXsMHQOBfIvvLi49gIHIe2VTJiz7Sy9ISOHTAF+ H/aURVZHJ5kvqZbqP2dVGf6AN3Q/SZT4M1RK5OZdGiyMCRHMc3U1UL8y3I67IoYFndQX COmXDV9X1FHUPnNEFxUPFsOAhDkdPKSWxD6FIOvN+98vd7nY07k6AQ8fyesAM4ALI2KX WWlOzydRDNpXaOMo8hNSgBPLZB/1/IPkVitgtV8DRRvwP6sNWe6N7l67jV2+HcGXX2Vx hWLHH1Jyb0rjkcaE9QL6qJF0nQILf5PE7ScIQIvFbz4VBjDtD7NuIA/nb7a8u+sy2cqJ 1W/w== X-Gm-Message-State: AOAM531cMZUjDiYRwvXmDujPUvY74yXD1lGlwi5lZGbMdbtGV95V7Kh6 xfBcLo4cCAeSuh8fPubfPVA2JDEqmkNHc33KiCDuDi+6sb3p0EyrDxe+tKwCThrBrjOc0qzr6kg PVZ1p7N79+kDzZmaR1D0= X-Received: by 2002:a05:6102:348:: with SMTP id e8mr2421900vsa.10.1619723908957; Thu, 29 Apr 2021 12:18:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiwbIbSQX2DKyDr8pnbTSvLMZHgfJ/787bXZ5B582aXSFoCJ66SAHGFx3zXp65tQvBw5DmsdEoRU/kIwzL/gg= X-Received: by 2002:a05:6102:348:: with SMTP id e8mr2421869vsa.10.1619723908729; Thu, 29 Apr 2021 12:18:28 -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> In-Reply-To: From: David Marchand Date: Thu, 29 Apr 2021 21:18:17 +0200 Message-ID: To: Flavio Leitner , Olivier Matz Cc: dev , Maxime Coquelin , Ilya Maximets , Chenbo Xia 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 8:39 PM Flavio Leitner wrote: > > - if (l4_hdr && hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { > > + /* GSO request, save required information in mbuf */ > > + if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { > > + /* Check unsupported modes */ > > + if (hdr->gso_size == 0) > > + return -EINVAL; > > + > > switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { > > case VIRTIO_NET_HDR_GSO_TCPV4: > > case VIRTIO_NET_HDR_GSO_TCPV6: > > - tcp_hdr = l4_hdr; > > - m->ol_flags |= PKT_TX_TCP_SEG; > > - m->tso_segsz = hdr->gso_size; > > - m->l4_len = (tcp_hdr->data_off & 0xf0) >> 2; > > - break; > > case VIRTIO_NET_HDR_GSO_UDP: > > - m->ol_flags |= PKT_TX_UDP_SEG; > > + m->ol_flags |= PKT_RX_LRO | PKT_RX_L4_CKSUM_NONE; > > My understanding of the virtio 1.1 spec is that GSO can be > used independently of CSUM. There is nothing preventing to > send a fully checksummed TSO packet. This forces a superfluous cksum in such a situation. It can be fixed later if needed. The virtio pmd rx side has the same behavior. > Anyways, that's unusual and not the goal of this patch. > > Acked-by: Flavio Leitner Thanks! -- David Marchand