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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS 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 37E3CC43381 for ; Sat, 23 Feb 2019 10:43:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04B0220652 for ; Sat, 23 Feb 2019 10:43:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727732AbfBWKnz convert rfc822-to-8bit (ORCPT ); Sat, 23 Feb 2019 05:43:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44578 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbfBWKny (ORCPT ); Sat, 23 Feb 2019 05:43:54 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 627DE85362; Sat, 23 Feb 2019 10:43:54 +0000 (UTC) Received: from carbon (ovpn-200-42.brq.redhat.com [10.40.200.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id A76545D9CA; Sat, 23 Feb 2019 10:43:45 +0000 (UTC) Date: Sat, 23 Feb 2019 11:43:43 +0100 From: Jesper Dangaard Brouer To: Jakub Kicinski Cc: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= , David Miller , netdev@vger.kernel.org, Daniel Borkmann , Alexei Starovoitov , brouer@redhat.com Subject: Re: [PATCH net-next 1/2] xdp: Always use a devmap for XDP_REDIRECT to a device Message-ID: <20190223114343.5813f18a@carbon> In-Reply-To: <20190222133734.1880a88d@cakuba.netronome.com> References: <155075021399.13610.12521373406832889226.stgit@alrua-x1> <20190221163627.7b8aa2ce@cakuba.netronome.com> <87va1cgmg1.fsf@toke.dk> <20190222133734.1880a88d@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 23 Feb 2019 10:43:54 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 22 Feb 2019 13:37:34 -0800 Jakub Kicinski wrote: > On Fri, 22 Feb 2019 11:13:50 +0100, Toke Høiland-Jørgensen wrote: > > Jakub Kicinski writes: > > > On Thu, 21 Feb 2019 12:56:54 +0100, Toke Høiland-Jørgensen wrote: [...] > > > > > > BPF programs don't obey by netns boundaries. The fact the program is > > > verified in one ns doesn't mean this is the only ns it will be used in :( > > > Meaning if any program is using the redirect map you may need a secret > > > map in every ns.. no? > > > > Ah, yes, good point. Totally didn't think about the fact that load and > > attach are decoupled. Hmm, guess I'll just have to move the call to > > alloc_default_map() to the point where the program is attached to an > > interface, then... > > Possibly.. and you also need to handle the case where interface with a > program attached is moved, no? True, we need to handle if e.g. a veth gets an XDP program attached and then is moved into a network namespace (as I've already explained to Toke in a meeting). I'm still not sure how to handle this... -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer