Displaying 20 results from an estimated 34 matches for "rtattr".
2012 Dec 10
0
[Bridge] [PATCH v5] iproute2: add mdb sub-command to bridge
...nux/if_bridge.h>
+#include <linux/if_ether.h>
+#include <string.h>
+#include <arpa/inet.h>
+
+#include "libnetlink.h"
+#include "br_common.h"
+#include "rt_names.h"
+#include "utils.h"
+
+#ifndef MDBA_RTA
+#define MDBA_RTA(r) \
+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct br_port_msg))))
+#endif
+
+int filter_index;
+
+static void usage(void)
+{
+ fprintf(stderr, " bridge mdb {show} [ dev DEV ]\n");
+ exit(-1);
+}
+
+static void br_print_router_ports(FILE *f, struct rtattr *attr)
+{
+ uint32_t *port_ifindex;...
2006 Jun 15
0
[PATCH 2/2] Runtime configuration of HTB''s HYSTERESIS option (userspace)
...f
);
@@ -104,6 +105,7 @@ static int htb_parse_class_opt(struct qd
{
int ok=0;
struct tc_htb_opt opt;
+ struct tc_htb_hopt hopt;
__u32 rtab[256],ctab[256];
unsigned buffer=0,cbuffer=0;
int cell_log=-1,ccell_log = -1;
@@ -114,6 +116,7 @@ static int htb_parse_class_opt(struct qd
struct rtattr *tail;
memset(&opt, 0, sizeof(opt)); mtu = 1600; /* eth packet len */
+ memset(&hopt, 0, sizeof(hopt));
while (argc > 0) {
if (matches(*argv, "prio") == 0) {
@@ -132,6 +135,8 @@ static int htb_parse_class_opt(struct qd
if (get_u8(&mpu8, *argv, 10)) {
exp...
2006 Jun 15
0
[PATCH 1/2] Runtime configuration of HTB''s HYSTERESIS option (kernel)
...HYSTERESIS
- cl->cmode == HTB_CAN_SEND ? -cl->buffer :
-#endif
- 0))
+ if ((toks = (cl->tokens + *diff)) >= hysteresis)
return HTB_CAN_SEND;
*diff = -toks;
@@ -1323,6 +1317,7 @@ static int htb_dump_class(struct Qdisc *
unsigned char *b = skb->tail;
struct rtattr *rta;
struct tc_htb_opt opt;
+ struct tc_htb_hopt hopt;
HTB_DBG(0,1,"htb_dump_class handle=%X clid=%X\n",sch->handle,cl->classid);
@@ -1342,6 +1337,8 @@ static int htb_dump_class(struct Qdisc *
opt.quantum = cl->un.leaf.quantum; opt.prio = cl->un.leaf.prio;
opt.lev...
2012 Dec 05
2
[Bridge] [PATCH net-next v3] bridge: export multicast database via netlink
V3: drop debugging printk's
update selinux perm table as well
V2: drop patch 1/2, export ifindex directly
Redesign netlink attributes
Improve netlink seq check
Handle IPv6 addr as well
This patch exports bridge multicast database via netlink
message type RTM_GETMDB. Similar to fdb, but currently bridge-specific.
We may need to support modify multicast database too
2006 Jul 25
3
problem in Route add using netlink
...ta */
inet_aton("192.168.51.0", (struct in_addr *)&rinfo->dstAddr);
inet_aton("192.168.51.90", (struct in_addr *)&rinfo->gateWay);
}
int addAttr (struct nlmsghdr *nlhdr, int maxlen, int type,
void *data, int alen)
{
struct rtattr *rta;
int len = RTA_LENGTH(alen);
if (NLMSG_ALIGN(nlhdr->nlmsg_len) + len > maxlen)
return -1;
rta = (struct rtattr*)((char *)nlhdr + NLMSG_ALIGN(nlhdr->nlmsg_len));
rta->rta_type = type;
rta->rta_len = len;
memcpy(RTA_...
2012 Dec 07
3
[Bridge] [PATCH net-next v4] bridge: export multicast database via netlink
From: Cong Wang <amwang at redhat.com>
V4: remove some useless #include
some coding style fix
V3: drop debugging printk's
update selinux perm table as well
V2: drop patch 1/2, export ifindex directly
Redesign netlink attributes
Improve netlink seq check
Handle IPv6 addr as well
This patch exports bridge multicast database via netlink
message type RTM_GETMDB.
2004 Mar 18
6
[PATCH] packet delay scheduler
...+ del_timer(&q->timer);
+}
+
+static void dly_timer(unsigned long arg)
+{
+ struct Qdisc *sch = (struct Qdisc *)arg;
+
+ sch->flags &= ~TCQ_F_THROTTLED;
+ netif_schedule(sch->dev);
+}
+
+/* Tell Fifo the new limit. */
+static int change_limit(struct Qdisc *q, u32 limit)
+{
+ struct rtattr *rta;
+ int ret;
+
+ rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL);
+ if (!rta)
+ return -ENOMEM;
+
+ rta->rta_type = RTM_NEWQDISC;
+ ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit;
+ ret = q->ops->change(q, rta);
+ kfree(rta);
+
+ return ret;
+}
+
+/* Setup...
2007 Sep 19
7
ifb and ppp
Hello!
My goal is to setup an ingress traffic shaping on my PPPOE DSL line with ifb.
My old imq stuff used iptables marks (like ''iptables -t mangle -A
PREROUTING -p tcp --sport 22 -m length --length :500 -j MARK --set-mark 31'')
to classify the traffic and since i am lazy, i tried to to reuse them with
ifb. But no luck: iptables marks the packets well, but tc
2002 Jun 08
2
New qdisc path, try it (what is the problem)
hello,
this is my new qdisc patch, when i recompile the
kernel with this patch i dn''nt succeed please look at
it and if there are any mistakes plesease send me a
mail
thanks in advance
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
2006 Aug 02
10
[PATCH 0/6] htb: cleanup
The HTB scheduler code is a mess, this patch set does some basic
house cleaning. The first four should cause no code change, but the
last two need more testing.
--
Stephen Hemminger <shemminger@osdl.org>
"And in the Packet there writ down that doome"
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
2012 Nov 27
3
[Bridge] [RFC PATCH 1/2] bridge: export port_no and port_id via IFA_INFO_DATA
Based on net-next.
This patch exports port->port_no port->port_id in the end of IFA_INFO_DATA.
Cc: Herbert Xu <herbert at gondor.apana.org.au>
Cc: Stephen Hemminger <shemminger at vyatta.com>
Cc: "David S. Miller" <davem at davemloft.net>
Cc: Thomas Graf <tgraf at suug.ch>
Cc: Jesper Dangaard Brouer <brouer at redhat.com>
Signed-off-by: Cong Wang
2004 Jul 01
20
[PATCH 2.6] update to network emulation QOS scheduler
...- del_timer(&q->timer);
-}
-
-static void dly_timer(unsigned long arg)
-{
- struct Qdisc *sch = (struct Qdisc *)arg;
-
- sch->flags &= ~TCQ_F_THROTTLED;
- netif_schedule(sch->dev);
-}
-
-/* Tell Fifo the new limit. */
-static int change_limit(struct Qdisc *q, u32 limit)
-{
- struct rtattr *rta;
- int ret;
-
- rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL);
- if (!rta)
- return -ENOMEM;
-
- rta->rta_type = RTM_NEWQDISC;
- rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt));
- ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit;
- ret = q->ops->...
2023 Jun 19
1
[Bridge] [PATCH iproute2-next 1/1] iplink: bridge: Add support for bridge FDB learning limits
...LEARNED_ENTRIES, fdb_max_learned_entries);
} else if (matches(*argv, "fdb_flush") == 0) {
addattr(n, 1024, IFLA_BR_FDB_FLUSH);
} else if (matches(*argv, "vlan_default_pvid") == 0) {
@@ -544,6 +553,18 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_BR_GC_TIMER])
_bridge_print_timer(f, "gc_timer", tb[IFLA_BR_GC_TIMER]);
+ if (tb[IFLA_BR_FDB_CUR_LEARNED_ENTRIES])
+ print_uint(PRINT_ANY,
+ "fdb_cur_learned_entries",
+ "fdb_cur_learned_entries %u ",
+ rta_getattr_u32(tb[IFLA_...
2005 Mar 20
3
Adding dsmark qdisc fails
I''m trying to configure dsmark qdisc on 2.6.11.4 user mode linux and
tc from iproute2-2.6.11-050314.
I think I have some mismatch in my setup since adding dsmark qdisc
fails *unless* I specify "set_tc_index" argument which I believe should
be optional:
# tc qdisc add dev eth1 handle 1:0 root dsmark indices 8
RTNETLINK answers: Invalid argument
Mar 20 13:00:50 user user.debug
2005 Jan 04
11
ESFQ?
Hi again,
I was just looking around for ESFQ sources, and I see that the main site
is down, and only has kernel 2.6.4 patches.
Is ESFQ maintained? If so, where can I find patches for 2.6.10?
Thanks,
-justin
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
2012 Dec 20
3
[Bridge] [PATCH 1/3] iproute2: distinguish permanent and temporary mdb entries
...>ifindex),
- inet_ntop(AF_INET6, &e->addr.u.ip6, abuf, sizeof(abuf)));
+ inet_ntop(AF_INET6, &e->addr.u.ip6, abuf, sizeof(abuf)),
+ (e->state & MDB_PERMANENT) ? "permanent" : "temp");
}
static void br_print_mdb_entry(FILE *f, int ifindex, struct rtattr *attr)
@@ -179,11 +181,15 @@ static int mdb_modify(int cmd, int flags, int argc, char **argv)
} else if (strcmp(*argv, "grp") == 0) {
NEXT_ARG();
grp = *argv;
+ } else if (strcmp(*argv, "port") == 0) {
+ NEXT_ARG();
+ p = *argv;
+ } else if (strcmp(*argv, "...
2023 Sep 05
1
[Bridge] [PATCH iproute2-next v3] iplink: bridge: Add support for bridge FDB learning limits
...LEARNED_ENTRIES, fdb_max_learned_entries);
} else if (matches(*argv, "fdb_flush") == 0) {
addattr(n, 1024, IFLA_BR_FDB_FLUSH);
} else if (matches(*argv, "vlan_default_pvid") == 0) {
@@ -544,6 +553,18 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_BR_GC_TIMER])
_bridge_print_timer(f, "gc_timer", tb[IFLA_BR_GC_TIMER]);
+ if (tb[IFLA_BR_FDB_N_LEARNED_ENTRIES])
+ print_uint(PRINT_ANY,
+ "fdb_n_learned_entries",
+ "fdb_n_learned_entries %u ",
+ rta_getattr_u32(tb[IFLA_BR_FDB...
2023 Oct 18
3
[Bridge] [PATCH iproute2-next v5] iplink: bridge: Add support for bridge FDB learning limits
...IFLA_BR_FDB_MAX_LEARNED, fdb_max_learned);
} else if (matches(*argv, "fdb_flush") == 0) {
addattr(n, 1024, IFLA_BR_FDB_FLUSH);
} else if (matches(*argv, "vlan_default_pvid") == 0) {
@@ -544,6 +553,18 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_BR_GC_TIMER])
_bridge_print_timer(f, "gc_timer", tb[IFLA_BR_GC_TIMER]);
+ if (tb[IFLA_BR_FDB_N_LEARNED])
+ print_uint(PRINT_ANY,
+ "fdb_n_learned",
+ "fdb_n_learned %u ",
+ rta_getattr_u32(tb[IFLA_BR_FDB_N_LEARNED]));
+
+ if (t...
2004 Jun 22
3
[ANNOUNCE] sch_ooo - Out-of-order packet queue discipline
...rg;
+ struct ooo_sched_data *q = (struct ooo_sched_data *)sch->data;
+
+ DPRINTK("timer: Add a token and sched dev!\n");
+
+ /* add a token */
+ q->tokens++;
+
+ sch->flags &= ~TCQ_F_THROTTLED;
+ netif_schedule(sch->dev);
+}
+
+static int ooo_init(struct Qdisc *sch, struct rtattr *opt)
+{
+ struct ooo_sched_data *q = (struct ooo_sched_data *)sch->data;
+
+ memset (q, 0, sizeof(struct ooo_sched_data));
+
+ sch->stats.lock = &sch->dev->queue_lock;
+
+ /* init timer */
+ init_timer(&q->timer);
+ q->timer.function = ooo_timer;
+ q->timer.data = (uns...
2009 Nov 17
11
[Bridge] [PATCH 0/3] macvlan: add vepa and bridge mode
This is based on an earlier patch from Eric Biederman adding
forwarding between macvlans. I extended his approach to
allow the administrator to choose the mode for each macvlan,
and to implement a functional VEPA between macvlan.
Still missing from this is support for communication between
the lower device that the macvlans are based on. This would
be extremely useful but as others have found out