Robert Love wrote:
> On Fri, 2009-05-01 at 11:27 -0700, Joe Eykholt wrote:
>> Love, Robert W wrote:
> 
> <snip>
> 
>>>>  find_skbedit_filter()
>>>>  {
>>>>    ifname=$1
>>>> +  ethertype=$2
>>>> +  filter_id=$3
>>>>
>>>>    found=`tc filter show dev $ifname | awk '
>>>>    BEGIN {
>>>> @@ -120,11 +118,11 @@ find_skbedit_filter()
>>>>            x3 = 0
>>>>            queue = 8
>>>>    }
>>>> -  /^filter.*parent.*protocol '$FCOE_ETHERTYPE'.* handle '$FILTER_ID'/
>>>> { +        /^filter.*parent.*protocol \['$ethertype'\].* handle
>>>>            '$filter_id'/ { if (x1 == 0 && x2 == 0 && x3 == 0)
>>>>                    x1 = 1
>>>>    }
>>>> -  /cmp.*u16 at 12 layer 1 mask 0xffff eq '$FCOE_ETHERTYPE'.*\)/ {
>>>> +  /cmp.*u16 at 12 layer 1 mask 0xffff eq '$ethertype'.*\)/ {
>> Now since we're matching on the
>> protocol, I don't think we need to do the equivalent compare of the
>> "u16 at 12", which is also the ethertype. That was only necessary before
>> tc could take arbitrary ethertypes. Of course, this doesn't do any harm
>> as far as I can tell.
>>
> Are you suggesting that we can remove the cmp or that the cmp should be
> written more elegantly? Can you show me the preferred syntax? I've
> played around, but I can't get it right.

It seems to me the cmp can be removed, since the filter is already specifying
the ethertype.  tc matches the protocol and then does the cmp
which matches again.  It used to be that we specified the protocol as 802.3
and then the cmp with the ethertype was needed.  But now, it isn't.

It'll be a little more efficient on transmit without this.

It'd be even more efficient if we could just put the priority in the skb
before we send it, but I suppose that's not as flexible.

    Joe


_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to