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

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

#include "main.h"

/* LAG group config flags. */
#define NFP_FL_LAG_LAST
#define NFP_FL_LAG_FIRST
#define NFP_FL_LAG_DATA
#define NFP_FL_LAG_XON
#define NFP_FL_LAG_SYNC
#define NFP_FL_LAG_SWITCH
#define NFP_FL_LAG_RESET

/* LAG port state flags. */
#define NFP_PORT_LAG_LINK_UP
#define NFP_PORT_LAG_TX_ENABLED
#define NFP_PORT_LAG_CHANGED

enum nfp_fl_lag_batch {};

/**
 * struct nfp_flower_cmsg_lag_config - control message payload for LAG config
 * @ctrl_flags:	Configuration flags
 * @reserved:	Reserved for future use
 * @ttl:	Time to live of packet - host always sets to 0xff
 * @pkt_number:	Config message packet number - increment for each message
 * @batch_ver:	Batch version of messages - increment for each batch of messages
 * @group_id:	Group ID applicable
 * @group_inst:	Group instance number - increment when group is reused
 * @members:	Array of 32-bit words listing all active group members
 */
struct nfp_flower_cmsg_lag_config {};

/**
 * struct nfp_fl_lag_group - list entry for each LAG group
 * @group_id:		Assigned group ID for host/kernel sync
 * @group_inst:		Group instance in case of ID reuse
 * @list:		List entry
 * @master_ndev:	Group master Netdev
 * @dirty:		Marked if the group needs synced to HW
 * @offloaded:		Marked if the group is currently offloaded to NIC
 * @to_remove:		Marked if the group should be removed from NIC
 * @to_destroy:		Marked if the group should be removed from driver
 * @slave_cnt:		Number of slaves in group
 */
struct nfp_fl_lag_group {};

#define NFP_FL_LAG_PKT_NUMBER_MASK
#define NFP_FL_LAG_VERSION_MASK
#define NFP_FL_LAG_HOST_TTL

/* Use this ID with zero members to ack a batch config */
#define NFP_FL_LAG_SYNC_ID
#define NFP_FL_LAG_GROUP_MIN
#define NFP_FL_LAG_GROUP_MAX

/* wait for more config */
#define NFP_FL_LAG_DELAY

#define NFP_FL_LAG_RETRANS_LIMIT

static unsigned int nfp_fl_get_next_pkt_number(struct nfp_fl_lag *lag)
{}

static void nfp_fl_increment_version(struct nfp_fl_lag *lag)
{}

static struct nfp_fl_lag_group *
nfp_fl_lag_group_create(struct nfp_fl_lag *lag, struct net_device *master)
{}

static struct nfp_fl_lag_group *
nfp_fl_lag_find_group_for_master_with_lag(struct nfp_fl_lag *lag,
					  struct net_device *master)
{}

static int nfp_fl_lag_get_group_info(struct nfp_app *app,
				     struct net_device *netdev,
				     __be16 *group_id,
				     u8 *batch_ver,
				     u8 *group_inst)
{}

int nfp_flower_lag_populate_pre_action(struct nfp_app *app,
				       struct net_device *master,
				       struct nfp_fl_pre_lag *pre_act,
				       struct netlink_ext_ack *extack)
{}

void nfp_flower_lag_get_info_from_netdev(struct nfp_app *app,
					 struct net_device *netdev,
					 struct nfp_tun_neigh_lag *lag)
{}

int nfp_flower_lag_get_output_id(struct nfp_app *app, struct net_device *master)
{}

static int
nfp_fl_lag_config_group(struct nfp_fl_lag *lag, struct nfp_fl_lag_group *group,
			struct net_device **active_members,
			unsigned int member_cnt, enum nfp_fl_lag_batch *batch)
{}

static void nfp_fl_lag_do_work(struct work_struct *work)
{}

static int
nfp_fl_lag_put_unprocessed(struct nfp_fl_lag *lag, struct sk_buff *skb)
{}

static void nfp_fl_send_unprocessed(struct nfp_fl_lag *lag)
{}

bool nfp_flower_lag_unprocessed_msg(struct nfp_app *app, struct sk_buff *skb)
{}

static void
nfp_fl_lag_schedule_group_remove(struct nfp_fl_lag *lag,
				 struct nfp_fl_lag_group *group)
{}

static void
nfp_fl_lag_schedule_group_delete(struct nfp_fl_lag *lag,
				 struct net_device *master)
{}

static int
nfp_fl_lag_changeupper_event(struct nfp_fl_lag *lag,
			     struct netdev_notifier_changeupper_info *info)
{}

static void
nfp_fl_lag_changels_event(struct nfp_fl_lag *lag, struct net_device *netdev,
			  struct netdev_notifier_changelowerstate_info *info)
{}

int nfp_flower_lag_netdev_event(struct nfp_flower_priv *priv,
				struct net_device *netdev,
				unsigned long event, void *ptr)
{}

int nfp_flower_lag_reset(struct nfp_fl_lag *lag)
{}

void nfp_flower_lag_init(struct nfp_fl_lag *lag)
{}

void nfp_flower_lag_cleanup(struct nfp_fl_lag *lag)
{}