Blame view

include/net/dcbnl.h 4.22 KB
9952f6918   Thomas Gleixner   treewide: Replace...
1
  /* SPDX-License-Identifier: GPL-2.0-only */
2f90b8657   Alexander Duyck   ixgbe: this patch...
2
3
4
  /*
   * Copyright (c) 2008, Intel Corporation.
   *
2f90b8657   Alexander Duyck   ixgbe: this patch...
5
6
7
8
9
   * Author: Lucy Liu <lucy.liu@intel.com>
   */
  
  #ifndef __NET_DCBNL_H__
  #define __NET_DCBNL_H__
3e29027af   John Fastabend   dcbnl: add suppor...
10
  #include <linux/dcbnl.h>
9ab933ab2   John Fastabend   dcbnl: add applic...
11
  struct dcb_app_type {
e290ed813   Mark Rustad   dcb: Use ifindex ...
12
  	int	ifindex;
9ab933ab2   John Fastabend   dcbnl: add applic...
13
14
  	struct dcb_app	  app;
  	struct list_head  list;
6bd0e1cb1   John Fastabend   dcb: add DCBX mod...
15
  	u8	dcbx;
9ab933ab2   John Fastabend   dcbnl: add applic...
16
  };
ab6baf980   John Fastabend   dcb: fix return t...
17
  int dcb_setapp(struct net_device *, struct dcb_app *);
9ab933ab2   John Fastabend   dcbnl: add applic...
18
  u8 dcb_getapp(struct net_device *, struct dcb_app *);
b6db2174c   John Fastabend   dcb: Add ieee_dcb...
19
  int dcb_ieee_setapp(struct net_device *, struct dcb_app *);
f9ae7e4b5   John Fastabend   dcb: Add ieee_dcb...
20
  int dcb_ieee_delapp(struct net_device *, struct dcb_app *);
a364c8cf8   John Fastabend   dcb: Add dcb_ieee...
21
  u8 dcb_ieee_getapp_mask(struct net_device *, struct dcb_app *);
9ab933ab2   John Fastabend   dcbnl: add applic...
22

b67c540b8   Petr Machata   net: dcb: Add pri...
23
24
25
26
27
28
29
30
31
32
33
34
  struct dcb_ieee_app_prio_map {
  	u64 map[IEEE_8021QAZ_MAX_TCS];
  };
  void dcb_ieee_getapp_prio_dscp_mask_map(const struct net_device *dev,
  					struct dcb_ieee_app_prio_map *p_map);
  
  struct dcb_ieee_app_dscp_map {
  	u8 map[64];
  };
  void dcb_ieee_getapp_dscp_prio_mask_map(const struct net_device *dev,
  					struct dcb_ieee_app_dscp_map *p_map);
  u8 dcb_ieee_getapp_default_prio_mask(const struct net_device *dev);
5b7f76267   Shmulik Ravid   dcbnl: Add CEE no...
35
36
37
38
  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);
314b4778e   John Fastabend   net: dcbnl, add m...
39

2f90b8657   Alexander Duyck   ixgbe: this patch...
40
41
42
43
44
  /*
   * Ops struct for the netlink callbacks.  Used by DCB-enabled drivers through
   * the netdevice struct.
   */
  struct dcbnl_rtnl_ops {
3e29027af   John Fastabend   dcbnl: add suppor...
45
46
47
  	/* IEEE 802.1Qaz std */
  	int (*ieee_getets) (struct net_device *, struct ieee_ets *);
  	int (*ieee_setets) (struct net_device *, struct ieee_ets *);
08f10affe   Amir Vadai   net/dcb: Add an o...
48
49
  	int (*ieee_getmaxrate) (struct net_device *, struct ieee_maxrate *);
  	int (*ieee_setmaxrate) (struct net_device *, struct ieee_maxrate *);
c93682477   Shani Michaeli   net/dcb: Add IEEE...
50
51
52
  	int (*ieee_getqcn) (struct net_device *, struct ieee_qcn *);
  	int (*ieee_setqcn) (struct net_device *, struct ieee_qcn *);
  	int (*ieee_getqcnstats) (struct net_device *, struct ieee_qcn_stats *);
3e29027af   John Fastabend   dcbnl: add suppor...
53
54
55
56
  	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 *);
f9ae7e4b5   John Fastabend   dcb: Add ieee_dcb...
57
  	int (*ieee_delapp) (struct net_device *, struct dcb_app *);
eed84713b   Shmulik Ravid   dcbnl: add suppor...
58
59
  	int (*ieee_peer_getets) (struct net_device *, struct ieee_ets *);
  	int (*ieee_peer_getpfc) (struct net_device *, struct ieee_pfc *);
3e29027af   John Fastabend   dcbnl: add suppor...
60
61
  
  	/* CEE std */
2f90b8657   Alexander Duyck   ixgbe: this patch...
62
  	u8   (*getstate)(struct net_device *);
1486a61eb   Don Skidmore   net: fix DCB sets...
63
  	u8   (*setstate)(struct net_device *, u8);
2f90b8657   Alexander Duyck   ixgbe: this patch...
64
65
66
67
68
69
70
71
72
73
74
75
  	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 *);
46132188b   Alexander Duyck   DCB: Add interfac...
76
  	u8   (*getcap)(struct net_device *, int, u8 *);
2b88f2de3   John Fastabend   net: dcb: getnumt...
77
78
  	int  (*getnumtcs)(struct net_device *, int, u8 *);
  	int  (*setnumtcs)(struct net_device *, int, u8);
0eb3aa9ba   Alexander Duyck   DCB: Add interfac...
79
80
  	u8   (*getpfcstate)(struct net_device *);
  	void (*setpfcstate)(struct net_device *, u8);
859ee3c43   Alexander Duyck   DCB: Add support ...
81
82
83
84
  	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);
c2659479f   Anish Bhatt   Update setapp/get...
85
86
  	int  (*setapp)(struct net_device *, u8, u16, u8);
  	int  (*getapp)(struct net_device *, u8, u16);
ea45fe4e1   Shmulik Ravid   dcbnl: adding DCB...
87
88
  	u8   (*getfeatcfg)(struct net_device *, int, u8 *);
  	u8   (*setfeatcfg)(struct net_device *, int, u8);
6241b6259   Shmulik Ravid   dcbnl: adding DCB...
89
90
91
92
  
  	/* DCBX configuration */
  	u8   (*getdcbx)(struct net_device *);
  	u8   (*setdcbx)(struct net_device *, u8);
eed84713b   Shmulik Ravid   dcbnl: add suppor...
93
94
95
96
  	/* peer apps */
  	int (*peer_getappinfo)(struct net_device *, struct dcb_peer_app_info *,
  			       u16 *);
  	int (*peer_getapptable)(struct net_device *, struct dcb_app *);
ea45fe4e1   Shmulik Ravid   dcbnl: adding DCB...
97

dc6ed1df5   Shmulik Ravid   dcbnl: add suppor...
98
99
100
  	/* CEE peer */
  	int (*cee_peer_getpg) (struct net_device *, struct cee_pg *);
  	int (*cee_peer_getpfc) (struct net_device *, struct cee_pfc *);
e549f6f9c   Huy Nguyen   net/dcb: Add dcbn...
101
102
103
104
  
  	/* buffer settings */
  	int (*dcbnl_getbuffer)(struct net_device *, struct dcbnl_buffer *);
  	int (*dcbnl_setbuffer)(struct net_device *, struct dcbnl_buffer *);
2f90b8657   Alexander Duyck   ixgbe: this patch...
105
106
107
  };
  
  #endif /* __NET_DCBNL_H__ */