Modify

Opened 7 years ago

Closed 7 years ago

#8849 closed enhancement (fixed)

Add the possibility to select IFB in kernel.

Reported by: Jérôme Poulin <jeromepoulin@…> Owned by: developers
Priority: normal Milestone: Backfire 10.03.1
Component: kernel Version: Trunk
Keywords: Cc:

Description

It would be very nice to see IFB around in Backfire's kernel for QoS, it is supposed to be the future of IMQ, I had problem recently with the IMQ device on Backfire, the IMQ device had its traffic control set, device was up and as soon as I applied the IMQ iptables target, traffic sent to the IMQ would get dropped for no apparent reason, trying the same kind of traffic management with IFB worked right away.

Here is the script I used for IMQ:

       ## Uplink (IMQ)
       IMQN=${I#eth0.}
       IMQ=imq${IMQN}
       ifconfig $IMQ up
       iptables -t mangle -A PREROUTING -i $I -j IMQ --todev $IMQN
       tc qdisc del dev $IMQ root 2>/dev/null
       tc qdisc add dev $IMQ root handle 1: htb default 30
       
       tc class add dev $IMQ parent 1: classid 1:1 htb rate 600kbit ceil 600kbit
         tc class add dev $IMQ parent 1:1 classid 1:10 htb rate 60kbit ceil 250kbit
               tc qdisc  add dev $IMQ parent 1:10 handle 10: sfq limit 10
               tc filter add dev $IMQ parent 1:10 handle 0x10 fw flowid 1:10
         tc class add dev $IMQ parent 1:1 classid 1:30 htb rate 512kbit ceil 512kbit
               tc qdisc  add dev $IMQ parent 1:30 handle 30: red min 3800b max 11500b limit 30000b avpkt 1200 burst 6 ecn

I also tried policing which worked:

       ## Uplink (police)
       tc qdisc  add dev $I handle ffff: ingress
       tc filter add dev $I parent ffff: u32 match ip src 0/0 police rate 550kbit burst 20k drop flowid :1

Then I tried IFB for more precise control which worked perfectly:

        ## Uplink (ifb)
        IFBN=${I#eth0.}
        IFB=ifb${IFBN}
        ip link add dev $IFB type ifb
        tc qdisc del dev $IFB root 2>/dev/null
        tc qdisc add dev $IFB root handle 1: htb default 30
        
        tc class add dev $IFB parent 1: classid 1:1 htb rate 600kbit ceil 600kbit
          tc class add dev $IFB parent 1:1 classid 1:10 htb rate 60kbit ceil 250kbit
                tc qdisc  add dev $IFB parent 1:10 handle 10: sfq limit 10
                tc filter add dev $IFB parent 1:10 handle 0x10 fw flowid 1:10
          tc class add dev $IFB parent 1:1 classid 1:30 htb rate 512kbit ceil 512kbit
                tc qdisc  add dev $IFB parent 1:30 handle 30: red min 3800b max 11500b limit 30000b avpkt 1200 burst 6 ecn
                
        ip link set dev $IFB up
        tc qdisc add dev $I ingress
        tc filter add dev $I parent ffff: protocol ip prio 10 u32 match u32 0 0 flowid 1:1 \
                action mirred egress redirect dev $IFB

Maybe something was wrong with my IMQ traffic management but adding IFB as a choice would certainly not hurt.

Attachments (1)

ifb-backfire-p0-r25293.diff (677 bytes) - added by Jérôme Poulin <jeromepoulin@…> 7 years ago.
Patch against r25293

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Jérôme Poulin <jeromepoulin@…>

Patch against r25293

comment:1 Changed 7 years ago by Jérôme Poulin <jeromepoulin@…>

I was told by mystica555 that my problem with IMQ could have been caused by ipt_queue iptables module in case someone happens to step on this bug while searching Google.
I still think it is a good idea to include IFB in menuconfig.

comment:2 Changed 7 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Added in r25894 - thanks!

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.