linux/drivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/* Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */

#include <linux/mlx5/fs.h>
#include "en/mapping.h"
#include "en/tc/int_port.h"
#include "en.h"
#include "en_rep.h"
#include "en_tc.h"

struct mlx5e_tc_int_port {};

struct mlx5e_tc_int_port_priv {};

bool mlx5e_tc_int_port_supported(const struct mlx5_eswitch *esw)
{}

u32 mlx5e_tc_int_port_get_metadata(struct mlx5e_tc_int_port *int_port)
{}

int mlx5e_tc_int_port_get_flow_source(struct mlx5e_tc_int_port *int_port)
{}

u32 mlx5e_tc_int_port_get_metadata_for_match(struct mlx5e_tc_int_port *int_port)
{}

static struct mlx5_flow_handle *
mlx5e_int_port_create_rx_rule(struct mlx5_eswitch *esw,
			      struct mlx5e_tc_int_port *int_port,
			      struct mlx5_flow_destination *dest)

{}

static struct mlx5e_tc_int_port *
mlx5e_int_port_lookup(struct mlx5e_tc_int_port_priv *priv,
		      int ifindex,
		      enum mlx5e_tc_int_port_type type)
{}

static int mlx5e_int_port_metadata_alloc(struct mlx5e_tc_int_port_priv *priv,
					 int ifindex, enum mlx5e_tc_int_port_type type,
					 u32 *id)
{}

static void mlx5e_int_port_metadata_free(struct mlx5e_tc_int_port_priv *priv,
					 u32 id)
{}

/* Must be called with priv->int_ports_lock held */
static struct mlx5e_tc_int_port *
mlx5e_int_port_add(struct mlx5e_tc_int_port_priv *priv,
		   int ifindex,
		   enum mlx5e_tc_int_port_type type)
{}

/* Must be called with priv->int_ports_lock held */
static void
mlx5e_int_port_remove(struct mlx5e_tc_int_port_priv *priv,
		      struct mlx5e_tc_int_port *int_port)
{}

/* Must be called with rcu_read_lock held */
static struct mlx5e_tc_int_port *
mlx5e_int_port_get_from_metadata(struct mlx5e_tc_int_port_priv *priv,
				 u32 metadata)
{}

struct mlx5e_tc_int_port *
mlx5e_tc_int_port_get(struct mlx5e_tc_int_port_priv *priv,
		      int ifindex,
		      enum mlx5e_tc_int_port_type type)
{}

void
mlx5e_tc_int_port_put(struct mlx5e_tc_int_port_priv *priv,
		      struct mlx5e_tc_int_port *int_port)
{}

struct mlx5e_tc_int_port_priv *
mlx5e_tc_int_port_init(struct mlx5e_priv *priv)
{}

void
mlx5e_tc_int_port_cleanup(struct mlx5e_tc_int_port_priv *priv)
{}

/* Int port rx rules reside in ul rep rx tables.
 * It is possible the ul rep will go down while there are
 * still int port rules in its rx table so proper cleanup
 * is required to free resources.
 */
void mlx5e_tc_int_port_init_rep_rx(struct mlx5e_priv *priv)
{}

void mlx5e_tc_int_port_cleanup_rep_rx(struct mlx5e_priv *priv)
{}

bool
mlx5e_tc_int_port_dev_fwd(struct mlx5e_tc_int_port_priv *priv,
			  struct sk_buff *skb, u32 int_vport_metadata,
			  bool *forward_tx)
{}