mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
817741a8ea
In case hardware sends more device-to-bridge-address-change notfications than the qeth-l2 driver can handle, the hardware will send an overflow event and then stop sending any events. It expects software to flush its FDB and start over again. Re-enabling address-change-notification will report all current addresses. In order to re-enable address-change-notification this patch defines the functions qeth_l2_dev2br_an_set() and qeth_l2_dev2br_an_set_cb to enable or disable dev-to-bridge-address-notification. A following patch will use the learning_sync bridgeport flag to trigger enabling or disabling of address-change-notification, so we define priv->brport_features to store the current setting. BRIDGE_INFO and ADDR_INFO functionality are mutually exclusive, whereas ADDR_INFO and qeth_l2_vnicc* can be used together. Alternative implementations to handle buffer overflow: Just re-enabling notification and adding all newly reported addresses would cover any lost 'add' events, but not the lost 'delete' events. Then these invalid addresses would stay in the bridge FDB as long as the device exists. Setting the net device down and up, would be an alternative, but is a bit drastic. If the net device has many secondary addresses this will create many delete/add events at its peers which could de-stabilize the network segment. Signed-off-by: Alexandra Winter <wintera@linux.ibm.com> Reviewed-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright IBM Corp. 2013
|
|
* Author(s): Eugene Crosser <eugene.crosser@ru.ibm.com>
|
|
*/
|
|
|
|
#ifndef __QETH_L2_H__
|
|
#define __QETH_L2_H__
|
|
|
|
#include "qeth_core.h"
|
|
|
|
extern const struct attribute_group *qeth_l2_attr_groups[];
|
|
|
|
int qeth_l2_create_device_attributes(struct device *);
|
|
void qeth_l2_remove_device_attributes(struct device *);
|
|
int qeth_bridgeport_query_ports(struct qeth_card *card,
|
|
enum qeth_sbp_roles *role,
|
|
enum qeth_sbp_states *state);
|
|
int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role);
|
|
int qeth_bridgeport_an_set(struct qeth_card *card, int enable);
|
|
|
|
int qeth_l2_vnicc_set_state(struct qeth_card *card, u32 vnicc, bool state);
|
|
int qeth_l2_vnicc_get_state(struct qeth_card *card, u32 vnicc, bool *state);
|
|
int qeth_l2_vnicc_set_timeout(struct qeth_card *card, u32 timeout);
|
|
int qeth_l2_vnicc_get_timeout(struct qeth_card *card, u32 *timeout);
|
|
bool qeth_bridgeport_allowed(struct qeth_card *card);
|
|
|
|
struct qeth_mac {
|
|
u8 mac_addr[ETH_ALEN];
|
|
u8 disp_flag:2;
|
|
struct hlist_node hnode;
|
|
};
|
|
|
|
#endif /* __QETH_L2_H__ */
|