linux/drivers/net/ethernet/netronome/nfp/flower/metadata.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/* Copyright (C) 2017-2018 Netronome Systems, Inc. */

#include <linux/hash.h>
#include <linux/hashtable.h>
#include <linux/jhash.h>
#include <linux/math64.h>
#include <linux/vmalloc.h>
#include <net/pkt_cls.h>

#include "cmsg.h"
#include "conntrack.h"
#include "main.h"
#include "../nfp_app.h"

struct nfp_mask_id_table {};

struct nfp_fl_flow_table_cmp_arg {};

struct nfp_fl_stats_ctx_to_flow {};

static const struct rhashtable_params stats_ctx_table_params =;

static int nfp_release_stats_entry(struct nfp_app *app, u32 stats_context_id)
{}

static int nfp_get_stats_entry(struct nfp_app *app, u32 *stats_context_id)
{}

/* Must be called with either RTNL or rcu_read_lock */
struct nfp_fl_payload *
nfp_flower_search_fl_table(struct nfp_app *app, unsigned long tc_flower_cookie,
			   struct net_device *netdev)
{}

void nfp_flower_rx_flow_stats(struct nfp_app *app, struct sk_buff *skb)
{}

static int nfp_release_mask_id(struct nfp_app *app, u8 mask_id)
{}

static int nfp_mask_alloc(struct nfp_app *app, u8 *mask_id)
{}

static int
nfp_add_mask_table(struct nfp_app *app, char *mask_data, u32 mask_len)
{}

static struct nfp_mask_id_table *
nfp_search_mask_table(struct nfp_app *app, char *mask_data, u32 mask_len)
{}

static int
nfp_find_in_mask_table(struct nfp_app *app, char *mask_data, u32 mask_len)
{}

static bool
nfp_check_mask_add(struct nfp_app *app, char *mask_data, u32 mask_len,
		   u8 *meta_flags, u8 *mask_id)
{}

static bool
nfp_check_mask_remove(struct nfp_app *app, char *mask_data, u32 mask_len,
		      u8 *meta_flags, u8 *mask_id)
{}

int nfp_compile_flow_metadata(struct nfp_app *app, u32 cookie,
			      struct nfp_fl_payload *nfp_flow,
			      struct net_device *netdev,
			      struct netlink_ext_ack *extack)
{}

void __nfp_modify_flow_metadata(struct nfp_flower_priv *priv,
				struct nfp_fl_payload *nfp_flow)
{}

int nfp_modify_flow_metadata(struct nfp_app *app,
			     struct nfp_fl_payload *nfp_flow)
{}

struct nfp_fl_payload *
nfp_flower_get_fl_payload_from_ctx(struct nfp_app *app, u32 ctx_id)
{}

static int nfp_fl_obj_cmpfn(struct rhashtable_compare_arg *arg,
			    const void *obj)
{}

static u32 nfp_fl_obj_hashfn(const void *data, u32 len, u32 seed)
{}

static u32 nfp_fl_key_hashfn(const void *data, u32 len, u32 seed)
{}

const struct rhashtable_params nfp_flower_table_params =;

const struct rhashtable_params merge_table_params =;

const struct rhashtable_params nfp_zone_table_params =;

const struct rhashtable_params nfp_ct_map_params =;

const struct rhashtable_params neigh_table_params =;

int nfp_flower_metadata_init(struct nfp_app *app, u64 host_ctx_count,
			     unsigned int host_num_mems)
{}

static void nfp_zone_table_entry_destroy(struct nfp_fl_ct_zone_entry *zt)
{}

static void nfp_free_zone_table_entry(void *ptr, void *arg)
{}

static void nfp_free_map_table_entry(void *ptr, void *arg)
{}

void nfp_flower_metadata_cleanup(struct nfp_app *app)
{}