Ethernet VF PCT Configuration#
Add a new device in guest configuration into the drive_av PCT guest configuration. Specify the properties of the new Ethernet virtual function.
Ethernet Virtual Function Structure
This is defined in the pct. A new virtual function configuration must be added to the guest configuration file.
nr_chan
Description:
Specifies the count of DMA channels assigned to the virtual machine.
Values:
EQOS: The rage is from 1 to 8 max
MGBE: The rage id from 1 to 10 max
Conditions:
The minimum value should be 1.
stream_id
Description:
SMMU Stream is to be used by the virtual function.
Values:
EQOS:
TEGRA_SID_EQOS_VF0 to TEGRA_SID_EQOS_VF3
MGBE:
TEGRA_SID_MGBE_VF0 to TEGRA_SID_MGBE_VF4
Condition:
Should not use the stream ID used by other VFs
Channel[]
Description:
DMA channels list that needs to be used by this VF
Values:
EQOS: List values should be in 0 to 3
MGBE: List values should be in 0 to 5
Conditions:
Must be a unique value for the corresponding controller across all VF’s
The size of the list has to nr_chan value
It shouldn’t contain duplicate values
vinfterface
Description
IVC channel between Virtual Machine and Ethernet Server
Values
“RESOURCE_POOL(ETHER_VM_Q_426, 1)” to “RESOURCE_POOL(ETHER_VM_Q_455, 1)”
Conditions: - Only one IVC channel per VF - Must be a unique value for the corresponding controller across all VF’s
vf_id
Description:
VF number for this device.
Values:
PCT_ETHERNET_VF_ID_1 to PCT_ETHERNET_VF_ID_5
Conditions - For EQOS controller, max of four IDs is possible - For MGBE controller, max of five IDs is possible - In a given EQOS/MGBE port configuration, all VFs should have unique IDs
Note
When modifying Ethernet VF PCT Configuration, you must also update ethernet_en_vm[] in the OESP PCT (oesp_platform_config.h) accordingly.
The ethernet_en_vm[OESP_PCT_ETHERNET_MAX_VM] array defines a 64-bit variable for each Virtual Machine (VM), where OESP_PCT_ETHERNET_MAX_VM is the maximum number of
supported Virtual Machines. This 64-bit variable ethernet_en_vm[x] is used bitwise to represent ethernet_cfg and ethernet_mcfg fields in the guest configuration
The total number of Ethernet configurations is assumed to be less than 64, where N = PCT_MAX_ETHERNET_VF.
ethernet_en_vm[x][ N-1 : 0] -> pct.gconf[x].ethernet_cfg[N]
ethernet_en_vm[x][2N-1 : N] -> pct.gconf[x].ethernet_mcfg[0][N]
ethernet_en_vm[x][3N-1 : 2N] -> pct.gconf[x].ethernet_mcfg[1][N]
ethernet_en_vm[x][4N-1 : 3N] -> pct.gconf[x].ethernet_mcfg[2][N]
ethernet_en_vm[x][5N-1 : 4N] -> pct.gconf[x].ethernet_mcfg[3][N]
Each bit is set to 1 if the corresponding ethernet_server_conf.vf_id is not PCT_ETHERNET_VF_ID_INVAL. Otherwise, the bit is set to 0.
Reference PCT Device Node:
.ethernet_cfg = {
{
.nr_chan = 1,
.stream_id = TEGRA_SID_EQOS_VF0,
.channel[0] = 0,
.num_vm_irqs = 1,
.irq_data[0] = {
.irq_num = 839,
.num_vm_chans = 1,
.vm_chans[0] = 0,
},
.vinterface = {
.queues = RESOURCE_POOL(ETHER_VM_Q_426, 1),
},
.vf_id = GUEST0_ETHER_CFG_VFID_0,
},
{
.nr_chan = 2,
.stream_id = TEGRA_SID_EQOS_VF3,
.channel[0] = 3,
.channel[1] = 4,
.num_vm_irqs = 1,
.irq_data[0] = {
.irq_num = 842,
.num_vm_chans = 2,
.vm_chans[0] = 3,
.vm_chans[1] = 4,
},
.vinterface = {
.queues = RESOURCE_POOL(ETHER_VM_Q_449, 1),
},
.vf_id = GUEST0_ETHER_MCFG_0_VFID_2,
},