X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fark%2Fark_ext.h;h=d235d0ff858d41394334e5a3b36837b327ce61fc;hb=b59d4d5502dcb1b57be81eb21b5e8bcb80de49e7;hp=9c7d55a14c44073602c223c84f6af41224cc2731;hpb=f2764c3688ff70610036149a4bcbe60917a43e41;p=dpdk.git diff --git a/drivers/net/ark/ark_ext.h b/drivers/net/ark/ark_ext.h index 9c7d55a14c..d235d0ff85 100644 --- a/drivers/net/ark/ark_ext.h +++ b/drivers/net/ark/ark_ext.h @@ -244,5 +244,43 @@ int rte_pmd_ark_set_mtu(struct rte_eth_dev *dev, uint16_t size, void *user_data); +/** + * Extension prototype, optional implementation. + * Called during rte_eth_rx_burst() for each packet. This extension + * function allows the transfer of meta data from the user's FPGA to + * mbuf fields. + * + * @param mbuf + * The newly received mbuf + * @param meta + * The meta data from the user, up to 20 bytes. The + * underlying data in the PMD is of type uint32_t meta[5]; + * @param user_data + * user argument from dev_init() call. + */ +void rte_pmd_ark_rx_user_meta_hook(struct rte_mbuf *mbuf, + const uint32_t *meta, + void *user_data); + +/** + * Extension prototype, optional implementation. + * Called during rte_eth_tx_burst() for each packet. This extension + * function allows the transfer of data from the mbuf to the user's + * FPGA. Up to 20 bytes (5 32-bit words) are transferable + * + * @param mbuf + * The mbuf about to be transmitted. + * @param meta + * The meta data to be populate by this call. The + * underlying in the PMD is of type uint32_t meta[5]; + * @param meta_cnt + * The count in 32-bit words of the meta data populated, 0 to 5. + * @param user_data + * user argument from dev_init() call. + */ +void rte_pmd_ark_tx_user_meta_hook(const struct rte_mbuf *mbuf, + uint32_t *meta, + uint8_t *meta_cnt, + void *user_data); #endif