sFlow Phase 2: ifIndex translation platform/vpp changes - #256
ritvikiscool9 wants to merge 7 commits into
Conversation
Signed-off-by: Ritvik Uppal <rituppal@cisco.com>
Signed-off-by: Ritvik Uppal <rituppal@cisco.com>
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Signed-off-by: Ritvik Uppal <rituppal@cisco.com>
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Signed-off-by: Ritvik Uppal <rituppal@cisco.com>
… to 0012 Signed-off-by: Ritvik Uppal <rituppal@cisco.com>
…e_two_platform_vpp
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
To verify sFlow, I enabled it on Ethernet0 (VPP port bobm0) on the collector switch, set the sampling rate and send traffic from the other switch. I then captured a sampled packet with VPP packet trace (trace add dpdk-input). Trace of a sample packet: When sFlow is enabled on a port, VPP adds an sFlow node to that port's ingress path. Every incoming packet passes through this node, and 1 in N packets (sampling rate) are copied. The orignal packet continues forwarding untouched, the copy is exported out-of-band via PSAMPLE -> hsflowd -> UDP:6343 to the sFlow collector. A full trace for a packet: |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I would like to understand the need for a VPP patch to report the Linux ifIndex numbers. In the VPP sFlow plugin both the VPP ifIndex numbers and the Linux ifIndex numbers are shared over NetLink where hsflowd mod_vpp takes care of the rest depending on what settings are applied there (then ultimately hsflowd mod_sonic translates to the SONiC ifIndex numbers at the point where the datagrams are sent out to the sFlow collector). It sounds as though the patch is to bring all the NetLink messages into the Linux namespace earlier? Is that right? I'm concerned that hsflowd mod_vpp may be thrown by this when it receives the feed -- but perhaps the idea is not to run mod_vpp at all? I guess that makes sense because hsflowd mod_sonic will read the counters from redis anyway, so the PSAMPLE and DROPMON feeds from VPP just need to conform more directly to the SAI spec (Ultimately hsflowd mod_sonic will translate into the SONiC ifIndex namespace, but that happens later). |
Changes to platform/vpp:
VPP_VERSION(…-0.3→…-0.4) so the build pulls the locally-patched VPP instead of the prebuilt upstream deb.report-linux-ifindexmode to the VPP sFlow plugin (helper that maps VPPhw_if_index→ Linux netdev ifindex via linux-cp, applied to PSAMPLE flow samples and NET_DM drop alerts) plus the new CLI/API to toggle it.