RFC: /etc/pccard_ether triggered by usbus

From: Hiroki Sato <hrs_at_FreeBSD.org>
Date: Wed, 21 Sep 2011 13:38:28 +0900 (JST)
Hi,

 I would like your comments about adding NOT operator into string
 match rule in devd.conf.  The reason is as follows.

 After the USB packet filter was added, devctl attach notifications
 from an IFT_USB interface like "!system=IFNET subsystem=usbus0
 type=ATTACH" trigger a default rule for interface initialization in
 devd.conf.  Although it is harmless in most cases, it would be great
 if we can filter out the notifications because it can result in a
 slower booting.  However, the devd supports no NOT operator in a
 string match.

 The attached patch is to add the "!" operator into the match
 sub-statement.  For example,

  match "bus" "pccard[0-9]+"

 matches the content of bus against a regex pccard[0-9]+.  The "!"
 operator like the following

  match "bus" "!pccard[0-9]+"

 inverts the logic.

 I am still not sure if this is the best approach but I could not find
 another way.  Filtering out it in if_attach() or adding a new
 variable like "configurable=yes" in the notification looks overkill
 to me.

 Any comments/suggestions?

-- Hiroki

Received on Wed Sep 21 2011 - 02:41:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:18 UTC