tc_load is called the first time that a queue-related operation happens on a netdev. For example, when a netdev is first added to a bridge, and high-level code calls netdev_get_qos(), netdev-linux will check the current qdisc and then, if that one is known, call the tc_load function to find out the current configuration.
On Tue, Mar 03, 2015 at 05:58:21PM +0100, impClaw wrote: > Thank you for the information, it makes sense, removing the > conditional made it work nicely. So, I have another question, exactly > what is tc_load used for? In what case is it called? I can't seem to > trigger it for a specific qdisc (say HTB). If I get this working, I > can hopefully contribute my changes to the Open vSwitch project. > > 2015-03-02 17:28 GMT+01:00 Ben Pfaff <[email protected]>: > > On Mon, Mar 02, 2015 at 04:04:30PM +0100, impClaw wrote: > >> I have implemented support for classless qdiscs fq_codel, codel, sfq > >> and red in open vswitch. However, there is a line of code in > >> 'vswitchd/bridge.c' that forbids configuring a qos without at least > >> one queue (qos->n_queues < 1): > >> > >> 3671 if (!qos || qos->type[0] == '\0' || qos->n_queues < 1) { > >> > >> What is the reason behind this? Will it break anything if I remove it? > > > > For the existing qdiscs, it didn't make sense to not have any queues. > > Since you're adding classless qdiscs, I guess you should remove it. > > > > -- > Please avoid sending me Word, Excel or PowerPoint attachments. See > http://www.gnu.org/philosophy/no-word-attachments.html > > Please consider the environment before printing this e-mail. See > http://thinkbeforeprinting.org/ > _______________________________________________ > dev mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
