Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59061
b: refs/heads/master
c: db3d99c
h: refs/heads/master
i:
  59059: fb580a3
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 12, 2007
1 parent 266b540 commit 42e61cc
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 662ad4f8efd3ba2ed710d36003f968b500e6f123
refs/heads/master: db3d99c090e0cdb34b1274767e062bfddbb384bc
17 changes: 7 additions & 10 deletions trunk/include/linux/pkt_cls.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,16 +403,13 @@ enum
* 1..32767 Reserved for ematches inside kernel tree
* 32768..65535 Free to use, not reliable
*/
enum
{
TCF_EM_CONTAINER,
TCF_EM_CMP,
TCF_EM_NBYTE,
TCF_EM_U32,
TCF_EM_META,
TCF_EM_TEXT,
__TCF_EM_MAX
};
#define TCF_EM_CONTAINER 0
#define TCF_EM_CMP 1
#define TCF_EM_NBYTE 2
#define TCF_EM_U32 3
#define TCF_EM_META 4
#define TCF_EM_TEXT 5
#define TCF_EM_MAX 5

enum
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/net/pkt_cls.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ static inline int tcf_em_tree_match(struct sk_buff *skb,
return 1;
}

#define MODULE_ALIAS_TCF_EMATCH(kind) MODULE_ALIAS("ematch-kind-" __stringify(kind))

#else /* CONFIG_NET_EMATCH */

struct tcf_ematch_tree
Expand Down
1 change: 1 addition & 0 deletions trunk/net/sched/em_cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ MODULE_LICENSE("GPL");
module_init(init_em_cmp);
module_exit(exit_em_cmp);

MODULE_ALIAS_TCF_EMATCH(TCF_EM_CMP);
2 changes: 2 additions & 0 deletions trunk/net/sched/em_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,3 +848,5 @@ MODULE_LICENSE("GPL");

module_init(init_em_meta);
module_exit(exit_em_meta);

MODULE_ALIAS_TCF_EMATCH(TCF_EM_META);
2 changes: 2 additions & 0 deletions trunk/net/sched/em_nbyte.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ MODULE_LICENSE("GPL");

module_init(init_em_nbyte);
module_exit(exit_em_nbyte);

MODULE_ALIAS_TCF_EMATCH(TCF_EM_NBYTE);
2 changes: 2 additions & 0 deletions trunk/net/sched/em_text.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,5 @@ MODULE_LICENSE("GPL");

module_init(init_em_text);
module_exit(exit_em_text);

MODULE_ALIAS_TCF_EMATCH(TCF_EM_TEXT);
2 changes: 2 additions & 0 deletions trunk/net/sched/em_u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ MODULE_LICENSE("GPL");

module_init(init_em_u32);
module_exit(exit_em_u32);

MODULE_ALIAS_TCF_EMATCH(TCF_EM_U32);
13 changes: 13 additions & 0 deletions trunk/net/sched/ematch.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,19 @@ static int tcf_em_validate(struct tcf_proto *tp,

if (em->ops == NULL) {
err = -ENOENT;
#ifdef CONFIG_KMOD
__rtnl_unlock();
request_module("ematch-kind-%u", em_hdr->kind);
rtnl_lock();
em->ops = tcf_em_lookup(em_hdr->kind);
if (em->ops) {
/* We dropped the RTNL mutex in order to
* perform the module load. Tell the caller
* to replay the request. */
module_put(em->ops->owner);
err = -EAGAIN;
}
#endif
goto errout;
}

Expand Down

0 comments on commit 42e61cc

Please sign in to comment.