[PACKET_IO]add ip hash func
This commit is contained in:
@@ -66,11 +66,11 @@ struct pio_device_operations {
|
||||
|
||||
int (*close)(struct packet_io_device *pdev);
|
||||
|
||||
int (*recv)(struct packet_io_device *pdev, uint32_t rxq_id, struct stellar_packet **pkts, int nr_pkts);
|
||||
int (*recv)(struct packet_io_device *pdev, uint16_t rxq_id, struct stellar_packet **pkts, int nr_pkts);
|
||||
|
||||
int (*send)(struct packet_io_device *pdev, uint32_t txq_id, struct stellar_packet **pkts, int nr_pkts);
|
||||
int (*send)(struct packet_io_device *pdev, uint16_t txq_id, struct stellar_packet **pkts, int nr_pkts);
|
||||
|
||||
void (*pkt_free)(struct packet_io_device *pdev, uint32_t qid, struct stellar_packet **pkts, int nr_pkts);
|
||||
void (*pkt_free)(struct packet_io_device *pdev, uint16_t qid, struct stellar_packet **pkts, int nr_pkts);
|
||||
|
||||
void *(*buff_ctrlzone)(struct stellar_packet *p);
|
||||
|
||||
@@ -89,10 +89,10 @@ struct packet_io_device {
|
||||
struct pio_device_operations *dev_ops;
|
||||
|
||||
/* number of receive queue */
|
||||
uint32_t rxq_num;
|
||||
uint16_t rxq_num;
|
||||
|
||||
/* number of send queue */
|
||||
uint32_t txq_num;
|
||||
uint16_t txq_num;
|
||||
|
||||
/* packet io device context */
|
||||
union {
|
||||
@@ -126,7 +126,7 @@ void packet_io_instance_destroy(struct packet_io_instance *pinst);
|
||||
* @param nr_txq: number of send queue for the device
|
||||
*/
|
||||
struct packet_io_device *
|
||||
packet_io_device_open(struct packet_io_instance *pinst, const char *dev_name, uint32_t nr_rxq, uint32_t nr_txq);
|
||||
packet_io_device_open(struct packet_io_instance *pinst, const char *dev_name, uint16_t nr_rxq, uint16_t nr_txq);
|
||||
|
||||
/** close packet_io device */
|
||||
void packet_io_device_close(struct packet_io_device *dev);
|
||||
@@ -139,7 +139,7 @@ void packet_io_device_close(struct packet_io_device *dev);
|
||||
* @param p: received packet's pointer array
|
||||
* @param nr_p: number of received packets
|
||||
*/
|
||||
int packet_io_device_rx(struct packet_io_device *pdev, uint32_t rxq_id, struct stellar_packet **pkts, int nr_pkts);
|
||||
int packet_io_device_rx(struct packet_io_device *pdev, uint16_t rxq_id, struct stellar_packet **pkts, int nr_pkts);
|
||||
|
||||
/**
|
||||
* @brief packet_io device send function
|
||||
@@ -149,12 +149,12 @@ int packet_io_device_rx(struct packet_io_device *pdev, uint32_t rxq_id, struct s
|
||||
* @param p: prepare to send packet's pointer array
|
||||
* @param nr_p: number of packets which prepare to send
|
||||
*/
|
||||
int packet_io_device_tx(struct packet_io_device *pdev, uint32_t txq_id, struct stellar_packet **pkts, int nr_pkts);
|
||||
int packet_io_device_tx(struct packet_io_device *pdev, uint16_t txq_id, struct stellar_packet **pkts, int nr_pkts);
|
||||
|
||||
/*
|
||||
* @brief packet_io free packet buff
|
||||
*/
|
||||
void packet_io_pkts_free(struct packet_io_device *pdev, uint32_t qid, struct stellar_packet **pkts, int nr_pkts);
|
||||
void packet_io_pkts_free(struct packet_io_device *pdev, uint16_t qid, struct stellar_packet **pkts, int nr_pkts);
|
||||
|
||||
/**
|
||||
* @brief get packet_io packet's ctrlzone
|
||||
|
||||
Reference in New Issue
Block a user