| To: | Thomas Graf <tgraf@xxxxxxx> |
|---|---|
| Subject: | Re: [RFC] tcf_bind_filter failure handling |
| From: | Patrick McHardy <kaber@xxxxxxxxx> |
| Date: | Mon, 13 Dec 2004 19:11:38 +0100 |
| Cc: | "David S. Miller" <davem@xxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx |
| In-reply-to: | <20041213165302.GE8493@xxxxxxxxxxxxxx> |
| References: | <E1CQDcP-0003ff-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20041109161126.376f755c.davem@xxxxxxxxxxxxx> <20041110010113.GJ31969@xxxxxxxxxxxxxx> <41916A91.3080107@xxxxxxxxx> <20041110012251.GK31969@xxxxxxxxxxxxxx> <41916F0B.5010809@xxxxxxxxx> <20041110013941.GL31969@xxxxxxxxxxxxxx> <41917330.6090002@xxxxxxxxx> <20041212175736.GA8493@xxxxxxxxxxxxxx> <41BC8819.7040501@xxxxxxxxx> <20041213165302.GE8493@xxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20041008 Debian/1.7.3-5 |
Thomas Graf wrote: The handling of a failure in tcf_bind_filter is inconsistent. u32: ignore fw: ignore route: ignore rsvp: ignore tcindex: error It might be a good idea to make this consistent. So in order to validate the classid before making any changes we could simply lock it via get (see patch below), return an error if it fails and put it back in case of an error further in the path or after binding the filter. Bindings not only locks the class from removal while a filter is pointing to it. It speeds up classyfing by saving a lookup for every tc_classify call. It's not really a problem if the class is not locked, the qdisc will look it up and falls back to a default class if it doesn't exists so it's rather a cosmetic/policy thing. You should just fix tcindex not to care about errors in tcf_bind_filter. bind_tcf already locks the class. Some qdiscs (like prio) map bind_filter to get, but others (HTB, HFSC, CBQ) use a seperate counter because it is legal to end up with a refcnt > 0 after delete. When a class with filters pointing to it is tried to destroy they return -EBUSY, which can't be done by looking at the refcnt. Regards Patrick |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH][v3][17/21] Add IPoIB (IP-over-InfiniBand) driver, Roland Dreier |
|---|---|
| Next by Date: | Re: [openib-general] [PATCH][v3][17/21] Add IPoIB (IP-over-InfiniBand) driver, Tom Duffy |
| Previous by Thread: | [RFC] tcf_bind_filter failure handling, Thomas Graf |
| Next by Thread: | Re: [RFC] tcf_bind_filter failure handling, Thomas Graf |
| Indexes: | [Date] [Thread] [Top] [All Lists] |