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=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 EBEB9C282C2 for ; Fri, 8 Feb 2019 00:40:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B29FD2146E for ; Fri, 8 Feb 2019 00:40:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ht1AlUsz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726791AbfBHAkP (ORCPT ); Thu, 7 Feb 2019 19:40:15 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39162 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726676AbfBHAkP (ORCPT ); Thu, 7 Feb 2019 19:40:15 -0500 Received: by mail-pl1-f193.google.com with SMTP id 101so825443pld.6 for ; Thu, 07 Feb 2019 16:40:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HiSTi3/qerqkoeOX76J9QVY/IMD+MDQPzL45G8Oc3+Q=; b=Ht1AlUszwpWQFIU/2P88RIw53fGa9oaKFzmQRpqZZFImr63pKFdQeSP8ow7JEI3egW PMOjztIURoKshIg+JSE9OeLQceEoFGXnPtKh1eYc+GzBo8VuU9/XXzc9WdRCdJQ/UpMQ yRhQC/IdeURC/RaPSiJ5CORpmkzUgEBjb1QE+61xWjzGuDplPQWjT0VshPYQVvVUWz1P VYIPmQDE02sndUhZG4DemnxUKdTn/m7obnO9zEddMhWAoTq/O9579jzZI77eQGIR/mbl P3gWu5aprNw9f8SbK5vzzQvEgOSYxnycDmVECxxA0B/lcDOzLfLRUU+fsYFs3D5Revin wJMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HiSTi3/qerqkoeOX76J9QVY/IMD+MDQPzL45G8Oc3+Q=; b=DkZk3mYwjdxNx1dy9ad2n5bZSkv6qltBhEgwJ9FTfx3//GtcFP8rPNau4VACfcRpLF xfop2N+YF22tL6PrgBMB/GYGOvDQgHZG5MoAx4vkZitzV1hV2KHX3MQIoEWtL6vrr5P8 xJA+y6ZB9rqfRjiqpUoDOYVo5+vy6l606qYa8t1TltW1O5EW+MbbgJCdwF6BiNLD58Uq kp28F8OjwcxknG4VTOt+gPKpVJF44ym2gyTSqodZmu3k8zGudfXjieBZNL1HF0fjVL2/ G1ZS8qmeYZ1x8crBwnKGjr/i8lPNC52+qJ3FvUwoSC/MXWqtdfz/Z6ZN7PqXt/JNP+LX 6KlQ== X-Gm-Message-State: AHQUAuYqKLdCdDHYwfkuNW2lErQZs48SvcQV9VmSTUxv48S1tH0SFWSN 6ED4kJ48fXtEsogPglgfJ6Y= X-Google-Smtp-Source: AHgI3IYASksf2GDuqQdgtt6zPnPWYZLY7wR2tcXv4KLvodRchHUmQ8hF+/aVopW9FXalnSu5jQrbgg== X-Received: by 2002:a17:902:9f86:: with SMTP id g6mr2250664plq.111.1549586413607; Thu, 07 Feb 2019 16:40:13 -0800 (PST) Received: from [10.40.10.127] (fw.cumulusnetworks.com. [216.129.126.126]) by smtp.googlemail.com with ESMTPSA id m3sm328283pgl.69.2019.02.07.16.40.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Feb 2019 16:40:12 -0800 (PST) Subject: Re: [PATCH net-next 1/2] mlxsw: spectrum_router: Offload blackhole routes To: Ido Schimmel , "netdev@vger.kernel.org" Cc: "davem@davemloft.net" , Jiri Pirko , Alexander Petrovskiy , mlxsw References: <20190206194140.18606-1-idosch@mellanox.com> <20190206194140.18606-2-idosch@mellanox.com> From: David Ahern Message-ID: <18da8b4d-5966-e851-46d6-e389e40b865e@gmail.com> Date: Thu, 7 Feb 2019 16:40:11 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190206194140.18606-2-idosch@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2/6/19 11:42 AM, Ido Schimmel wrote: > Create a new FIB entry type for blackhole routes and set it in case the > type of the notified route is 'RTN_BLACKHOLE'. > > Program such routes with a discard action and mark them as offloaded > since the device is dropping the packets instead of the kernel. > > Signed-off-by: Ido Schimmel > Acked-by: Jiri Pirko > --- > .../ethernet/mellanox/mlxsw/spectrum_router.c | 27 +++++++++++++++++-- > 1 file changed, 25 insertions(+), 2 deletions(-) > One of the feature requests from the FRR team (and a feature I have implemented) is a blackhole nexthop. The idea is that prefixes are installed pointing to nexthop id N. That nexthop definition can be atomically updated to go between a device / gateway and a blackhole. [ prefix ] --> [ nhid 1 ] --> [ dev1 / gateway1 ] [ prefix ] --> [ nhid 1 ] --> [ blackhole ] [ prefix ] --> [ nhid 1 ] --> [ dev2 / gateway2 ] Do you see this working ok with mlxsw without having to update the prefix entries (which can be numerous) directly?