| To: | Thomas Graf <tgraf@xxxxxxx> |
|---|---|
| Subject: | Re: [RFC] tcf_bind_filter failure handling |
| From: | Patrick McHardy <kaber@xxxxxxxxx> |
| Date: | Mon, 13 Dec 2004 20:12:40 +0100 |
| Cc: | "David S. Miller" <davem@xxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx |
| In-reply-to: | <20041213185203.GF8493@xxxxxxxxxxxxxx> |
| References: | <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> <41BDDB5A.9000907@xxxxxxxxx> <20041213185203.GF8493@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: * Patrick McHardy <41BDDB5A.9000907@xxxxxxxxx> 2004-12-13 19:11You 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.Little misunderstanding here. I'm not aiming at replacing tcf_bind_filter with get. My question is rather whether to regard tcf_bind_filter not settingtcf_result->class as an error or ignore it.I'm all for ignoring it in tcindex, it requires some changes because it checks tcf_result.class field to see if hash bucket is non-empty if perfect hash is used but is not a problem at all. The tcf_class_get/put would be required to ensure proper locking during validation of parameters if validating the classid being last before changing things doesn't make sense due to the need to undo expensive operations required before binding. I will fix tcindex, since you also agree on simply ignoring it and regard the binding as an ptional locking and performance increase possibility given to userspace. Yes, it should be ignored, otherwise you can't point a filter to a class you will add later. Regards Patrick |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: 2.4.28 neighbour/arp problem, mmadore |
|---|---|
| Next by Date: | Re: [RFC] tcf_bind_filter failure handling, jamal |
| Previous by Thread: | Re: [RFC] tcf_bind_filter failure handling, Thomas Graf |
| Next by Thread: | Re: [RFC] tcf_bind_filter failure handling, jamal |
| Indexes: | [Date] [Thread] [Top] [All Lists] |