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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5157C433FE for ; Thu, 29 Sep 2022 15:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YefLPz5s2GKO0bTtH+XIZWgdojDcjgnhH3flYTt/ph0=; b=TcksQ17zJtpmLL Gn4sPyoVEWRQ3+Ad8Ja3yFpBmUIzn9WmJNg6r/4s+R9ODJ0FOfozTAjmsHVr4RsyLqzyGH9hPJByF GvF3Lpf/1tGNh8ULFXZNvWM0NxmG2ayaIYTGaGGjK3fC4v5mZz4EZcfQWxZ7v/k7mA9KfpMCSDKPk tBrWINJZLztq9mv1QblQ2jOCDaONFPsp8zLlJ5bSY50zXsa6K0BdxPRec6+OAMX0VNXOZa3ctMObb 8AqpxL57ineGP6GPmVkb2oF4trCWFDkGk8HtgAETaCCTauQRD4+3H4TVgiDi9zJ+2vVoB+ivLQmN6 wX2A/6BRCGaRVQ0pXuew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odvh2-003w29-Rp; Thu, 29 Sep 2022 15:43:21 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odvgy-003w0k-7k for linux-arm-kernel@lists.infradead.org; Thu, 29 Sep 2022 15:43:19 +0000 Received: by mail-pg1-x529.google.com with SMTP id c7so1771884pgt.11 for ; Thu, 29 Sep 2022 08:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date; bh=b7VI/lNtki3zEef+0LBeBHdkR7jGYNMrvxJja3PqG/c=; b=Vzksrx3sniIo56OPl72BWHlU0/Df8j/JQCbDZvy1EGrf7kGm7B2aiZfENf5gW44D/J gI9Z0IM1eNvyuoepwUgJtEreELCtd/Yi97PNwccOEhM6E0notm+GqKPkHLkR9oYsyKb8 Yoq/pleXGN8k4RyGciZfN2tWjdiAPNPkdJ0GRF8seENVYF2FOicZ45TlpxCNGouCgsOp P0XmWHkJpwHysnW3nZxveeGX+rb2ESXrOcsYARReYp7X/HAFCqXhQu1KdtVjt8W5CRIo QDL3OSbkonYl6GqgtkUeoFLMwgh1qC0e+3cPxCbPucD2iWViRSqwTxmu6i6Uq7X8iEVv wfYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date; bh=b7VI/lNtki3zEef+0LBeBHdkR7jGYNMrvxJja3PqG/c=; b=Bt46AGLrL51Gfhe+yWhEt2vxnI0lAzIRRFms9uYGYdk3R9OmYBxIG8sJaBSXh2JzNn iiHhFpAV3W+p333bJIKKK6eJgk4sba6zuyg4pGJP4Af0ScXRITtp5xiuuevChBqYgNFB IXoATHiKF4GFDj2m6Lp+v72syFmtz0hzgQZ+Fukl/hM2klTHMwFHKiK/yCtbmOjLu7cA dLWFlXQE7FWmBkNirzryn3SekBK/DWQdNogPNDj5kGYqHytM4Wex6VGEkqYRRbHh6fWY JTW30fx/TsodDYTYMmpfsaD+8TO58b8fkDpFGIX8E7BmF6lgwmK63BdLBkQyClPUCjyJ 9Zkw== X-Gm-Message-State: ACrzQf2P4x3M7OItUdE5evdPNdKyIFBs8AdHawDJ7+FUNmvsQCUtw5wI U/ptgGf945y776kzybln9C8IXw== X-Google-Smtp-Source: AMsMyM5rOGzlC007WW3U9p2PPqvx0IpfKhVuFQ42vcDUakNLelXGGyhbF2WyHTattavi5pSMM7s+ng== X-Received: by 2002:a05:6a00:1412:b0:557:d887:2025 with SMTP id l18-20020a056a00141200b00557d8872025mr4076191pfu.39.1664466194646; Thu, 29 Sep 2022 08:43:14 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id z3-20020a170903018300b001768452d4d7sm56745plg.14.2022.09.29.08.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 08:43:14 -0700 (PDT) Date: Thu, 29 Sep 2022 08:43:12 -0700 From: Stephen Hemminger To: Hans Schultz Cc: davem@davemloft.net, kuba@kernel.org, Andrew Lunn , Alexandre Belloni , Nikolay Aleksandrov , Kurt Kanzenbach , Eric Dumazet , linux-kselftest@vger.kernel.org, Joachim Wiberg , Shuah Khan , Ivan Vecera , Florian Fainelli , Daniel Borkmann , Ido Schimmel , bridge@lists.linux-foundation.org, Russell King , linux-arm-kernel@lists.infradead.org, Roopa Prabhu , Paolo Abeni , Vivien Didelot , Woojung Huh , Landen Chao , Jiri Pirko , Amit Cohen , Christian Marangi , Hauke Mehrtens , Hans Schultz , Sean Wang , DENG Qingfang , Claudiu Manoil , linux-mediatek@lists.infradead.org, Matthias Brugger , Yuwei Wang , Petr Machata , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com, Vladimir Oltean , Florent Fourcot Subject: Re: [Bridge] [PATCH iproute2-next 2/2] bridge: fdb: enable FDB blackhole feature Message-ID: <20220929084312.2a216698@hermes.local> In-Reply-To: <20220929152137.167626-2-netdev@kapio-technology.com> References: <20220929152137.167626-1-netdev@kapio-technology.com> <20220929152137.167626-2-netdev@kapio-technology.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220929_084316_623516_66D9FDDE X-CRM114-Status: GOOD ( 12.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 29 Sep 2022 17:21:37 +0200 Hans Schultz wrote: > > @@ -493,6 +496,8 @@ static int fdb_modify(int cmd, int flags, int argc, char **argv) > req.ndm.ndm_flags |= NTF_EXT_LEARNED; > } else if (matches(*argv, "sticky") == 0) { > req.ndm.ndm_flags |= NTF_STICKY; > + } else if (matches(*argv, "blackhole") == 0) { > + ext_flags |= NTF_EXT_BLACKHOLE; > } else { > if (strcmp(*argv, "to") == 0) > NEXT_ARG(); The parsing of flags is weird here, most of the flags are compared with strcmp() but some use matches().. I should have used strcmp() all the time; but at the time did not realize what kind of confusion matches() can cause. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel