Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
PCIe Virtual Channel Host Interface

PCIe Virtual Channel Host Interface. More...

Files

file  vc.h
 Header file for the PCIe Virtual Channel support APIs.

Data Structures

struct  pcie_vctc_map
 Traffic Class (TC) to Virtual Channel (VC) map. More...

Macros

#define PCIE_VC_MAX_COUNT   8U
 Maximum number of Virtual Channels: 1 default VC + 7 extended VCs.
#define PCIE_VC_SET_TC0   BIT(0)
 Map Traffic Class 0 to a VC.
#define PCIE_VC_SET_TC1   BIT(1)
 Map Traffic Class 1 to a VC.
#define PCIE_VC_SET_TC2   BIT(2)
 Map Traffic Class 2 to a VC.
#define PCIE_VC_SET_TC3   BIT(3)
 Map Traffic Class 3 to a VC.
#define PCIE_VC_SET_TC4   BIT(4)
 Map Traffic Class 4 to a VC.
#define PCIE_VC_SET_TC5   BIT(5)
 Map Traffic Class 5 to a VC.
#define PCIE_VC_SET_TC6   BIT(6)
 Map Traffic Class 6 to a VC.
#define PCIE_VC_SET_TC7   BIT(7)
 Map Traffic Class 7 to a VC.

Functions

int pcie_vc_enable (pcie_bdf_t bdf)
 Enable PCIe Virtual Channel handling.
int pcie_vc_disable (pcie_bdf_t bdf)
 Disable PCIe Virtual Channel handling.
int pcie_vc_map_tc (pcie_bdf_t bdf, struct pcie_vctc_map *map)
 Map PCIe TC/VC.

Detailed Description

PCIe Virtual Channel Host Interface.

Macro Definition Documentation

◆ PCIE_VC_MAX_COUNT

#define PCIE_VC_MAX_COUNT   8U

#include <vc.h>

Maximum number of Virtual Channels: 1 default VC + 7 extended VCs.

◆ PCIE_VC_SET_TC0

#define PCIE_VC_SET_TC0   BIT(0)

#include <vc.h>

Map Traffic Class 0 to a VC.

◆ PCIE_VC_SET_TC1

#define PCIE_VC_SET_TC1   BIT(1)

#include <vc.h>

Map Traffic Class 1 to a VC.

◆ PCIE_VC_SET_TC2

#define PCIE_VC_SET_TC2   BIT(2)

#include <vc.h>

Map Traffic Class 2 to a VC.

◆ PCIE_VC_SET_TC3

#define PCIE_VC_SET_TC3   BIT(3)

#include <vc.h>

Map Traffic Class 3 to a VC.

◆ PCIE_VC_SET_TC4

#define PCIE_VC_SET_TC4   BIT(4)

#include <vc.h>

Map Traffic Class 4 to a VC.

◆ PCIE_VC_SET_TC5

#define PCIE_VC_SET_TC5   BIT(5)

#include <vc.h>

Map Traffic Class 5 to a VC.

◆ PCIE_VC_SET_TC6

#define PCIE_VC_SET_TC6   BIT(6)

#include <vc.h>

Map Traffic Class 6 to a VC.

◆ PCIE_VC_SET_TC7

#define PCIE_VC_SET_TC7   BIT(7)

#include <vc.h>

Map Traffic Class 7 to a VC.

Function Documentation

◆ pcie_vc_disable()

int pcie_vc_disable ( pcie_bdf_t bdf)

#include <vc.h>

Disable PCIe Virtual Channel handling.

Parameters
bdfthe target PCI endpoint
Returns
0 on success, a negative error code otherwise

◆ pcie_vc_enable()

int pcie_vc_enable ( pcie_bdf_t bdf)

#include <vc.h>

Enable PCIe Virtual Channel handling.

Parameters
bdfthe target PCI endpoint
Returns
0 on success, a negative error code otherwise

Note: Not being able to enable such feature is a non-fatal error and any code using it should behave accordingly (displaying some info, and ignoring it for instance).

◆ pcie_vc_map_tc()

int pcie_vc_map_tc ( pcie_bdf_t bdf,
struct pcie_vctc_map * map )

#include <vc.h>

Map PCIe TC/VC.

Parameters
bdfthe target PCI endpoint
mapthe tc/vc map to apply
Returns
0 on success, a negative error code otherwise

Note: VC must be disabled prior to call this function and enabled afterward in order for the endpoint to take advandage of the map.

Note: Not being able to enable such feature is a non-fatal error and any code using it should behave accordingly (displaying some info, and ignoring it for instance).