Triple-Speed Ethernet Intel® FPGA IP User Guide

ID 683402
Date 11/25/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

10.6.7. tse_mac_raw_send()

Details
Prototype: int tse_mac_raw_send(NET net, char *data, unsigned data_bytes)
Thread-safe: No
Available from ISR: No
Include: <triple_speed_ethernet_iniche.h>
Description: The tse_mac_raw_send() function sends Ethernet frames data to the MAC function. It validates the arguments to ensure the data length is greater than the ethernet header size specified by ALTERA_TSE_MIN_MTU_SIZE. The function also ensures the SGDMA TX engine is not busy prior to constructing the descriptor for the current transmit operation.

Upon successful validations, this function calls the internal API, tse_mac_sTxWrite, to initiate the synchronous SGDMA transmit operation on the current data buffer.

Parameter: net—The NET structure of the Triple-Speed Ethernet MAC instance.
data—A data pointer to the base of the Ethernet frame data, including the header, to be transmitted to the MAC. The data pointer is assumed to be word-aligned.
data_bytes—The total number of bytes in the Ethernet frame including the additional padding bytes as specified by ETHHDR_BIAS.
Return: SUCCESS if the current data buffer is successfully transmitted.

SEND_DROPPED if the number of data bytes is less than the Ethernet header size.


ENP_RESOURCE if the SGDMA TX engine is busy.