#define MAX_PATTERN_NUM 3
#define MAX_ACTION_NUM 2
struct rte_flow *
generate_ipv4_flow(uint8_t port_id, uint16_t rx_q,
uint32_t src_ip, uint32_t src_mask,
uint32_t dest_ip, uint32_t dest_mask,
struct rte_flow *
generate_ipv4_flow(uint8_t port_id, uint16_t rx_q,
uint32_t src_ip, uint32_t src_mask,
uint32_t dest_ip, uint32_t dest_mask,
{
struct rte_flow *flow = NULL;
int res;
memset(pattern, 0, sizeof(pattern));
memset(action, 0, sizeof(action));
attr.ingress = 1;
action[0].conf = &queue;
ip_spec.hdr.dst_addr = htonl(dest_ip);
ip_mask.hdr.dst_addr = dest_mask;
ip_spec.hdr.src_addr = htonl(src_ip);
ip_mask.hdr.src_addr = src_mask;
pattern[1].spec = &ip_spec;
pattern[1].mask = &ip_mask;
if (!res)
return flow;
}