Wisam Jaddo bf3688f1e8 app/flow-perf: add insertion rate calculation
Add insertion rate calculation feature into flow
performance application.

The application now provide the ability to test
insertion rate of specific rte_flow rule, by
stressing it to the NIC, and calculate the
insertion rate.

The application offers some options in the command
line, to configure which rule to apply.

After that the application will start producing
rules with same pattern but increasing the outer IP
source address by 1 each time, thus it will give
different flow each time, and all other items will
have open masks.

The current design have single core insertion rate.

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
2020-06-29 15:47:36 +02:00

38 lines
918 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2020 Mellanox Technologies, Ltd
*
* This file contains the items, actions and attributes
* definition. And the methods to prepare and fill items,
* actions and attributes to generate rte_flow rule.
*/
#ifndef FLOW_PERF_FLOW_GEN
#define FLOW_PERF_FLOW_GEN
#include <stdint.h>
#include <rte_flow.h>
#include "config.h"
/* Actions */
#define HAIRPIN_QUEUE_ACTION FLOW_ACTION_MASK(0)
#define HAIRPIN_RSS_ACTION FLOW_ACTION_MASK(1)
/* Attributes */
#define INGRESS FLOW_ATTR_MASK(0)
#define EGRESS FLOW_ATTR_MASK(1)
#define TRANSFER FLOW_ATTR_MASK(2)
struct rte_flow *
generate_flow(uint16_t port_id,
uint16_t group,
uint64_t flow_attrs,
uint64_t flow_items,
uint64_t flow_actions,
uint16_t next_table,
uint32_t outer_ip_src,
uint16_t hairpinq,
struct rte_flow_error *error);
#endif /* FLOW_PERF_FLOW_GEN */