diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-06-29 07:43:50 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-08-08 09:15:22 -0400 |
| commit | 39ffa8e8e8564e41020f5ecfa12441c013685e24 (patch) | |
| tree | 87e885926c2aa8fc269633090983d7a299a4e748 /zebra/kernel_socket.c | |
| parent | c87f5c23922a17738111fff767501717d7b1b933 (diff) | |
zebra: Add a `mpls enable` interface node command
Allow individual interfaces to turn on/off the mpls subsystem
for it in linux.
sharpd@eva:~/frr9$ sudo sysctl -a | grep enp39s0 | grep mpls
net.mpls.conf.enp39s0.input = 0
sharpd@eva:~/frr9$ vtysh -c "conf" -c "int enp39s0" -c "mpls enable"
sharpd@eva:~/frr9$ sudo sysctl -a | grep enp39s0 | grep mpls
net.mpls.conf.enp39s0.input = 1
sharpd@eva:~/frr9$ vtysh -c "conf" -c "int enp39s0" -c "no mpls enable"
sharpd@eva:~/frr9$ sudo sysctl -a | grep enp39s0 | grep mpls
net.mpls.conf.enp39s0.input = 0
sharpd@eva:~/frr9$
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/kernel_socket.c')
| -rw-r--r-- | zebra/kernel_socket.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 2741a23242..076e9c4dfa 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -1529,7 +1529,7 @@ void kernel_update_multi(struct dplane_ctx_q *ctx_list) { struct zebra_dplane_ctx *ctx; struct dplane_ctx_q handled_list; - enum zebra_dplane_result res; + enum zebra_dplane_result res = ZEBRA_DPLANE_REQUEST_SUCCESS; TAILQ_INIT(&handled_list); @@ -1611,9 +1611,27 @@ void kernel_update_multi(struct dplane_ctx_q *ctx_list) res = ZEBRA_DPLANE_REQUEST_SUCCESS; break; - default: - res = ZEBRA_DPLANE_REQUEST_FAILURE; + case DPLANE_OP_INTF_NETCONFIG: + res = kernel_intf_netconf_update(ctx); break; + + case DPLANE_OP_NONE: + case DPLANE_OP_BR_PORT_UPDATE: + case DPLANE_OP_IPTABLE_ADD: + case DPLANE_OP_IPTABLE_DELETE: + case DPLANE_OP_IPSET_ADD: + case DPLANE_OP_IPSET_DELETE: + case DPLANE_OP_IPSET_ENTRY_ADD: + case DPLANE_OP_IPSET_ENTRY_DELETE: + case DPLANE_OP_NEIGH_IP_INSTALL: + case DPLANE_OP_NEIGH_IP_DELETE: + case DPLANE_OP_NEIGH_TABLE_UPDATE: + case DPLANE_OP_GRE_SET: + case DPLANE_OP_INTF_ADDR_ADD: + case DPLANE_OP_INTF_ADDR_DEL: + zlog_err("Unhandled dplane data for %s", + dplane_op2str(dplane_ctx_get_op(ctx))); + res = ZEBRA_DPLANE_REQUEST_FAILURE; } skip_one: |
