2 * q_multiq.c Multiqueue aware qdisc
4 * Copyright (c) 2008, Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17 * Place - Suite 330, Boston, MA 02111-1307 USA.
19 * Author: Alexander Duyck <alexander.h.duyck@intel.com>
21 * Original Authors: PJ Waskiewicz, <peter.p.waskiewicz.jr@intel.com> (RR)
22 * Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> (from PRIO)
31 #include <sys/socket.h>
32 #include <netinet/in.h>
33 #include <arpa/inet.h>
39 static void explain(void)
41 fprintf(stderr, "Usage: ... multiq [help]\n");
44 static int multiq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
47 struct tc_multiq_qopt opt;
50 if (strcmp(*argv, "help") == 0) {
54 fprintf(stderr, "What is \"%s\"?\n", *argv);
60 addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt));
64 int multiq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
66 struct tc_multiq_qopt *qopt;
70 if (RTA_PAYLOAD(opt) < sizeof(*qopt))
75 fprintf(f, "bands %u/%u ", qopt->bands, qopt->max_bands);
80 struct qdisc_util multiq_qdisc_util = {
82 .parse_qopt = multiq_parse_opt,
83 .print_qopt = multiq_print_opt,