Hi Nick, It would seem to me rather awkward to send a link-state notification to inform the CP of a non-existent interface. I would suggest you use a new notification in which you can include the DIP+TEID.
The client, via the API, can only affect the admin state of the link, the ‘link state’ is determined by the environmental factors like is there a cable plugged in. You might be interested in the NO_SUCH_TUNNEL handling in IPSec code via the punt-infra. /neale From: <vpp-dev@lists.fd.io> on behalf of Nick Zavaritsky <nick.zavarit...@emnify.com> Date: Tuesday 10 March 2020 at 13:22 To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Subject: [vpp-dev] Reporting stale tunnel via LINK DOWN event — ok or not? Hi, at EMnify we are working to extend GTPU support with features required in mobile networks. According to GTPU specification, if a received packet doesn't match an existing tunnel (unknown DIP+TEID), error indication is sent back. When an error indication is received, we have to tell the control plane so that it can take action. Using existing interface state change notifications looks promising. Is it appropriate to report a stale tunnel via LINK DOWN event, or should we rather implement a brand-new notification? Concerning interface state change notifications, I am somewhat puzzled how to use it properly. Event structure is defined as follows: define sw_interface_event { u32 client_index; u32 pid; vl_api_interface_index_t sw_if_index; vl_api_if_status_flags_t flags; bool deleted; }; enum if_status_flags { IF_STATUS_API_FLAG_ADMIN_UP = 1, IF_STATUS_API_FLAG_LINK_UP = 2, }; I would expect flags to reflect the current interface state, however it is not the case. Toggling admin up state will deliver events with flags set to ADMIN_UP or 0. Toggling link up state will deliver events with flags set to LINK_UP or 0. It is not possible to tell on the client side whether the link went down (flags = 0), or if the interface was brought down administratively (flags = 0). Any pointers? Best, N
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15722): https://lists.fd.io/g/vpp-dev/message/15722 Mute This Topic: https://lists.fd.io/mt/71855353/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-