att / vfd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add capability to strip VLAN id's and insert VLAN id based on TX descriptor command if number of VLAN id's in the list > 1

azelezniak opened this issue · comments

if (vlans > 1 && strip)
rx_vlan_strip_set_on_vf(port->rte_port_number, vf->num, 1 ); // if more than one vlan in the list force strip to be on
tx_vlan_insert_set_on_vf(port->rte_port_number, vf->num, 0 ); // and set insert to id 0 which make use TX descriptor value to insert

tested, VFd works,
upstream systems handling HEAT have to be modified to accept VLAN list and strip/insert option

This is fixed in commit 4587363.

VFd will allow the following configurations for a VF:

Single VLAN, strip==false -- Packets arriving will be passed to the guest only if the VLAN ID in the packet matches and the ID will not be removed. On Tx the application must add the VLAN ID to the mbuf descriptor, and it must match the VLAN ID in the list.

Single VLAN, strip==true -- Packets arriving will be passed to the guest as described above, and the VLAN ID will be removed. Tx packets will have the VLAN ID added (inserted) into the packet using the ID in the config.

Multiple VLAN IDs in the list, strip == false -- Any packet arriving which has an ID which is in the list will be passed into the guest; the ID will not be removed. On Tx, the application is expected to add one of the VLAN IDs in the list to the mbuf descriptor. If the ID does not match the NIC will drop the packet as spoofed.

The previous cases are the original behavour, and this change does not change that behavour.

Mutiple VLAN IDs in the list, strip == true -- Packets arriving will be passed into the guest provided the VLAN ID matches one of the IDs in the list. The ID will be removed from the packet before it is written into the guest's buffer. Tx packets must contain one of the VLAN IDs in the list in the mbuf descriptor. If the ID in the descriptor is not in the list, the NIC will drop the packet as spoofed.