From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [bpf-next v3 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table Date: Thu, 10 May 2018 23:30:00 -0700 Message-ID: <867e4a5a-8d53-b142-10f8-485c6dec2859@gmail.com> References: <20180510033427.20756-1-dsahern@gmail.com> <20180510033427.20756-9-dsahern@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, borkmann@iogearbox.net, ast@kernel.org, David Miller , shm@cumulusnetworks.com, roopa@cumulusnetworks.com, brouer@redhat.com, toke@toke.dk, john.fastabend@gmail.com To: Mathieu Xhonneux Return-path: Received: from mail-io0-f175.google.com ([209.85.223.175]:43258 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750805AbeEKG3j (ORCPT ); Fri, 11 May 2018 02:29:39 -0400 Received: by mail-io0-f175.google.com with SMTP id t23-v6so5804350ioc.10 for ; Thu, 10 May 2018 23:29:39 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 5/10/18 12:27 PM, Mathieu Xhonneux wrote: > I'm quite interested in this helper to implement OAM features (through > other hooks, e.g. the BPF LWT hook). Do you have an idea about how it > behaves with ECMP routes (with IPv4 and/or IPv6) ? In IPv6, I'm > guessing that the returned gateway address is always a link-local > address ? ECMP works with BPF and forwarding just like it does with the full stack -- the traffic should be distributed based on the L3 or L4 hash algorithm and the number of links. As for the IPv6 gateway question, it returns the gateway of the route in the FIB -- ie., link local or global address. No assumptions are necessary or made for the BPF helper.