0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __NET_DCBNL_H__
0009 #define __NET_DCBNL_H__
0010
0011 #include <linux/dcbnl.h>
0012
0013 struct net_device;
0014
0015 struct dcb_app_type {
0016 int ifindex;
0017 struct dcb_app app;
0018 struct list_head list;
0019 u8 dcbx;
0020 };
0021
0022 int dcb_setapp(struct net_device *, struct dcb_app *);
0023 u8 dcb_getapp(struct net_device *, struct dcb_app *);
0024 int dcb_ieee_setapp(struct net_device *, struct dcb_app *);
0025 int dcb_ieee_delapp(struct net_device *, struct dcb_app *);
0026 u8 dcb_ieee_getapp_mask(struct net_device *, struct dcb_app *);
0027
0028 struct dcb_ieee_app_prio_map {
0029 u64 map[IEEE_8021QAZ_MAX_TCS];
0030 };
0031 void dcb_ieee_getapp_prio_dscp_mask_map(const struct net_device *dev,
0032 struct dcb_ieee_app_prio_map *p_map);
0033
0034 struct dcb_ieee_app_dscp_map {
0035 u8 map[64];
0036 };
0037 void dcb_ieee_getapp_dscp_prio_mask_map(const struct net_device *dev,
0038 struct dcb_ieee_app_dscp_map *p_map);
0039 u8 dcb_ieee_getapp_default_prio_mask(const struct net_device *dev);
0040
0041 int dcbnl_ieee_notify(struct net_device *dev, int event, int cmd,
0042 u32 seq, u32 pid);
0043 int dcbnl_cee_notify(struct net_device *dev, int event, int cmd,
0044 u32 seq, u32 pid);
0045
0046
0047
0048
0049
0050 struct dcbnl_rtnl_ops {
0051
0052 int (*ieee_getets) (struct net_device *, struct ieee_ets *);
0053 int (*ieee_setets) (struct net_device *, struct ieee_ets *);
0054 int (*ieee_getmaxrate) (struct net_device *, struct ieee_maxrate *);
0055 int (*ieee_setmaxrate) (struct net_device *, struct ieee_maxrate *);
0056 int (*ieee_getqcn) (struct net_device *, struct ieee_qcn *);
0057 int (*ieee_setqcn) (struct net_device *, struct ieee_qcn *);
0058 int (*ieee_getqcnstats) (struct net_device *, struct ieee_qcn_stats *);
0059 int (*ieee_getpfc) (struct net_device *, struct ieee_pfc *);
0060 int (*ieee_setpfc) (struct net_device *, struct ieee_pfc *);
0061 int (*ieee_getapp) (struct net_device *, struct dcb_app *);
0062 int (*ieee_setapp) (struct net_device *, struct dcb_app *);
0063 int (*ieee_delapp) (struct net_device *, struct dcb_app *);
0064 int (*ieee_peer_getets) (struct net_device *, struct ieee_ets *);
0065 int (*ieee_peer_getpfc) (struct net_device *, struct ieee_pfc *);
0066
0067
0068 u8 (*getstate)(struct net_device *);
0069 u8 (*setstate)(struct net_device *, u8);
0070 void (*getpermhwaddr)(struct net_device *, u8 *);
0071 void (*setpgtccfgtx)(struct net_device *, int, u8, u8, u8, u8);
0072 void (*setpgbwgcfgtx)(struct net_device *, int, u8);
0073 void (*setpgtccfgrx)(struct net_device *, int, u8, u8, u8, u8);
0074 void (*setpgbwgcfgrx)(struct net_device *, int, u8);
0075 void (*getpgtccfgtx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *);
0076 void (*getpgbwgcfgtx)(struct net_device *, int, u8 *);
0077 void (*getpgtccfgrx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *);
0078 void (*getpgbwgcfgrx)(struct net_device *, int, u8 *);
0079 void (*setpfccfg)(struct net_device *, int, u8);
0080 void (*getpfccfg)(struct net_device *, int, u8 *);
0081 u8 (*setall)(struct net_device *);
0082 u8 (*getcap)(struct net_device *, int, u8 *);
0083 int (*getnumtcs)(struct net_device *, int, u8 *);
0084 int (*setnumtcs)(struct net_device *, int, u8);
0085 u8 (*getpfcstate)(struct net_device *);
0086 void (*setpfcstate)(struct net_device *, u8);
0087 void (*getbcncfg)(struct net_device *, int, u32 *);
0088 void (*setbcncfg)(struct net_device *, int, u32);
0089 void (*getbcnrp)(struct net_device *, int, u8 *);
0090 void (*setbcnrp)(struct net_device *, int, u8);
0091 int (*setapp)(struct net_device *, u8, u16, u8);
0092 int (*getapp)(struct net_device *, u8, u16);
0093 u8 (*getfeatcfg)(struct net_device *, int, u8 *);
0094 u8 (*setfeatcfg)(struct net_device *, int, u8);
0095
0096
0097 u8 (*getdcbx)(struct net_device *);
0098 u8 (*setdcbx)(struct net_device *, u8);
0099
0100
0101 int (*peer_getappinfo)(struct net_device *, struct dcb_peer_app_info *,
0102 u16 *);
0103 int (*peer_getapptable)(struct net_device *, struct dcb_app *);
0104
0105
0106 int (*cee_peer_getpg) (struct net_device *, struct cee_pg *);
0107 int (*cee_peer_getpfc) (struct net_device *, struct cee_pfc *);
0108
0109
0110 int (*dcbnl_getbuffer)(struct net_device *, struct dcbnl_buffer *);
0111 int (*dcbnl_setbuffer)(struct net_device *, struct dcbnl_buffer *);
0112 };
0113
0114 #endif