linux/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c

/*
 * This file is part of the Chelsio T4/T5/T6 Ethernet driver for Linux.
 *
 * Copyright (c) 2017 Chelsio Communications, Inc. All rights reserved.
 *
 * This software is available to you under a choice of one of two
 * licenses.  You may choose to be licensed under the terms of the GNU
 * General Public License (GPL) Version 2, available from the file
 * COPYING in the main directory of this source tree, or the
 * OpenIB.org BSD license below:
 *
 *     Redistribution and use in source and binary forms, with or
 *     without modification, are permitted provided that the following
 *     conditions are met:
 *
 *      - Redistributions of source code must retain the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer.
 *
 *      - Redistributions in binary form must reproduce the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer in the documentation and/or other materials
 *        provided with the distribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#include <net/tc_act/tc_mirred.h>
#include <net/tc_act/tc_pedit.h>
#include <net/tc_act/tc_gact.h>
#include <net/tc_act/tc_vlan.h>

#include "cxgb4.h"
#include "cxgb4_filter.h"
#include "cxgb4_tc_flower.h"

#define STATS_CHECK_PERIOD

static struct ch_tc_pedit_fields pedits[] =;

static const struct cxgb4_natmode_config cxgb4_natmode_config_array[] =;

static void cxgb4_action_natmode_tweak(struct ch_filter_specification *fs,
				       u8 natmode_flags)
{}

static struct ch_tc_flower_entry *allocate_flower_entry(void)
{}

/* Must be called with either RTNL or rcu_read_lock */
static struct ch_tc_flower_entry *ch_flower_lookup(struct adapter *adap,
						   unsigned long flower_cookie)
{}

static void cxgb4_process_flow_match(struct net_device *dev,
				     struct flow_rule *rule,
				     struct ch_filter_specification *fs)
{}

static int cxgb4_validate_flow_match(struct netlink_ext_ack *extack,
				     struct flow_rule *rule)
{}

static void offload_pedit(struct ch_filter_specification *fs, u32 val, u32 mask,
			  u8 field)
{}

static void process_pedit_field(struct ch_filter_specification *fs, u32 val,
				u32 mask, u32 offset, u8 htype,
				u8 *natmode_flags)
{}

static int cxgb4_action_natmode_validate(struct adapter *adap, u8 natmode_flags,
					 struct netlink_ext_ack *extack)
{}

void cxgb4_process_flow_actions(struct net_device *in,
				struct flow_action *actions,
				struct ch_filter_specification *fs)
{}

static bool valid_l4_mask(u32 mask)
{}

static bool valid_pedit_action(struct netlink_ext_ack *extack,
			       const struct flow_action_entry *act,
			       u8 *natmode_flags)
{}

int cxgb4_validate_flow_actions(struct net_device *dev,
				struct flow_action *actions,
				struct netlink_ext_ack *extack,
				u8 matchall_filter)
{}

static void cxgb4_tc_flower_hash_prio_add(struct adapter *adap, u32 tc_prio)
{}

static void cxgb4_tc_flower_hash_prio_del(struct adapter *adap, u32 tc_prio)
{}

int cxgb4_flow_rule_replace(struct net_device *dev, struct flow_rule *rule,
			    u32 tc_prio, struct netlink_ext_ack *extack,
			    struct ch_filter_specification *fs, u32 *tid)
{}

int cxgb4_tc_flower_replace(struct net_device *dev,
			    struct flow_cls_offload *cls)
{}

int cxgb4_flow_rule_destroy(struct net_device *dev, u32 tc_prio,
			    struct ch_filter_specification *fs, int tid)
{}

int cxgb4_tc_flower_destroy(struct net_device *dev,
			    struct flow_cls_offload *cls)
{}

static void ch_flower_stats_handler(struct work_struct *work)
{}

static void ch_flower_stats_cb(struct timer_list *t)
{}

int cxgb4_tc_flower_stats(struct net_device *dev,
			  struct flow_cls_offload *cls)
{}

static const struct rhashtable_params cxgb4_tc_flower_ht_params =;

int cxgb4_init_tc_flower(struct adapter *adap)
{}

void cxgb4_cleanup_tc_flower(struct adapter *adap)
{}