From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles (Chas) Williams" <3chas3@gmail.com> Subject: Re: [PATCH] devargs: add blacklisting by linux interface name Date: Fri, 02 Oct 2015 14:29:27 -0400 Message-ID: <1443810567.3494.45.camel@gmail.com> References: <1443798007-20122-1-git-send-email-3chas3@gmail.com> <20151002151800.GA21380@bricha3-MOBL3> <1443803908.3494.44.camel@gmail.com> <59AF69C657FD0841A61C55336867B5B03594BDB2@IRSMSX103.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: "Richardson, Bruce" Return-path: Received: from mail-qg0-f51.google.com (mail-qg0-f51.google.com [209.85.192.51]) by dpdk.org (Postfix) with ESMTP id CA7D78DA4 for ; Fri, 2 Oct 2015 20:29:29 +0200 (CEST) Received: by qgt47 with SMTP id 47so102003545qgt.2 for ; Fri, 02 Oct 2015 11:29:29 -0700 (PDT) In-Reply-To: <59AF69C657FD0841A61C55336867B5B03594BDB2@IRSMSX103.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 2015-10-02 at 16:44 +0000, Richardson, Bruce wrote: > > -----Original Message----- > > From: Charles (Chas) Williams [mailto:3chas3@gmail.com] > > > > On Fri, 2015-10-02 at 16:18 +0100, Bruce Richardson wrote: > > > On Fri, Oct 02, 2015 at 11:00:07AM -0400, Chas Williams wrote: > > > > If a system is using deterministic interface names, it may be easier > > > > in some cases to use the interface name to blacklist an interface. > > > > > > > > > > Is it possible to do this using the existing arguments, i.e. have the > > > -b flag detect if it's a pci address or name automatically, rather > > > than having to use a separate command-line arg for it? > > > > You might be able to distinguish names by context. I doubt interface > > names ever look like PCI addresses. But that's going to be a bigger > > change since -b will need to be updated to 'blacklist' intead of 'pci- > > blacklist' to prevent confusion. Or do you just want to overload '-b' and > > keep both long options? > > > I'm not sure about that, to be honest. However, I'd rather not have > too many cmd line options to be maintained in the code. > > Does you proposed blacklisting patch work with non-pci devices as well > as with PCI ones as now? Unfortunately, the devargs API is rather PCI specific -- it takes a PCI device. Nothing prevents you from writing a device specific version of the devargs API though for your device class since the devargs list isn't static but checking for certain devargs wouldn't make sense in some cases. Checking to see if a USB device matched a blacklisted PCI device would be pointless. Other devices (like Xen or hyperv) have a net/ directory/link in their /sys entry that lets you determine an interface name. I think it's the same for USB ethernet devices -- I don't happen to have one to check.