src/dpdk/drivers/net/igc/igc_flow.c
static inline struct rte_flow *
igc_alloc_flow(const void *filter, enum igc_filter_type type, uint inbytes)
{
	/* allocate memory, 8 bytes boundary aligned */
	struct rte_flow *flow = rte_malloc("igc flow filter",
			sizeof(struct rte_flow) + inbytes, 8);
	if (flow == NULL) {
		PMD_DRV_LOG(ERR, "failed to allocate memory");
		return NULL;
	}

	flow->filter_type = type;

	/* copy filter data */
	memcpy(flow->filter, filter, inbytes);
	return flow;
}
/**
 * Allocate a rte_flow from the heap
 * Return the pointer of the flow, or NULL for failed
 **/
Allocate a rte_flow from the heap
Return the pointer of the flow, or NULL for failed
Allocate a rte_flow from the heap Return the pointer of the flow or NULL for failed
static inline struct rte_flow *
igc_alloc_flow(const void *filter, enum igc_filter_type type, uint inbytes)
{
	struct rte_flow *flow = rte_malloc("igc flow filter",
			sizeof(struct rte_flow) + inbytes, 8);
	if (flow == NULL) {
		PMD_DRV_LOG(ERR, "failed to allocate memory");
		return NULL;
	}
	flow->filter_type = type;
	memcpy(flow->filter, filter, inbytes);
	return flow;
}
static inline struct rte_flow * igc_alloc_flow ( const void * filter , enum igc_filter_type type , uint inbytes ) { struct rte_flow * flow = rte_malloc ( " " , sizeof ( struct rte_flow ) + inbytes , 8 ) ; if ( flow == NULL ) { PMD_DRV_LOG ( ERR , " " ) ; return NULL ; } flow -> filter_type = type ; memcpy ( flow -> filter , filter , inbytes ) ; return flow ; }
Allocate a rte_flow from the heap
 Return the pointer of the flow, or NULL for failed
Allocate a rte_flow from the heap Return the pointer of the flow or NULL for failed
/* allocate memory, 8 bytes boundary aligned */ /* copy filter data */