Velocity Userspace
Functions
Access through MRPC commands

Access the GAS through MRPC commands. More...

Functions

void gas_mrpc_memcpy_to_gas (struct switchtec_dev *dev, void __gas *dest, const void *src, size_t n)
 Copy data to the GAS using MRPC commands. More...
 
int gas_mrpc_memcpy_from_gas (struct switchtec_dev *dev, void *dest, const void __gas *src, size_t n)
 Copy data from the GAS using MRPC commands. More...
 
ssize_t gas_mrpc_write_from_gas (struct switchtec_dev *dev, int fd, const void __gas *src, size_t n)
 Call write() with data from the GAS using an MRPC command. More...
 

Detailed Description

Access the GAS through MRPC commands.

Access the gas through MRPC commands. The linux kernel may reject these commands if the process has insufficient permission.

MRPC commands respect the PAX ID where as standard gas access mechanisms may not.

These functions should generally not be used unless you really know what you are doing. The regular gas accessors (ie. gas_*()) will call these functions when switchtec_set_pax_id() has been used.

Function Documentation

◆ gas_mrpc_memcpy_from_gas()

int gas_mrpc_memcpy_from_gas ( struct switchtec_dev *  dev,
void *  dest,
const void __gas *  src,
size_t  n 
)

Copy data from the GAS using MRPC commands.

Parameters
[in]devSwitchtec device handle
[out]destDestination buffer
[in]srcSource gas address
[in]nNumber of bytes to transfer
Returns
0 on success, error code on failure

Definition at line 94 of file gas_mrpc.c.

◆ gas_mrpc_memcpy_to_gas()

void gas_mrpc_memcpy_to_gas ( struct switchtec_dev *  dev,
void __gas *  dest,
const void *  src,
size_t  n 
)

Copy data to the GAS using MRPC commands.

Parameters
[in]devSwitchtec device handle
[out]destDestination gas address
[in]srcSource data buffer
[in]nNumber of bytes to transfer

Definition at line 59 of file gas_mrpc.c.

◆ gas_mrpc_write_from_gas()

ssize_t gas_mrpc_write_from_gas ( struct switchtec_dev *  dev,
int  fd,
const void __gas *  src,
size_t  n 
)

Call write() with data from the GAS using an MRPC command.

Parameters
[in]devSwitchtec device handle
[in]fdDestination buffer
[in]srcSource gas address
[in]nNumber of bytes to transfer

Definition at line 131 of file gas_mrpc.c.