linux/drivers/net/ethernet/mellanox/mlxsw/spectrum_flow.c

// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/* Copyright (c) 2017-2020 Mellanox Technologies. All rights reserved */

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <net/net_namespace.h>

#include "spectrum.h"

struct mlxsw_sp_flow_block *
mlxsw_sp_flow_block_create(struct mlxsw_sp *mlxsw_sp, struct net *net)
{}

void mlxsw_sp_flow_block_destroy(struct mlxsw_sp_flow_block *block)
{}

static struct mlxsw_sp_flow_block_binding *
mlxsw_sp_flow_block_lookup(struct mlxsw_sp_flow_block *block,
			   struct mlxsw_sp_port *mlxsw_sp_port, bool ingress)
{}

static bool
mlxsw_sp_flow_block_ruleset_bound(const struct mlxsw_sp_flow_block *block)
{}

static int mlxsw_sp_flow_block_bind(struct mlxsw_sp *mlxsw_sp,
				    struct mlxsw_sp_flow_block *block,
				    struct mlxsw_sp_port *mlxsw_sp_port,
				    bool ingress,
				    struct netlink_ext_ack *extack)
{}

static int mlxsw_sp_flow_block_unbind(struct mlxsw_sp *mlxsw_sp,
				      struct mlxsw_sp_flow_block *block,
				      struct mlxsw_sp_port *mlxsw_sp_port,
				      bool ingress)
{}

static int mlxsw_sp_flow_block_mall_cb(struct mlxsw_sp_flow_block *flow_block,
				       struct tc_cls_matchall_offload *f)
{}

static int mlxsw_sp_flow_block_flower_cb(struct mlxsw_sp_flow_block *flow_block,
					 struct flow_cls_offload *f)
{}

static int mlxsw_sp_flow_block_cb(enum tc_setup_type type,
				  void *type_data, void *cb_priv)
{}

static void mlxsw_sp_tc_block_release(void *cb_priv)
{}

static LIST_HEAD(mlxsw_sp_block_cb_list);

static int mlxsw_sp_setup_tc_block_bind(struct mlxsw_sp_port *mlxsw_sp_port,
					struct flow_block_offload *f,
					bool ingress)
{}

static void mlxsw_sp_setup_tc_block_unbind(struct mlxsw_sp_port *mlxsw_sp_port,
					   struct flow_block_offload *f,
					   bool ingress)
{}

int mlxsw_sp_setup_tc_block_clsact(struct mlxsw_sp_port *mlxsw_sp_port,
				   struct flow_block_offload *f,
				   bool ingress)
{}