#include <rte_ether.h>
#include <rte_ip.h>
#include <rte_udp.h>
+#include <rte_memzone.h>
#include "enic_compat.h"
#include "enic.h"
#include "vnic_nic.h"
#define IP_DEFTTL 64 /* from RFC 1340. */
-#define IP_VERSION 0x40
-#define IP_HDRLEN 0x05 /* default IP header length == five 32-bits words. */
-#define IP_VHL_DEF (IP_VERSION | IP_HDRLEN)
#define IP6_VTC_FLOW 0x60000000
/* Highest Item type supported by Flowman */
struct fm_exact_match_table *cmd;
struct fm_header_set *hdr;
struct enic_fm_fet *fet;
- u64 args[3];
+ uint64_t args[3];
int ret;
ENICPMD_FUNC_TRACE();
sizeof(struct rte_vxlan_hdr);
append_template(&template, &off, item->spec,
sizeof(struct rte_ipv4_hdr));
- ip4->version_ihl = IP_VHL_DEF;
+ ip4->version_ihl = RTE_IPV4_VHL_DEF;
if (ip4->time_to_live == 0)
ip4->time_to_live = IP_DEFTTL;
ip4->next_proto_id = IPPROTO_UDP;
uint64_t *handle)
{
uint32_t bdf;
- u64 args[2];
+ uint64_t args[2];
int rc;
ENICPMD_FUNC_TRACE();
struct enic_fm_counter *ctrs;
struct enic *enic;
int i, rc;
- u64 args[2];
+ uint64_t args[2];
ENICPMD_FUNC_TRACE();
enic = fm->enic;
enic_fm_counter_zero(struct enic_flowman *fm, struct enic_fm_counter *c)
{
struct enic *enic;
- u64 args[3];
+ uint64_t args[3];
int ret;
ENICPMD_FUNC_TRACE();
static int
enic_fm_action_free(struct enic_flowman *fm, uint64_t handle)
{
- u64 args[2];
+ uint64_t args[2];
int rc;
ENICPMD_FUNC_TRACE();
static int
enic_fm_entry_free(struct enic_flowman *fm, uint64_t handle)
{
- u64 args[2];
+ uint64_t args[2];
int rc;
ENICPMD_FUNC_TRACE();
struct rte_flow_error *error)
{
struct fm_tcam_match_entry *ftm;
- u64 args[3];
+ uint64_t args[3];
int ret;
ENICPMD_FUNC_TRACE();
struct rte_flow_error *error)
{
struct fm_exact_match_entry *fem;
- u64 args[3];
+ uint64_t args[3];
int ret;
ENICPMD_FUNC_TRACE();
struct fm_action *fma;
uint64_t action_h;
uint64_t entry_h;
- u64 args[3];
+ uint64_t args[3];
int ret;
ENICPMD_FUNC_TRACE();
struct rte_flow_query_count *query;
struct enic_fm_flow *fm_flow;
struct enic *enic;
- u64 args[3];
+ uint64_t args[3];
int rc;
ENICPMD_FUNC_TRACE();
static int
enic_fm_tbl_free(struct enic_flowman *fm, uint64_t handle)
{
- u64 args[2];
+ uint64_t args[2];
int rc;
args[0] = FM_MATCH_TABLE_FREE;
{
struct fm_tcam_match_table *tcam_tbl;
struct enic *enic;
- u64 args[2];
+ uint64_t args[2];
int rc;
ENICPMD_FUNC_TRACE();
enic_fm_free_all_counters(struct enic_flowman *fm)
{
struct enic *enic;
- u64 args[2];
+ uint64_t args[2];
int rc;
enic = fm->enic;
enic_fm_init(struct enic *enic)
{
struct enic_flowman *fm;
- u8 name[NAME_MAX];
+ uint8_t name[RTE_MEMZONE_NAMESIZE];
int rc;
if (enic->flow_filter_mode != FILTER_FLOWMAN)
TAILQ_INIT(&fm->fet_list);
TAILQ_INIT(&fm->jump_list);
/* Allocate host memory for flowman commands */
- snprintf((char *)name, NAME_MAX, "fm-cmd-%s", enic->bdf_name);
+ snprintf((char *)name, sizeof(name), "fm-cmd-%s", enic->bdf_name);
fm->cmd.va = enic_alloc_consistent(enic,
sizeof(union enic_flowman_cmd_mem), &fm->cmd.pa, name);
if (!fm->cmd.va) {