From patchwork Thu May 12 11:23:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Melnichenko X-Patchwork-Id: 12847601 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05B44C433EF for ; Thu, 12 May 2022 11:33:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353272AbiELLd2 (ORCPT ); Thu, 12 May 2022 07:33:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353243AbiELLdZ (ORCPT ); Thu, 12 May 2022 07:33:25 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EC821CEED2 for ; Thu, 12 May 2022 04:33:21 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id bx33so6070320ljb.12 for ; Thu, 12 May 2022 04:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=poaAl/LWMtSjpF9E3ArKo5BaGizAmiyDHMdbPQU58wM=; b=L0BFpVLJQqlT0zt4b7FVLFd+SSf6LkTvIZONJ+ldc+OUcKRc4j/x60BAYklyj/+lMc CKZM+K1fF2jHLZUKhOEAHrdOVXtJy/71Z6j5BZLP19lHovNzo8VyrLuDe+oRiUerrKJT kGkAPi9eO0/bb7UnFYrT4as3ZAfrwqKBIjzfbbLHHUWLww4uTiQ8AUqNkgzgFZZuzDZH AVQ13nVULJHMSZYiLGoA6KclaPqR39FmHZvxbid1YuOLOF3AsJ1CIyySOmSNGAI5lm99 x2Bnz9i/LNHo1qMPg0HGpNqIkDdwOYwXpBHu8XCP/lagjhocE8jHM40QiYnRR842wQo3 9oOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=poaAl/LWMtSjpF9E3ArKo5BaGizAmiyDHMdbPQU58wM=; b=ctbEC4elHsiWvz7UZOGvMgNTPmGffrNMBYB6hmbZHdacxJpWl50q9+Wva46tTfJR3r 9NONZfIsnWdPKuzudA+DjP+vzLii5o8Ko35tq0nnvsZ6J8w0rFWHSRooZOEQFaJ5GSEX hQQ2xe/E/J00EYE5a+193B9LTAlBkUNoHu67dxDvn/5QOIBY6xSlsySVTLATnQdbmk94 SpNNJOxCTxwy7MoeM8oLof2xsZONC9yKJSjKOdHP9UDd2u1nKRkeFf7x+B7AhYNbNgl3 CPi/jvjypNaFIPZL2sa/dLmSbAss96ZgN1hnP+AmolnBIkmW3xCTySm5Pxkv8c7knS2z 2ogQ== X-Gm-Message-State: AOAM530ZICj9v44z4qBqbckM3cYUbHPY0dxlLnZXZiKa10Bm76cyOsQW JGYwufuv3GxbAyEpKSyApDPATA== X-Google-Smtp-Source: ABdhPJzq5JITT2BfM4tF1muCzbgjceuolUocorvsJ4Bs//pjuR3Cjamjp8cpK5UYGylTqv1LOmTXzw== X-Received: by 2002:a2e:b712:0:b0:24f:150e:1a71 with SMTP id j18-20020a2eb712000000b0024f150e1a71mr20147165ljo.240.1652355199481; Thu, 12 May 2022 04:33:19 -0700 (PDT) Received: from localhost.localdomain (host-188-190-49-235.la.net.ua. [188.190.49.235]) by smtp.gmail.com with ESMTPSA id r29-20020ac25a5d000000b0047255d211a6sm741758lfn.213.2022.05.12.04.33.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 04:33:19 -0700 (PDT) From: Andrew Melnychenko To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mst@redhat.com, jasowang@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Cc: yan@daynix.com, yuri.benditovich@daynix.com Subject: [RFC PATCH v2 1/5] uapi/linux/if_tun.h: Added new offload types for USO4/6. Date: Thu, 12 May 2022 14:23:43 +0300 Message-Id: <20220512112347.18717-2-andrew@daynix.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220512112347.18717-1-andrew@daynix.com> References: <20220512112347.18717-1-andrew@daynix.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Added 2 additional offlloads for USO(IPv4 & IPv6). Separate offloads are required for Windows VM guests, g.e. Windows may set USO rx only for IPv4. Signed-off-by: Andrew Melnychenko --- include/uapi/linux/if_tun.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/if_tun.h b/include/uapi/linux/if_tun.h index 454ae31b93c7..e147dcb46d5c 100644 --- a/include/uapi/linux/if_tun.h +++ b/include/uapi/linux/if_tun.h @@ -88,6 +88,8 @@ #define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */ #define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */ #define TUN_F_UFO 0x10 /* I can handle UFO packets */ +#define TUN_F_USO4 0x20 /* I can handle USO for IPv4 packets */ +#define TUN_F_USO6 0x40 /* I can handle USO for IPv6 packets */ /* Protocol info prepended to the packets (when IFF_NO_PI is not set) */ #define TUN_PKT_STRIP 0x0001