Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3188821pxj; Mon, 10 May 2021 21:44:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBJGLRyXNwhbbMN5/MGoIPYzstbp/ls5jcGLm3rFn5xXF2vQ5meKvDYj9Eb17BABbr8WO0 X-Received: by 2002:a05:6402:694:: with SMTP id f20mr33875849edy.93.1620708292280; Mon, 10 May 2021 21:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620708292; cv=none; d=google.com; s=arc-20160816; b=RgTYTDxb2yCNHw+IhTy+DvEa+OdyiDdriDOABjHk66Bb5xqtEOcwfJTmUuU8alLach N/bdz+d+PsULnsr3EeumT9VLLgrNWFhLh8z3bvvUaFYkRkRi2mouCYtLazN4y5mNnuqN tElG/rXmWOmwKt7VAjiHruxoVml3EedO+D7zYiwmka1W9/axdWDmlBQdui7ctnbXQFQt gPN27c9efdRK6os2bz/SXvo+rJIjvAaDFM2nNeGF+Gmm+SqUPJBy5lynS+hvCKCXXMBG /tpFmKfVe8AkCIQsY/xUQCVd4QNNEtiO4vwCe3Xuu0RBn7sKntWV2nU7m8rSdqQWCUbS EvnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C9XpXxYtaOMpWOUjJ4wuUSOsoeZftgUi9oWw6L6+6PY=; b=F9JXwiY+nZUxBzTP+ir1bC26OaqdbHz7jZRGbwTxZ8RGj4EWj5LRxVc/wd7zag7sp6 JJAmTgCDwzNODy+1OPSYxk0RIjDQ1i+B68faj9edUb4Y5S0KLclAyVMIakpb95I5oNDe 2M3oJwt1GjVt3jVeBmb4prCo5SLQ8g3wfSdD9UrrMdoxBM5SQmvemPhD0RumhlX++KU2 V+W9zVklMMio5rHo4wv3Q/5Ua4oL1b9w06ASLft0qYVSQVisBN4RnbKRhMzYfztSE1dy KDpOs4pzuI8BozHiQPKeHqsaFGZ5PC8lbCK3EDf+8YWZRAU6VCk3hj9pYVF5c4GB7gdi twuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@daynix-com.20150623.gappssmtp.com header.s=20150623 header.b=i8N263f+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gf2si18176083ejb.500.2021.05.10.21.44.28; Mon, 10 May 2021 21:44:52 -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=@daynix-com.20150623.gappssmtp.com header.s=20150623 header.b=i8N263f+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230218AbhEKEoc (ORCPT + 99 others); Tue, 11 May 2021 00:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbhEKEoa (ORCPT ); Tue, 11 May 2021 00:44:30 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C470C061574 for ; Mon, 10 May 2021 21:43:24 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id n84so10351200wma.0 for ; Mon, 10 May 2021 21:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C9XpXxYtaOMpWOUjJ4wuUSOsoeZftgUi9oWw6L6+6PY=; b=i8N263f+uXxe91WLuxJx5RvGTcU+LOlIZILGfgaQzBDs6R/OaZ26o9Jduve+32BvM0 SBW5jvdKVYeAZmZN2gJYZTbusqcxDTTC15Lpii1SMDeN7urjfzM0n4B6AIEXRELudkAm ONRljjTtiItJ/VZma2gKCNrnXZ4b4XK0kHPXfxOYFa5/HwbafB07Xt0fVqX7vfPtpn9d fMPog8BUQcwL0WZCqE/LfaVSMRv8ythODRvoqifUAjufxR7YfIiFvybGHoR/pVpoGsAj zjKpR1k5AeoLdOJ3xV/+lVo6WQMDN+ca4vpe7dLYnfXjH5BFwWj+7ZyGtcbGLngURzZD Vi9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C9XpXxYtaOMpWOUjJ4wuUSOsoeZftgUi9oWw6L6+6PY=; b=L6Sdwv9cmtg5ULgpc+dr51zq4PJvAPj8a4nhJd6tiggNVC4jr8ayLO26NefgCw2s53 9W4hdkrpBvUcPnsVfsZRmUTPM8jLXyxIthknbqRJA/sKesdeikYXjZJP1q68fxuHWF/9 /LrlWMpKejg8o372uH0wirgyqzpOxeWqqgocmlnWaMzdtyfQxeNPuw4+CS5vsUnlb4rq cyuFf3mJTWGTbhotwG9zqNUyMLT+HVOg5DJyKczw1Z3uFvwrNKvzJa9UX7rK8DlL7CUm D7KyUTpXUhVKiPF+HGcjj/rsXP1xZ1bA8mag9jgvh653muF/ncgwy85hirRUKBXYlRHa mi5w== X-Gm-Message-State: AOAM531yLHsBA+mnhxx9iWxGa6FBfGDfUfTdIT0uRWFqhZvJBuSxq7gq qFCd+Kb0cubFU1GW+Hhs4qglCg== X-Received: by 2002:a1c:4d17:: with SMTP id o23mr3023530wmh.102.1620708202793; Mon, 10 May 2021 21:43:22 -0700 (PDT) Received: from f1.Home (bzq-79-180-42-161.red.bezeqint.net. [79.180.42.161]) by smtp.gmail.com with ESMTPSA id a9sm22360520wmj.1.2021.05.10.21.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 21:43:22 -0700 (PDT) From: Yuri Benditovich To: davem@davemloft.net, kuba@kernel.org, mst@redhat.com, jasowang@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Cc: yan@daynix.com Subject: [PATCH 2/4] virtio-net: add support of UDP segmentation (USO) on the host Date: Tue, 11 May 2021 07:42:51 +0300 Message-Id: <20210511044253.469034-3-yuri.benditovich@daynix.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210511044253.469034-1-yuri.benditovich@daynix.com> References: <20210511044253.469034-1-yuri.benditovich@daynix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; default: return -EINVAL; } -- 2.26.3