mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 17:55:10 +07:00
e2be04c7f9
Many user space API headers have licensing information, which is either incomplete, badly formatted or just a shorthand for referring to the license under which the file is supposed to be. This makes it hard for compliance tools to determine the correct license. Update these files with an SPDX license identifier. The identifier was chosen based on the license information in the file. GPL/LGPL licensed headers get the matching GPL/LGPL SPDX license identifier with the added 'WITH Linux-syscall-note' exception, which is the officially assigned exception identifier for the kernel syscall exception: NOTE! This copyright does *not* cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does *not* fall under the heading of "derived work". This exception makes it possible to include GPL headers into non GPL code, without confusing license compliance tools. Headers which have either explicit dual licensing or are just licensed under a non GPL license are updated with the corresponding SPDX identifier and the GPLv2 with syscall exception identifier. The format is: ((GPL-2.0 WITH Linux-syscall-note) OR SPDX-ID-OF-OTHER-LICENSE) SPDX license identifiers are a legally binding shorthand, which can be used instead of the full boiler plate text. The update does not remove existing license information as this has to be done on a case by case basis and the copyright holders might have to be consulted. This will happen in a separate step. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. See the previous patch in this series for the methodology of how this patch was researched. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
132 lines
4.2 KiB
C
132 lines
4.2 KiB
C
/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
|
|
/*
|
|
* Bond several ethernet interfaces into a Cisco, running 'Etherchannel'.
|
|
*
|
|
*
|
|
* Portions are (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
|
|
* NCM: Network and Communications Management, Inc.
|
|
*
|
|
* BUT, I'm the one who modified it for ethernet, so:
|
|
* (c) Copyright 1999, Thomas Davis, tadavis@lbl.gov
|
|
*
|
|
* This software may be used and distributed according to the terms
|
|
* of the GNU Public License, incorporated herein by reference.
|
|
*
|
|
* 2003/03/18 - Amir Noam <amir.noam at intel dot com>
|
|
* - Added support for getting slave's speed and duplex via ethtool.
|
|
* Needed for 802.3ad and other future modes.
|
|
*
|
|
* 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and
|
|
* Shmulik Hen <shmulik.hen at intel dot com>
|
|
* - Enable support of modes that need to use the unique mac address of
|
|
* each slave.
|
|
*
|
|
* 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and
|
|
* Amir Noam <amir.noam at intel dot com>
|
|
* - Moved driver's private data types to bonding.h
|
|
*
|
|
* 2003/03/18 - Amir Noam <amir.noam at intel dot com>,
|
|
* Tsippy Mendelson <tsippy.mendelson at intel dot com> and
|
|
* Shmulik Hen <shmulik.hen at intel dot com>
|
|
* - Added support for IEEE 802.3ad Dynamic link aggregation mode.
|
|
*
|
|
* 2003/05/01 - Amir Noam <amir.noam at intel dot com>
|
|
* - Added ABI version control to restore compatibility between
|
|
* new/old ifenslave and new/old bonding.
|
|
*
|
|
* 2003/12/01 - Shmulik Hen <shmulik.hen at intel dot com>
|
|
* - Code cleanup and style changes
|
|
*
|
|
* 2005/05/05 - Jason Gabler <jygabler at lbl dot gov>
|
|
* - added definitions for various XOR hashing policies
|
|
*/
|
|
|
|
#ifndef _LINUX_IF_BONDING_H
|
|
#define _LINUX_IF_BONDING_H
|
|
|
|
#include <linux/if.h>
|
|
#include <linux/types.h>
|
|
#include <linux/if_ether.h>
|
|
|
|
/* userland - kernel ABI version (2003/05/08) */
|
|
#define BOND_ABI_VERSION 2
|
|
|
|
/*
|
|
* We can remove these ioctl definitions in 2.5. People should use the
|
|
* SIOC*** versions of them instead
|
|
*/
|
|
#define BOND_ENSLAVE_OLD (SIOCDEVPRIVATE)
|
|
#define BOND_RELEASE_OLD (SIOCDEVPRIVATE + 1)
|
|
#define BOND_SETHWADDR_OLD (SIOCDEVPRIVATE + 2)
|
|
#define BOND_SLAVE_INFO_QUERY_OLD (SIOCDEVPRIVATE + 11)
|
|
#define BOND_INFO_QUERY_OLD (SIOCDEVPRIVATE + 12)
|
|
#define BOND_CHANGE_ACTIVE_OLD (SIOCDEVPRIVATE + 13)
|
|
|
|
#define BOND_CHECK_MII_STATUS (SIOCGMIIPHY)
|
|
|
|
#define BOND_MODE_ROUNDROBIN 0
|
|
#define BOND_MODE_ACTIVEBACKUP 1
|
|
#define BOND_MODE_XOR 2
|
|
#define BOND_MODE_BROADCAST 3
|
|
#define BOND_MODE_8023AD 4
|
|
#define BOND_MODE_TLB 5
|
|
#define BOND_MODE_ALB 6 /* TLB + RLB (receive load balancing) */
|
|
|
|
/* each slave's link has 4 states */
|
|
#define BOND_LINK_UP 0 /* link is up and running */
|
|
#define BOND_LINK_FAIL 1 /* link has just gone down */
|
|
#define BOND_LINK_DOWN 2 /* link has been down for too long time */
|
|
#define BOND_LINK_BACK 3 /* link is going back */
|
|
|
|
/* each slave has several states */
|
|
#define BOND_STATE_ACTIVE 0 /* link is active */
|
|
#define BOND_STATE_BACKUP 1 /* link is backup */
|
|
|
|
#define BOND_DEFAULT_MAX_BONDS 1 /* Default maximum number of devices to support */
|
|
|
|
#define BOND_DEFAULT_TX_QUEUES 16 /* Default number of tx queues per device */
|
|
|
|
#define BOND_DEFAULT_RESEND_IGMP 1 /* Default number of IGMP membership reports */
|
|
|
|
/* hashing types */
|
|
#define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */
|
|
#define BOND_XMIT_POLICY_LAYER34 1 /* layer 3+4 (IP ^ (TCP || UDP)) */
|
|
#define BOND_XMIT_POLICY_LAYER23 2 /* layer 2+3 (IP ^ MAC) */
|
|
#define BOND_XMIT_POLICY_ENCAP23 3 /* encapsulated layer 2+3 */
|
|
#define BOND_XMIT_POLICY_ENCAP34 4 /* encapsulated layer 3+4 */
|
|
|
|
typedef struct ifbond {
|
|
__s32 bond_mode;
|
|
__s32 num_slaves;
|
|
__s32 miimon;
|
|
} ifbond;
|
|
|
|
typedef struct ifslave {
|
|
__s32 slave_id; /* Used as an IN param to the BOND_SLAVE_INFO_QUERY ioctl */
|
|
char slave_name[IFNAMSIZ];
|
|
__s8 link;
|
|
__s8 state;
|
|
__u32 link_failure_count;
|
|
} ifslave;
|
|
|
|
struct ad_info {
|
|
__u16 aggregator_id;
|
|
__u16 ports;
|
|
__u16 actor_key;
|
|
__u16 partner_key;
|
|
__u8 partner_system[ETH_ALEN];
|
|
};
|
|
|
|
#endif /* _LINUX_IF_BONDING_H */
|
|
|
|
/*
|
|
* Local variables:
|
|
* version-control: t
|
|
* kept-new-versions: 5
|
|
* c-indent-level: 8
|
|
* c-basic-offset: 8
|
|
* tab-width: 8
|
|
* End:
|
|
*/
|
|
|