From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3BECC433DB for ; Thu, 4 Feb 2021 15:54:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D19764F53 for ; Thu, 4 Feb 2021 15:54:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237510AbhBDPyZ (ORCPT ); Thu, 4 Feb 2021 10:54:25 -0500 Received: from mail-m2836.qiye.163.com ([103.74.28.36]:42832 "EHLO mail-m2836.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237453AbhBDPvv (ORCPT ); Thu, 4 Feb 2021 10:51:51 -0500 Received: from [192.168.1.10] (unknown [180.157.168.158]) by mail-m2836.qiye.163.com (Hmail) with ESMTPA id 0FA98C0217; Thu, 4 Feb 2021 23:50:53 +0800 (CST) Subject: Re: [PATCH net] net/sched: cls_flower: Return invalid for unknown ct_state flags rules To: Marcelo Ricardo Leitner Cc: i.maximets@ovn.org, netdev@vger.kernel.org References: <1612412244-26434-1-git-send-email-wenxu@ucloud.cn> <20210204133856.GH3399@horizon.localdomain> From: wenxu Message-ID: Date: Thu, 4 Feb 2021 23:50:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <20210204133856.GH3399@horizon.localdomain> Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSUI3V1ktWUFJV1kPCR oVCBIfWUFZGhpPGUhLGU1DTk8ZVkpNSklPTkhDTk9JTElVGRETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS0JITVVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NDY6LDo*Hz00KgIVISk6AUhC EVFPFCpVSlVKTUpJT05IQ05PT0pMVTMWGhIXVQweFQMOOw4YFxQOH1UYFUVZV1kSC1lBWUpDS1VK TkxVSk1DVUpOQ1lXWQgBWUFJS0tMNwY+ X-HM-Tid: 0a776dbd3c02841ekuqw0fa98c0217 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org ÔÚ 2021/2/4 21:38, Marcelo Ricardo Leitner дµÀ: > Hi, > > On Thu, Feb 04, 2021 at 12:17:24PM +0800, wenxu@ucloud.cn wrote: >> From: wenxu >> >> Reject the unknown ct_state flags of cls flower rules. This also make >> the userspace like ovs to probe the ct_state flags support in the >> kernel. > That's a good start but it could also do some combination sanity > checks, like ovs does in validate_ct_state(). For example, it does: > > if (state && !(state & CS_TRACKED)) { > ds_put_format(ds, "%s: invalid connection state: " > "If \"trk\" is unset, no other flags are set\n", > So this sanity checks maybe also need to be added in the ovs kernel modules? The kernel datapath can work without ovs-vswitchd.