349d13d5ab
HiperSockets allow configuring so called VNIC Characteristics (VNICC) that influence how the underlying hardware handles packets. For VNICCs, additional commands for getting and setting timeouts are available. Currently, the learning VNICC uses these commands. * Learning VNICC: If learning is enabled on a qeth device, the device learns the source MAC addresses of outgoing packets and incoming packets to those learned MAC addresses are received. For learning, the timeout specifies the idle period in seconds, after which the underlying hardware removes a learned MAC address again. This patch adds support for the IPA commands that are required to get and set the current timeout values for the learning VNIC characteristic. Also, it introduces the sysfs interface that allows users to configure the timeout. Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com> Reviewed-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
31 lines
880 B
C
31 lines
880 B
C
/*
|
|
* 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 *);
|
|
void qeth_l2_setup_bridgeport_attrs(struct qeth_card *card);
|
|
|
|
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_l2_vnicc_is_in_use(struct qeth_card *card);
|
|
|
|
struct qeth_mac {
|
|
u8 mac_addr[OSA_ADDR_LEN];
|
|
u8 is_uc:1;
|
|
u8 disp_flag:2;
|
|
struct hlist_node hnode;
|
|
};
|
|
|
|
#endif /* __QETH_L2_H__ */
|