-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modules: introduce LLDP support #25
Conversation
I would prefer a list of interfaces with LLDP enabled is set in the lldp module. This way, the LLDP module request this allmulti stuff (better from a user pov). |
Shouldn't |
4378c48
to
509dc44
Compare
Ideally, no. Each module requiring multicast traffic should register its set of mcast addresses. For the latter case, if the user enables allmulti for debugging, or whatever else, allmulti should still be maintained when the user disables it. I think grout will need a similar infrastructure code, for adding unicast / mcast address filtering. |
I created two issues https://github.com/rjarry/grout/issues/27 and https://github.com/rjarry/grout/issues/28. |
8885980
to
9015740
Compare
09bc8f9
to
9c49509
Compare
1c52ba3
to
8a8d391
Compare
8a8d391
to
1875944
Compare
LLDP is enabled by default, and may be configured by interface grcli set lldp iface (default|all|IFACE) (rx|tx|both|off) and with global parameters grcli set lldp [ttl 10..600] [sysname <Groot>] [sysdesc <Router>] grcli show lldp config grcli show lldp neighbors [iface IFACE] [brief] Signed-off-by: Christophe Fontaine <[email protected]>
1875944
to
29f720c
Compare
arg_u16(p, "TTL", &ttl); | ||
if (ttl > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe return EINVAL if ttl is 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TTL value should be already checked when it is parsed (min 10s, max 600s ) in the CLI.
with_help("Interval in seconds, 10 < ttl < 600", ec_node_uint("TTL", 10, 600, 10)),
Here, we only check for existence of the parameter.
uint8_t type, | ||
uint8_t subtype, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see proper naming/sizing of enums in gr_lldp.h
.
|
||
// Only T_CHASSIS_ID T_PORT_ID T_TTL and T_END are mandatory | ||
lldp_tlv_append( | ||
mbuf, T_CHASSIS_ID, T_CHASSIS_MAC_ADDRESS, RTE_ETHER_ADDR_LEN, src_addr.addr_bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit pick:
mbuf, T_CHASSIS_ID, T_CHASSIS_MAC_ADDRESS, sizeof(src_addr), &src_addr
mbuf, T_CHASSIS_ID, T_CHASSIS_IF_ALIAS, strlen(lldp_ctx.sys_name), lldp_ctx.sys_name | ||
); | ||
lldp_tlv_append( | ||
mbuf, T_PORT_ID, T_PORT_MAC_ADDRESS, RTE_ETHER_ADDR_LEN, src_addr.addr_bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same:
mbuf, T_CHASSIS_ID, T_CHASSIS_MAC_ADDRESS, sizeof(src_addr), &src_addr
c992f96
to
33f768f
Compare
Why should a complete LLDP stack be redesigned ? What's about all the LLDP options ? This stack https://github.com/lldpd/lldpd would be a good fit, but I don't understand the datamodel that could be used for lldpd to leverage grout. Moreover, it would be a proof point that the integration of a signaling stack is achievable. |
The initial idea wasn’t to implement all options, but to have rather a minimal implementation, to see what needs to be added to grout.
This stack https://github.com/lldpd/lldpd would be a good fit, but I don't understand the datamodel that could be used for lldpd to leverage grout.
Moreover, it would be a proof point that the integration of a signaling stack is achievable.
Indeed, we may want to revisit it as the infra is here, to investigate how we can integrate external stacks to grout.
|
b519766
to
aeffe13
Compare
Not enough time to work on that, closing to rework properly on it later. |
Interfaces must accept multicast frames:
grcli set interface port <port0> allmulti on
LLDP is configured globally