All of lore.kernel.org
 help / color / mirror / Atom feed
* How does iptables classify change skb priority
@ 2011-02-01 16:31 Bhanu CV
  2011-02-01 16:36 ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: Bhanu CV @ 2011-02-01 16:31 UTC (permalink / raw)
  To: netfilter-devel

Hi,

I am trying to change the skb priority of the packets going out to a
particular destination. Then I use vlan set_egress_map to change the
vlan priority of the packet. This works as I want it to, the confusing
part is I do not know why it works!

I use the following two commands:

change the skb->priority (?) for the packets that I am interested in to 3:
iptables -t mangle -A POSTROUTING -d 192.168.10.75 -j CLASSIFY --set-class 0:3

change the vlan priority of the packet leaving over the vlan
vconfig set_egress_map eth4.2 3 3

This does send a packet on the wire with MAC layer priority of 3,
which is what I want. What I am trying to understand is the action
that iptables is taking. I do not have any class under the root qdisc
on eth4. The root qdisc has handle 0:

It would be great if someone could explain how iptables is classifying
the packet in a way which changes the skb->priority of the packet.

I had posted this same message on netfilter user mailing list but did
not get any responses. I am now posting it here hoping that the folks
on this mailing list would be able to help better.

Thanks in advance,
Bhanu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How does iptables classify change skb priority
  2011-02-01 16:31 How does iptables classify change skb priority Bhanu CV
@ 2011-02-01 16:36 ` Patrick McHardy
  2011-02-01 18:10   ` Bhanu CV
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick McHardy @ 2011-02-01 16:36 UTC (permalink / raw)
  To: Bhanu CV; +Cc: netfilter-devel

Am 01.02.2011 17:31, schrieb Bhanu CV:
> Hi,
> 
> I am trying to change the skb priority of the packets going out to a
> particular destination. Then I use vlan set_egress_map to change the
> vlan priority of the packet. This works as I want it to, the confusing
> part is I do not know why it works!
> 
> I use the following two commands:
> 
> change the skb->priority (?) for the packets that I am interested in to 3:
> iptables -t mangle -A POSTROUTING -d 192.168.10.75 -j CLASSIFY --set-class 0:3
> 
> change the vlan priority of the packet leaving over the vlan
> vconfig set_egress_map eth4.2 3 3
> 
> This does send a packet on the wire with MAC layer priority of 3,
> which is what I want. What I am trying to understand is the action
> that iptables is taking. I do not have any class under the root qdisc
> on eth4. The root qdisc has handle 0:
> 
> It would be great if someone could explain how iptables is classifying
> the packet in a way which changes the skb->priority of the packet.

It simply changes the skb->priority value, which used by the VLAN
driver to map to VLAN proprities. This is done by the VLAN driver
internally and unrelated to qdiscs.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How does iptables classify change skb priority
  2011-02-01 16:36 ` Patrick McHardy
@ 2011-02-01 18:10   ` Bhanu CV
  0 siblings, 0 replies; 4+ messages in thread
From: Bhanu CV @ 2011-02-01 18:10 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel

If I had a qdisc with handle 0:3 would the behavior be different?

Thanks a lot for the response!
Bhanu

On Tue, Feb 1, 2011 at 8:36 AM, Patrick McHardy <kaber@trash.net> wrote:
> Am 01.02.2011 17:31, schrieb Bhanu CV:
>> Hi,
>>
>> I am trying to change the skb priority of the packets going out to a
>> particular destination. Then I use vlan set_egress_map to change the
>> vlan priority of the packet. This works as I want it to, the confusing
>> part is I do not know why it works!
>>
>> I use the following two commands:
>>
>> change the skb->priority (?) for the packets that I am interested in to 3:
>> iptables -t mangle -A POSTROUTING -d 192.168.10.75 -j CLASSIFY --set-class 0:3
>>
>> change the vlan priority of the packet leaving over the vlan
>> vconfig set_egress_map eth4.2 3 3
>>
>> This does send a packet on the wire with MAC layer priority of 3,
>> which is what I want. What I am trying to understand is the action
>> that iptables is taking. I do not have any class under the root qdisc
>> on eth4. The root qdisc has handle 0:
>>
>> It would be great if someone could explain how iptables is classifying
>> the packet in a way which changes the skb->priority of the packet.
>
> It simply changes the skb->priority value, which used by the VLAN
> driver to map to VLAN proprities. This is done by the VLAN driver
> internally and unrelated to qdiscs.
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* How does iptables classify change skb priority
@ 2011-01-28 18:34 Bhanu CV
  0 siblings, 0 replies; 4+ messages in thread
From: Bhanu CV @ 2011-01-28 18:34 UTC (permalink / raw)
  To: netfilter

Hi,

I am trying to change the skb priority of the packets going out to a
particular destination. Then I use vlan set_egress_map to change the
vlan priority of the packet. This works as I want it to, the confusing
part is I do not know why it works!

I use the following two commands:

change the skb->priority (?) for the packets that I am interested in to 3:
iptables -t mangle -A POSTROUTING -d 192.168.10.75 -j CLASSIFY --set-class 0:3

change the vlan priority of the packet leaving over the vlan
vconfig set_egress_map eth4.2 3 3

This does send a packet on the wire with MAC layer priority of 3,
which is what I want. What I am trying to understand is the action
that iptables is taking. I do not have any class under the root qdisc
on eth4. The root qdisc has handle 0:

It would be great if someone could explain how iptables is classifying
the packet in a way which changes the skb->priority of the packet.

Thanks in advance,
Bhanu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-01 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 16:31 How does iptables classify change skb priority Bhanu CV
2011-02-01 16:36 ` Patrick McHardy
2011-02-01 18:10   ` Bhanu CV
  -- strict thread matches above, loose matches on Subject: below --
2011-01-28 18:34 Bhanu CV

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.