linux/include/net/bond_alb.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved.
 */

#ifndef _NET_BOND_ALB_H
#define _NET_BOND_ALB_H

#include <linux/if_ether.h>

struct bonding;
struct slave;

#define BOND_ALB_INFO(bond)
#define SLAVE_TLB_INFO(slave)

#define ALB_TIMER_TICKS_PER_SEC
#define BOND_TLB_REBALANCE_INTERVAL
#define BOND_ALB_DEFAULT_LP_INTERVAL
#define BOND_ALB_LP_INTERVAL(bond)

#define BOND_TLB_REBALANCE_TICKS

#define BOND_ALB_LP_TICKS(bond)

#define TLB_HASH_TABLE_SIZE


#define TLB_NULL_INDEX

/* rlb defs */
#define RLB_HASH_TABLE_SIZE
#define RLB_NULL_INDEX
#define RLB_UPDATE_DELAY
#define RLB_ARP_BURST_SIZE
#define RLB_UPDATE_RETRY
/* RLB_PROMISC_TIMEOUT = 10 sec equals the time that the current slave is
 * promiscuous after failover
 */
#define RLB_PROMISC_TIMEOUT


struct tlb_client_info {};

/* -------------------------------------------------------------------------
 * struct rlb_client_info contains all info related to a specific rx client
 * connection. This is the Clients Hash Table entry struct.
 * Note that this is not a proper hash table; if a new client's IP address
 * hash collides with an existing client entry, the old entry is replaced.
 *
 * There is a linked list (linked by the used_next and used_prev members)
 * linking all the used entries of the hash table. This allows updating
 * all the clients without walking over all the unused elements of the table.
 *
 * There are also linked lists of entries with identical hash(ip_src). These
 * allow cleaning up the table from ip_src<->mac_src associations that have
 * become outdated and would cause sending out invalid ARP updates to the
 * network. These are linked by the (src_next and src_prev members).
 * -------------------------------------------------------------------------
 */
struct rlb_client_info {};

struct tlb_slave_info {};

struct alb_bond_info {};

int bond_alb_initialize(struct bonding *bond, int rlb_enabled);
void bond_alb_deinitialize(struct bonding *bond);
int bond_alb_init_slave(struct bonding *bond, struct slave *slave);
void bond_alb_deinit_slave(struct bonding *bond, struct slave *slave);
void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char link);
void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave);
netdev_tx_t bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev);
netdev_tx_t bond_tlb_xmit(struct sk_buff *skb, struct net_device *bond_dev);
struct slave *bond_xmit_alb_slave_get(struct bonding *bond,
				      struct sk_buff *skb);
struct slave *bond_xmit_tlb_slave_get(struct bonding *bond,
				      struct sk_buff *skb);
void bond_alb_monitor(struct work_struct *);
int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr);
void bond_alb_clear_vlan(struct bonding *bond, unsigned short vlan_id);
#endif /* _NET_BOND_ALB_H */