| 
									
										
										
										
											2008-11-20 20:52:10 -08:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2008, Intel Corporation. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software; you can redistribute it and/or modify it | 
					
						
							|  |  |  |  * under the terms and conditions of the GNU General Public License, | 
					
						
							|  |  |  |  * version 2, as published by the Free Software Foundation. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is distributed in the hope it will be useful, but WITHOUT | 
					
						
							|  |  |  |  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 
					
						
							|  |  |  |  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for | 
					
						
							|  |  |  |  * more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU General Public License along with | 
					
						
							| 
									
										
										
										
											2013-12-06 09:13:40 -08:00
										 |  |  |  * this program; if not, see <http://www.gnu.org/licenses/>.
 | 
					
						
							| 
									
										
										
										
											2008-11-20 20:52:10 -08:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Author: Lucy Liu <lucy.liu@intel.com> | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef __NET_DCBNL_H__
 | 
					
						
							|  |  |  | #define __NET_DCBNL_H__
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-30 09:25:46 +00:00
										 |  |  | #include <linux/dcbnl.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-30 09:26:31 +00:00
										 |  |  | struct dcb_app_type { | 
					
						
							| 
									
										
										
										
											2011-10-06 08:52:33 +00:00
										 |  |  | 	int	ifindex; | 
					
						
							| 
									
										
										
										
											2010-12-30 09:26:31 +00:00
										 |  |  | 	struct dcb_app	  app; | 
					
						
							|  |  |  | 	struct list_head  list; | 
					
						
							| 
									
										
										
										
											2011-10-06 08:52:38 +00:00
										 |  |  | 	u8	dcbx; | 
					
						
							| 
									
										
										
										
											2010-12-30 09:26:31 +00:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-21 07:34:58 +00:00
										 |  |  | int dcb_setapp(struct net_device *, struct dcb_app *); | 
					
						
							| 
									
										
										
										
											2010-12-30 09:26:31 +00:00
										 |  |  | u8 dcb_getapp(struct net_device *, struct dcb_app *); | 
					
						
							| 
									
										
										
										
											2011-06-21 07:34:42 +00:00
										 |  |  | int dcb_ieee_setapp(struct net_device *, struct dcb_app *); | 
					
						
							| 
									
										
										
										
											2011-06-21 07:34:48 +00:00
										 |  |  | int dcb_ieee_delapp(struct net_device *, struct dcb_app *); | 
					
						
							| 
									
										
										
										
											2011-06-21 07:34:53 +00:00
										 |  |  | u8 dcb_ieee_getapp_mask(struct net_device *, struct dcb_app *); | 
					
						
							| 
									
										
										
										
											2010-12-30 09:26:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-05 06:16:25 +00:00
										 |  |  | int dcbnl_ieee_notify(struct net_device *dev, int event, int cmd, | 
					
						
							|  |  |  | 		      u32 seq, u32 pid); | 
					
						
							|  |  |  | int dcbnl_cee_notify(struct net_device *dev, int event, int cmd, | 
					
						
							|  |  |  | 		     u32 seq, u32 pid); | 
					
						
							| 
									
										
										
										
											2011-06-21 07:34:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-11-20 20:52:10 -08:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Ops struct for the netlink callbacks.  Used by DCB-enabled drivers through | 
					
						
							|  |  |  |  * the netdevice struct. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | struct dcbnl_rtnl_ops { | 
					
						
							| 
									
										
										
										
											2010-12-30 09:25:46 +00:00
										 |  |  | 	/* IEEE 802.1Qaz std */ | 
					
						
							|  |  |  | 	int (*ieee_getets) (struct net_device *, struct ieee_ets *); | 
					
						
							|  |  |  | 	int (*ieee_setets) (struct net_device *, struct ieee_ets *); | 
					
						
							| 
									
										
										
										
											2012-04-04 21:33:30 +00:00
										 |  |  | 	int (*ieee_getmaxrate) (struct net_device *, struct ieee_maxrate *); | 
					
						
							|  |  |  | 	int (*ieee_setmaxrate) (struct net_device *, struct ieee_maxrate *); | 
					
						
							| 
									
										
										
										
											2010-12-30 09:25:46 +00:00
										 |  |  | 	int (*ieee_getpfc) (struct net_device *, struct ieee_pfc *); | 
					
						
							|  |  |  | 	int (*ieee_setpfc) (struct net_device *, struct ieee_pfc *); | 
					
						
							|  |  |  | 	int (*ieee_getapp) (struct net_device *, struct dcb_app *); | 
					
						
							|  |  |  | 	int (*ieee_setapp) (struct net_device *, struct dcb_app *); | 
					
						
							| 
									
										
										
										
											2011-06-21 07:34:48 +00:00
										 |  |  | 	int (*ieee_delapp) (struct net_device *, struct dcb_app *); | 
					
						
							| 
									
										
										
										
											2011-02-27 05:04:31 +00:00
										 |  |  | 	int (*ieee_peer_getets) (struct net_device *, struct ieee_ets *); | 
					
						
							|  |  |  | 	int (*ieee_peer_getpfc) (struct net_device *, struct ieee_pfc *); | 
					
						
							| 
									
										
										
										
											2010-12-30 09:25:46 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* CEE std */ | 
					
						
							| 
									
										
										
										
											2008-11-20 20:52:10 -08:00
										 |  |  | 	u8   (*getstate)(struct net_device *); | 
					
						
							| 
									
										
										
										
											2008-12-21 20:09:50 -08:00
										 |  |  | 	u8   (*setstate)(struct net_device *, u8); | 
					
						
							| 
									
										
										
										
											2008-11-20 20:52:10 -08:00
										 |  |  | 	void (*getpermhwaddr)(struct net_device *, u8 *); | 
					
						
							|  |  |  | 	void (*setpgtccfgtx)(struct net_device *, int, u8, u8, u8, u8); | 
					
						
							|  |  |  | 	void (*setpgbwgcfgtx)(struct net_device *, int, u8); | 
					
						
							|  |  |  | 	void (*setpgtccfgrx)(struct net_device *, int, u8, u8, u8, u8); | 
					
						
							|  |  |  | 	void (*setpgbwgcfgrx)(struct net_device *, int, u8); | 
					
						
							|  |  |  | 	void (*getpgtccfgtx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *); | 
					
						
							|  |  |  | 	void (*getpgbwgcfgtx)(struct net_device *, int, u8 *); | 
					
						
							|  |  |  | 	void (*getpgtccfgrx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *); | 
					
						
							|  |  |  | 	void (*getpgbwgcfgrx)(struct net_device *, int, u8 *); | 
					
						
							|  |  |  | 	void (*setpfccfg)(struct net_device *, int, u8); | 
					
						
							|  |  |  | 	void (*getpfccfg)(struct net_device *, int, u8 *); | 
					
						
							|  |  |  | 	u8   (*setall)(struct net_device *); | 
					
						
							| 
									
										
										
										
											2008-11-20 21:05:08 -08:00
										 |  |  | 	u8   (*getcap)(struct net_device *, int, u8 *); | 
					
						
							| 
									
										
										
										
											2012-02-10 03:19:41 +00:00
										 |  |  | 	int  (*getnumtcs)(struct net_device *, int, u8 *); | 
					
						
							|  |  |  | 	int  (*setnumtcs)(struct net_device *, int, u8); | 
					
						
							| 
									
										
										
										
											2008-11-20 21:09:23 -08:00
										 |  |  | 	u8   (*getpfcstate)(struct net_device *); | 
					
						
							|  |  |  | 	void (*setpfcstate)(struct net_device *, u8); | 
					
						
							| 
									
										
										
										
											2008-11-20 21:10:23 -08:00
										 |  |  | 	void (*getbcncfg)(struct net_device *, int, u32 *); | 
					
						
							|  |  |  | 	void (*setbcncfg)(struct net_device *, int, u32); | 
					
						
							|  |  |  | 	void (*getbcnrp)(struct net_device *, int, u8 *); | 
					
						
							|  |  |  | 	void (*setbcnrp)(struct net_device *, int, u8); | 
					
						
							| 
									
										
										
										
											2014-07-16 22:32:39 -07:00
										 |  |  | 	int  (*setapp)(struct net_device *, u8, u16, u8); | 
					
						
							|  |  |  | 	int  (*getapp)(struct net_device *, u8, u16); | 
					
						
							| 
									
										
										
										
											2010-12-30 06:26:55 +00:00
										 |  |  | 	u8   (*getfeatcfg)(struct net_device *, int, u8 *); | 
					
						
							|  |  |  | 	u8   (*setfeatcfg)(struct net_device *, int, u8); | 
					
						
							| 
									
										
										
										
											2010-12-30 06:26:48 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* DCBX configuration */ | 
					
						
							|  |  |  | 	u8   (*getdcbx)(struct net_device *); | 
					
						
							|  |  |  | 	u8   (*setdcbx)(struct net_device *, u8); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 05:04:31 +00:00
										 |  |  | 	/* peer apps */ | 
					
						
							|  |  |  | 	int (*peer_getappinfo)(struct net_device *, struct dcb_peer_app_info *, | 
					
						
							|  |  |  | 			       u16 *); | 
					
						
							|  |  |  | 	int (*peer_getapptable)(struct net_device *, struct dcb_app *); | 
					
						
							| 
									
										
										
										
											2010-12-30 06:26:55 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-27 05:04:38 +00:00
										 |  |  | 	/* CEE peer */ | 
					
						
							|  |  |  | 	int (*cee_peer_getpg) (struct net_device *, struct cee_pg *); | 
					
						
							|  |  |  | 	int (*cee_peer_getpfc) (struct net_device *, struct cee_pfc *); | 
					
						
							| 
									
										
										
										
											2008-11-20 20:52:10 -08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* __NET_DCBNL_H__ */
 |