diff options
| author | Mark Stapp <mjs@labn.net> | 2023-09-01 10:06:10 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@labn.net> | 2023-09-01 10:06:10 -0400 |
| commit | 7b8a4249ea9481ced4a5c29a7b5cacc0e3acb80d (patch) | |
| tree | 00bf1649958cb472ffa12b2217a6f53cfec0aeab /zebra/if_netlink.c | |
| parent | 030d2f0b8bd671cac091f965b8c3925e879ba3b0 (diff) | |
lib,zebra: add tx queuelen to interface struct
Add the txqlen attribute to the common interface struct. Capture
the value in zebra, and distribute it through the interface lib
module's zapi messaging.
Signed-off-by: Mark Stapp <mjs@labn.net>
Diffstat (limited to 'zebra/if_netlink.c')
| -rw-r--r-- | zebra/if_netlink.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index ca0a354afd..61a8c6a78a 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -1508,6 +1508,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) ns_id_t link_nsid = ns_id; ifindex_t master_infindex = IFINDEX_INTERNAL; uint8_t bypass = 0; + uint32_t txqlen = 0; frrtrace(3, frr_zebra, netlink_interface, h, ns_id, startup); @@ -1586,6 +1587,9 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) link_nsid = ns_id_get_absolute(ns_id, link_nsid); } + if (tb[IFLA_TXQLEN]) + txqlen = *(uint32_t *)RTA_DATA(tb[IFLA_TXQLEN]); + struct zebra_dplane_ctx *ctx = dplane_ctx_alloc(); dplane_ctx_set_ns_id(ctx, ns_id); dplane_ctx_set_ifp_link_nsid(ctx, link_nsid); @@ -1594,6 +1598,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) dplane_ctx_set_ifname(ctx, name); dplane_ctx_set_ifp_startup(ctx, startup); dplane_ctx_set_ifp_family(ctx, ifi->ifi_family); + dplane_ctx_set_intf_txqlen(ctx, txqlen); /* We are interested in some AF_BRIDGE notifications. */ #ifndef AF_BRIDGE |
