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_NISO1_EQOS,

TEGRA_SID_NISO1_EQOS_VF1 to TEGRA_SID_NISO1_EQOS_VF4

  • MGBEL

TEGRA_SID_NISO0_MGBE,

TEGRA_SID_NISO0_MGBE_VF1 to TEGRA_SID_NISO0_MGBE_VF20

  • 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 4

    • 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(429, 1)” to “RESOURCE_POOL(445, 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 are possible

      • For MGBE controller, max of five IDs are 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 VMs.

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_NISO1_EQOS_VF2,
                .channel[0] = 2,
                .vinterface = {
                    .queues = RESOURCE_POOL(436, 1),
                },
                .vf_id = PCT_ETHERNET_VF_ID_3,
            },
            {
                .nr_chan = 1,
                .stream_id = TEGRA_SID_NISO1_EQOS_VF3,
                .channel[0] = 3,
                .vinterface = {
                    .queues = RESOURCE_POOL(437, 1),
                },
                .vf_id = PCT_ETHERNET_VF_ID_4,
            },
        },