Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3259441pxj; Mon, 10 May 2021 23:51:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfmtyM3rd6Wuyf5OeixJmUAH98qAX1OpraJch8k2erC13hQEVxgufUC4Lw0kk2oU1rZNPq X-Received: by 2002:a17:906:7fd2:: with SMTP id r18mr25671485ejs.78.1620715878323; Mon, 10 May 2021 23:51:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620715878; cv=none; d=google.com; s=arc-20160816; b=n+P+wFScVX38monI2f42CvXaZKFCs+ZoCMkQKVkPYnDYnxzLNXWEBCre2oG8vRgeWY lzWjSNKWMxkK3Qx3wG2raFsggwarStxwsclTav0644mzIB8EWA4MlTNbWn02MU0w0hDq bVULwUaq1EqaWbYuP4OAPeW10yZFW77NQzIf+jHXiaJLCusUVilEVLdU42KCG+0ixsaU 7FHT7O8ot0qzkwrDtVRu2feJ9W2KZfehd2nLuu4poq1lynTX0nYI3Yr5dbgTiK3DH0dI CnfH63nk1sH6eThq/6iQh+/g59j0qbb+1XXSW2u6+cQgQb65LtQn32UiWaYfu8ZpNsCV +plg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=XGT3PCvhdMF1ySAiULwwXSWctoW1fgtrGIWAnzk21Yk=; b=r2HKdpbHUcWdukehn8y5WOtIbh4+ukANv/CwJ62HmbapU11NwCPF5CVKO1n7D53jGD Hl0aAzr0Edj5uUNgj/fhl3OkJDJchqcnsP19o+hG9BzQJSsSTQlaLIC8Fua/Ktwsfo70 Z+k1vpXI2yTAvKU4zWsL4uxNSjmeHh8csnqfhLx/T1NGGhAEVrPAHzMif/uErYMnGHiz ERYPWJi8LnOnxVAutsmFiDCjyM/5kDrNQF7jrVHFU+p9tM65aDQjDHmfVzqAmDPOruqD mfzAP7HQcgQVoUhOtJ4l3xn+SY/DPEp3j5EhNWq331KUCHfu9f2GQlY3t6Axw1rC0FOa pfMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iHrdbDbH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dh5si15333399edb.454.2021.05.10.23.50.54; Mon, 10 May 2021 23:51:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iHrdbDbH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230385AbhEKGsy (ORCPT + 99 others); Tue, 11 May 2021 02:48:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22896 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230251AbhEKGsx (ORCPT ); Tue, 11 May 2021 02:48:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620715667; 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=XGT3PCvhdMF1ySAiULwwXSWctoW1fgtrGIWAnzk21Yk=; b=iHrdbDbHve6wSjyKc5K1C6Ck0AiOif8IO6cPiFms6KdG/foq+5AIVUTrNUFyTuB9hoM9KN Yh56IEUw9c1srU6TXeQkwzB109O+Qq7QpxGERgArebe3GV0mtcR049qiHzyaQiAbLJHQpR 6opCd2zZUd980NjWnbqRRzrgBlsRxFM= Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-204--lPkGFx3N4SbFBgqJDcwcg-1; Tue, 11 May 2021 02:47:45 -0400 X-MC-Unique: -lPkGFx3N4SbFBgqJDcwcg-1 Received: by mail-pf1-f200.google.com with SMTP id 125-20020a6215830000b029028ef0e94e38so12318033pfv.13 for ; Mon, 10 May 2021 23:47:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=XGT3PCvhdMF1ySAiULwwXSWctoW1fgtrGIWAnzk21Yk=; b=L1uE/xGKpDB0ULIot+Bijcp/g+AxZ5oWm3vakkyflr2z0WuYy5wAkOC+SkIW6DoO3K TmbcOLNSenjqBDUYx2yF5crUMzeJDyQCWE4Scynj5BPa/1s7bs9p/H0g4/pXa4iT/W4J EnrBRz2HowBMadB1CPY19VLju72Ke7ywl2ppAXxfrqSCVilunQ5kZ5Uipe4VD+UzylVE i3/mt7BLdyp1scNxwMTkmvbqA2Rri1Cs3D9MMgk+FeOhlTVKJWepqLLSSekZXiGeyi6h lempwag1XbSpsWO1zJWDH7HGl8NQmmJ3Mu2QPdLkhXn5qRaVGV99I/sYaZx5lGzTKnC5 g88Q== X-Gm-Message-State: AOAM533AmDXMkIrBNfUOm9PZgjGj2JU3KLz8iNneOscN0zOnA/fYO+q6 ucOIAVHWcXfybNLhC+U8jF8zfetJgXJzxlm6FkDUpGRuMDuBUT+fYVxVdNEmkQzMYW3zvp7D5Qn Z54OM+DZCLGRYLzgKrDq10Pp4 X-Received: by 2002:a63:175e:: with SMTP id 30mr29171619pgx.48.1620715664814; Mon, 10 May 2021 23:47:44 -0700 (PDT) X-Received: by 2002:a63:175e:: with SMTP id 30mr29171606pgx.48.1620715664592; Mon, 10 May 2021 23:47:44 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id h15sm12760024pfk.26.2021.05.10.23.47.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 May 2021 23:47:44 -0700 (PDT) Subject: Re: [PATCH 2/4] virtio-net: add support of UDP segmentation (USO) on the host To: Yuri Benditovich , davem@davemloft.net, kuba@kernel.org, mst@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Cc: yan@daynix.com References: <20210511044253.469034-1-yuri.benditovich@daynix.com> <20210511044253.469034-3-yuri.benditovich@daynix.com> From: Jason Wang Message-ID: <0e31ea70-f12a-070e-c72b-6e1d337a89bc@redhat.com> Date: Tue, 11 May 2021 14:47:39 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210511044253.469034-3-yuri.benditovich@daynix.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2021/5/11 ????12:42, Yuri Benditovich ะด??: > Large UDP packet provided by the guest with GSO type set to > VIRTIO_NET_HDR_GSO_UDP_L4 will be divided to several UDP > packets according to the gso_size field. > > Signed-off-by: Yuri Benditovich > --- > include/linux/virtio_net.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h > index b465f8f3e554..4ecf9a1ca912 100644 > --- a/include/linux/virtio_net.h > +++ b/include/linux/virtio_net.h > @@ -51,6 +51,11 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, > ip_proto = IPPROTO_UDP; > thlen = sizeof(struct udphdr); > break; > + case VIRTIO_NET_HDR_GSO_UDP_L4: > + gso_type = SKB_GSO_UDP_L4; > + ip_proto = IPPROTO_UDP; > + thlen = sizeof(struct udphdr); > + break; This is only for rx, how about tx? Thanks > default: > return -EINVAL; > }