Re: What about adding range support for u32 classifier?

2005-09-01 Thread zhang yuanyi
2005/8/30, Jesper Juhl <[EMAIL PROTECTED]>:
> On 8/30/05, zhang yuanyi <[EMAIL PROTECTED]> wrote:
> > Hello, everyone!
> >
> > The "range support" may be puzzled, but I don't know how to express my
> > problem exactly because of my poor english.
> >
> > Just take an example, I may need all udp packets received on eth0
> > which source port is greater than 53 going into flow 10:1,  and I only
> > wanna to type one tc command like this(In fact, I communicated with
> > kernel directly):
> >
> > tc filter add dev eth0 parent : protocol ip prio 20 \
> >   u32 match udp sport gt 53 0x \
> > match ip protocol 17 0xff\
> >flowid 10:1
> >
> > But I found I can't, because u32 classifier doesn't support matching
> > multi-value in one key.So I need to add (65535-53) keys to a u32
> > filter to implement this.
> >
> > I intend to solve this problem by modifying u32 filter to match
> > multi-value in one key, but I am worrying the preformance.
> >
> > Can someone give me some suggestions?
> >
> How is this a kernel problem?
> "tc" is a userspace app. I think you'd be better off talking to Alexey
> Kuznetsov (added to Cc), who wrote tc, about this.
> 
Actually, I communicated with kernel directly in my app and don't use tc at all.

That tc command is used just for expressing my problem conveniently.

My problem is that I need to match udp/tcp packets with different s/d
port(f.e., all udp packets which source port is greater than 53 and
less than 5069) on ingress, but u32 classifier in kernel(not the tc
app) doesn't support matching value in a range.

So I think I may need to modify the kernel to add range support for
u32 classifier. But I am worrying its performance will be down.

Does anyone have a more clever solution?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: What about adding range support for u32 classifier?

2005-09-01 Thread zhang yuanyi
2005/8/30, Jesper Juhl [EMAIL PROTECTED]:
 On 8/30/05, zhang yuanyi [EMAIL PROTECTED] wrote:
  Hello, everyone!
 
  The range support may be puzzled, but I don't know how to express my
  problem exactly because of my poor english.
 
  Just take an example, I may need all udp packets received on eth0
  which source port is greater than 53 going into flow 10:1,  and I only
  wanna to type one tc command like this(In fact, I communicated with
  kernel directly):
 
  tc filter add dev eth0 parent : protocol ip prio 20 \
u32 match udp sport gt 53 0x \
  match ip protocol 17 0xff\
 flowid 10:1
 
  But I found I can't, because u32 classifier doesn't support matching
  multi-value in one key.So I need to add (65535-53) keys to a u32
  filter to implement this.
 
  I intend to solve this problem by modifying u32 filter to match
  multi-value in one key, but I am worrying the preformance.
 
  Can someone give me some suggestions?
 
 How is this a kernel problem?
 tc is a userspace app. I think you'd be better off talking to Alexey
 Kuznetsov (added to Cc), who wrote tc, about this.
 
Actually, I communicated with kernel directly in my app and don't use tc at all.

That tc command is used just for expressing my problem conveniently.

My problem is that I need to match udp/tcp packets with different s/d
port(f.e., all udp packets which source port is greater than 53 and
less than 5069) on ingress, but u32 classifier in kernel(not the tc
app) doesn't support matching value in a range.

So I think I may need to modify the kernel to add range support for
u32 classifier. But I am worrying its performance will be down.

Does anyone have a more clever solution?
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: What about adding range support for u32 classifier?

2005-08-30 Thread Jesper Juhl
On 8/30/05, zhang yuanyi <[EMAIL PROTECTED]> wrote:
> Hello, everyone!
> 
> The "range support" may be puzzled, but I don't know how to express my
> problem exactly because of my poor english.
> 
> Just take an example, I may need all udp packets received on eth0
> which source port is greater than 53 going into flow 10:1,  and I only
> wanna to type one tc command like this(In fact, I communicated with
> kernel directly):
> 
> tc filter add dev eth0 parent : protocol ip prio 20 \
>   u32 match udp sport gt 53 0x \
> match ip protocol 17 0xff\
>flowid 10:1
> 
> But I found I can't, because u32 classifier doesn't support matching
> multi-value in one key.So I need to add (65535-53) keys to a u32
> filter to implement this.
> 
> I intend to solve this problem by modifying u32 filter to match
> multi-value in one key, but I am worrying the preformance.
> 
> Can someone give me some suggestions?
> 
How is this a kernel problem?
"tc" is a userspace app. I think you'd be better off talking to Alexey
Kuznetsov (added to Cc), who wrote tc, about this.

-- 
Jesper Juhl <[EMAIL PROTECTED]>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please  http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: What about adding range support for u32 classifier?

2005-08-30 Thread Jesper Juhl
On 8/30/05, zhang yuanyi [EMAIL PROTECTED] wrote:
 Hello, everyone!
 
 The range support may be puzzled, but I don't know how to express my
 problem exactly because of my poor english.
 
 Just take an example, I may need all udp packets received on eth0
 which source port is greater than 53 going into flow 10:1,  and I only
 wanna to type one tc command like this(In fact, I communicated with
 kernel directly):
 
 tc filter add dev eth0 parent : protocol ip prio 20 \
   u32 match udp sport gt 53 0x \
 match ip protocol 17 0xff\
flowid 10:1
 
 But I found I can't, because u32 classifier doesn't support matching
 multi-value in one key.So I need to add (65535-53) keys to a u32
 filter to implement this.
 
 I intend to solve this problem by modifying u32 filter to match
 multi-value in one key, but I am worrying the preformance.
 
 Can someone give me some suggestions?
 
How is this a kernel problem?
tc is a userspace app. I think you'd be better off talking to Alexey
Kuznetsov (added to Cc), who wrote tc, about this.

-- 
Jesper Juhl [EMAIL PROTECTED]
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please  http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/