mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +00:00
sflow: Export LAG, PORTNAME, and OPENFLOWPORT information also.
Export standard sFlow LAG, PORTNAME and OPENFLOWPORT structures with each counter-sample. Add unit-test for sFlow-LAG. Adjust other unit-tests to accommodate these new annotations. The sFlow-LAG structures are important for topology discovery, for troubleshooting LAG instability, and for correctly combining sFlow feeds from multiple sources. The OPENFLOWPORT and PORTNAME structures are important for systems that aim to combine sFlow monitoring with OpenFlow controls, as they provide straightforward mapping (1) between sFlow agent IP and OpenFlow datapath-id, and (2) between interface name,ifIndex and OpenFlow port number. Signed-off-by: Neil McKee <neil.mckee@inmon.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -363,6 +363,21 @@ SFLPoller *sfl_agent_getPoller(SFLAgent *agent, SFLDataSource_instance *pdsi)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*_________________-----------------------------------__________________
|
||||
_________________ sfl_agent_getPollerByBridgePort __________________
|
||||
-----------------___________________________________------------------
|
||||
*/
|
||||
|
||||
SFLPoller *sfl_agent_getPollerByBridgePort(SFLAgent *agent, uint32_t port_no)
|
||||
{
|
||||
/* find it and return it */
|
||||
SFLPoller *pl = agent->pollers;
|
||||
for(; pl != NULL; pl = pl->nxt)
|
||||
if(pl->bridgePort == port_no) return pl;
|
||||
/* not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*_________________---------------------------__________________
|
||||
_________________ sfl_agent_getReceiver __________________
|
||||
-----------------___________________________------------------
|
||||
|
Reference in New Issue
Block a user