From patchwork Tue May 31 18:27:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1637540 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=lS83LAJA; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LCLPm5X97z9s09 for ; Wed, 1 Jun 2022 04:28:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A6EDA41C5B; Tue, 31 May 2022 18:28:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wqEPJQ258NPs; Tue, 31 May 2022 18:28:25 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 9A62E41552; Tue, 31 May 2022 18:28:24 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6E540C0039; Tue, 31 May 2022 18:28:24 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 32FDCC002D for ; Tue, 31 May 2022 18:28:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 12C0141C00 for ; Tue, 31 May 2022 18:28:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QSbMVxWwYmqO for ; Tue, 31 May 2022 18:28:21 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0348641552 for ; Tue, 31 May 2022 18:28:20 +0000 (UTC) Received: by mail-pg1-x52b.google.com with SMTP id v15so13566597pgk.11 for ; Tue, 31 May 2022 11:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SmnYHklPa2oRCiF/DblWsDOkxIXJRIlK+F+xLMPTZ6g=; b=lS83LAJAcljMDEVU6nMyP4VLI50MIzwm3DoVJyMfWtXEAUN1gwZWrRnbJFixzu3k7r hWkXs/mG3Kb/Y2E4E+mo6b1/wMVszAtR+QTou9PLJvGCpxFsaZAE0V2Ka5bo/7SBGioz oS51jUN2Cfdohbtknafp2npiApfDeY9nFW2o5yNh7H9lzzidJV3hhS4B85hOPPtG9rxR eUYH5ErangajArPM80ad2Urn2hEMIU+RiOONuAxGDjL9zzGagKiS3/WAy27bi1BVeJQJ tvzeFpj9nAEAVHKzLtZF/mAIUoIqjiGywG75cwMeBUDakK4hmEHDFuRSttEHC9e6yrmE W8Fg== 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:mime-version :content-transfer-encoding; bh=SmnYHklPa2oRCiF/DblWsDOkxIXJRIlK+F+xLMPTZ6g=; b=NhSDyNf/UxdFszyJRwq57syxr65+vj8vc9HVAxGPKTZXhT94BfedIn0wrYJCwVOXki t3dnkzG7nbv/6SdKq0cpyIBGH1f6ao9lQy/bnq6qmIyIVOUE3CfGZE0tkN2eAxgLkDN0 XRa5uutPpfuLtjdJ4j/FL0DXtIn6BlH02WCQpL4tFbQtQZRnc/au0ZKabyittfNTetYX d42c8mHZ0ls7mg3zwvHVM9K5naYx2AbKU7UdkamwoVQsYWu5i4gHwnIzFuWlkSagA7Yr ZMJXyPyoSe56U1JnbgGnHHYFXs43dsZxouPOfRoNtRE3GTIXVEWlM9NpFD0rRGKGBpUR 8mVw== X-Gm-Message-State: AOAM530F6j+zXNrmuqf1yefVJVhLhWAnKu2K3RR/1P5ZqvZYmlxoPx4P AGlAhzeR7RXHbR0oOFfPs3qQ98EZJVc= X-Google-Smtp-Source: ABdhPJwcLP/0Xic+Zph3uT8fL97Ie1Sfa/Ti2tIW2y3QF7UNHs8ENLtxviyNpeUQf0P2LQfwaMKgWw== X-Received: by 2002:a65:428c:0:b0:3db:822e:2163 with SMTP id j12-20020a65428c000000b003db822e2163mr52668375pgp.466.1654021699900; Tue, 31 May 2022 11:28:19 -0700 (PDT) Received: from sc9-mailhost3.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id ca7-20020a17090af30700b001e292e30129sm2293270pjb.22.2022.05.31.11.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 11:28:19 -0700 (PDT) From: William Tu To: dev@openvswitch.org Date: Tue, 31 May 2022 11:27:41 -0700 Message-Id: <20220531182741.1784-1-u9012063@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH] datapath-windows: Detect truncate action. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Truncate action is not supported in Windows datapath, but currently it incorrectly reports to ovs-vswitchd as supported blow "system@ovs-system: Datapath supports truncate action". The patches detects it and returns not support. Cc: Alin-Gabriel Serdean Cc: Wilson Peng Signed-off-by: William Tu --- datapath-windows/ovsext/Actions.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c index 0f7f78932..3a5e71ee9 100644 --- a/datapath-windows/ovsext/Actions.c +++ b/datapath-windows/ovsext/Actions.c @@ -2502,6 +2502,11 @@ OvsDoExecuteActions(POVS_SWITCH_CONTEXT switchContext, } break; } + case OVS_ACTION_ATTR_TRUNC: + status = NDIS_STATUS_NOT_SUPPORTED; + dropReason = L"OVS-truncate action not supported"; + goto dropit; + break; default: status = NDIS_STATUS_NOT_SUPPORTED; break;