Re: newbie queuing priority question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try the following:

tc qdisc del root dev eth0
tc qdisc add dev eth0 root handle 1: prio
tc filter add dev eth0 parent 1:0 protocol all u32 match u32 0x00000000
0x00000000 at 0 flowid 1:3
tc filter add dev eth0 parent 1:0 protocol all u32 match u32 0x00E00000
0x00E00000 at 0 flowid 1:1


ping -Q 255 192.168.1.1
tc -s class ls dev eth0


The first command deletes the qdisc on eth0
The second creates the prio qdisc
the third line is a filter that takes all that did not match the fourth
line filter rule to 1:3
the fourth line takes the frames matching 0x00E00000 (with mask
0x00E00000) at position 0 of ip packet to class 1:1
 
You can check with a ping -Q and the dump of the classes.



Le mardi 17 novembre 2009 à 14:14 -0800, David L a écrit :
> Hi,
> 
> I need to prioritize data sent on a socket over a ppp link
> so it is transmitted before some other data sharing that link.
> I googled around for a few days and I thought I understood
> how I might go about doing this, but my attempts have
> failed.
> 
> I thought the default qdisc (pfifo_fast) would prioritize data
> flagged as "lowdelay" by putting it in a different band that has
> preferential queuing priority over data in other bands.  I
> attempted to configure the socket like this:
> 
>   int lowdelay = IPTOS_LOWDELAY;
>   return setsockopt(servFd_, IPPROTO_IP, IP_TOS,
>                     (void *)&lowdelay, sizeof(lowdelay));
> 
> 
> And I verified that the data had TOS=0x10 using tcpdump:
> 
> tcpdump -v -v -i ppp0
> 13:47:00.259910 IP (tos 0x10, ttl 64, id 26932, offset 0, flags [DF],
> proto TCP (6), length 67)
>     10.10.12.2.irisa > 10.10.12.1.41152: Flags [P.], cksum 0x178a
> (correct), seq 480:495, ack 1, win 91, options [nop,nop,TS val
> 10108331 ecr 683540551], length 15
> ...
> 
> But when I browse a web page through that same ppp link,
> the 5Hz data that I'm expecting through the priority socket
> has delays of up to a second.  This is well over the maximum
> delay I expected, which was around MTU/baud rate assuming
> one big message was queued just before I send the next 5
> Hz priority message.  I tried UDP sockets too in case it
> was the low priority ack that was causing the problem, but that
> didn't seem to make a difference.
> 
> Any ideas what I'm doing wrong?
> 
> Thanks,
> 
>            David
> --
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux