Contrailen 171 - vrouter vifdump mirroring enhancement for bond-slave-links

Registered by Deepak Tiwari

#1. Problem Statement
==================
The Kernel level tools, like tcpdump, do not work when vRouter is deployed in DPDK mode, since the Linux network stack is bypassed. There exist already a tcpdump like command (i.e. vifdump), which works on the bond interface but it can’t be used to monitor its slave/member interfaces; so there is no way to debug each slave individually.

#2. Proposed solution
==================
List of changes in vRouter application to enhance ‘vifdump’ tool [MUA1] for monitoring slave interaces are described below.

##2.1 “vif --list” command output
--------
Enhance output of “vif --list” command to display slave interface attached to a bond interface and the corresponding monitoring interfaces for slaves if any. With slave interfaces also visible in command output, user will be able to specify a slave interface as interface to be monitored in ‘vifdump’ command.

##2.2 Changes in "vifdump" to add/delete the monitoring interfaces for the slaves
--------
Most of the Current current logic in this script shall work as it is even when monitored interface is a slave interface of a bond interface. However due to the fact that there is no vif-id and corresponding vif context in vrouter for the slave interfaces therefore the naming convention for slave interfaces had to be improvised accordingly.

##2.3 Monitoring configuration
--------
If the monitored interface is a slave-interface and monitoring is not already active, then vRouter DPDK driver shall register pre-tx and post-rx call-back functions by calling “rte_eth_add_tx_callback” and “rte_eth_add_rx_callback” APIs of DPDK to register call-backs for the specified slave interface. The callback function will perform mirroring of the packet data onto the KNI/Tuntap interface towards the kernel.

##2.3 Transmitted Packet Monitoring
--------
At the time of Tx packet processing—

a. When rte_eth_tx_burst API is called for a slave interface which was being monitored then it would have a “pre_tx_burst_cbs” callback registered as explained above. The pre_tx_burst_cbs function will mirror the packet towards the KNI/Tuntap mirror interface in same way as currently done in “dpdk_if_tx/rx” functions.

##2.4 Received Packet Monitoring
--------
At the time of Rx packet processing—

a. When rte_eth_rx_burst API is called for a slave interface which was being monitored then it would have a “post_rx_burst_cbs” callback registered as explained above. This function will mirror the packet towards the KNI/Tuntap mirror interface in same way as currently done in “dpdk_if_tx/rx” functions.

Blueprint information

Status:
Started
Approver:
Paul Carver
Priority:
Undefined
Drafter:
Deepak Tiwari
Direction:
Needs approval
Assignee:
Deepak Tiwari
Definition:
Approved
Series goal:
None
Implementation:
Needs Code Review
Milestone target:
None
Started by
Paul Carver
(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.