This source file includes following definitions.
- bnxt_vf_rep_get_fid
- bnxt_vf_reps_close
- bnxt_vf_reps_open
- bnxt_vf_rep_rx
- bnxt_get_vf_rep
- bnxt_vf_rep_get_fid
- bnxt_dev_is_vf_rep
1
2
3
4
5
6
7
8
9
10 #ifndef BNXT_VFR_H
11 #define BNXT_VFR_H
12
13 #ifdef CONFIG_BNXT_SRIOV
14
15 #define MAX_CFA_CODE 65536
16
17 void bnxt_vf_reps_destroy(struct bnxt *bp);
18 void bnxt_vf_reps_close(struct bnxt *bp);
19 void bnxt_vf_reps_open(struct bnxt *bp);
20 void bnxt_vf_rep_rx(struct bnxt *bp, struct sk_buff *skb);
21 struct net_device *bnxt_get_vf_rep(struct bnxt *bp, u16 cfa_code);
22
23 static inline u16 bnxt_vf_rep_get_fid(struct net_device *dev)
24 {
25 struct bnxt_vf_rep *vf_rep = netdev_priv(dev);
26 struct bnxt *bp = vf_rep->bp;
27
28 return bp->pf.vf[vf_rep->vf_idx].fw_fid;
29 }
30
31 bool bnxt_dev_is_vf_rep(struct net_device *dev);
32 int bnxt_dl_eswitch_mode_get(struct devlink *devlink, u16 *mode);
33 int bnxt_dl_eswitch_mode_set(struct devlink *devlink, u16 mode,
34 struct netlink_ext_ack *extack);
35
36 #else
37
38 static inline void bnxt_vf_reps_close(struct bnxt *bp)
39 {
40 }
41
42 static inline void bnxt_vf_reps_open(struct bnxt *bp)
43 {
44 }
45
46 static inline void bnxt_vf_rep_rx(struct bnxt *bp, struct sk_buff *skb)
47 {
48 }
49
50 static inline struct net_device *bnxt_get_vf_rep(struct bnxt *bp, u16 cfa_code)
51 {
52 return NULL;
53 }
54
55 static inline u16 bnxt_vf_rep_get_fid(struct net_device *dev)
56 {
57 return 0;
58 }
59
60 static inline bool bnxt_dev_is_vf_rep(struct net_device *dev)
61 {
62 return false;
63 }
64 #endif
65 #endif