~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/rdma/opa_vnic.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/rdma/opa_vnic.h (Version linux-6.12-rc7) and /include/rdma/opa_vnic.h (Version linux-6.9.12)


  1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-C      1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
  2 /*                                                  2 /*
  3  * Copyright(c) 2017 - 2020 Intel Corporation.      3  * Copyright(c) 2017 - 2020 Intel Corporation.
  4  */                                                 4  */
  5                                                     5 
  6 #ifndef _OPA_VNIC_H                                 6 #ifndef _OPA_VNIC_H
  7 #define _OPA_VNIC_H                                 7 #define _OPA_VNIC_H
  8                                                     8 
  9 /*                                                  9 /*
 10  * This file contains Intel Omni-Path (OPA) Vi     10  * This file contains Intel Omni-Path (OPA) Virtual Network Interface
 11  * Controller (VNIC) specific declarations.        11  * Controller (VNIC) specific declarations.
 12  */                                                12  */
 13                                                    13 
 14 #include <rdma/ib_verbs.h>                         14 #include <rdma/ib_verbs.h>
 15                                                    15 
 16 /* 16 header bytes + 2 reserved bytes */           16 /* 16 header bytes + 2 reserved bytes */
 17 #define OPA_VNIC_L2_HDR_LEN   (16 + 2)             17 #define OPA_VNIC_L2_HDR_LEN   (16 + 2)
 18                                                    18 
 19 #define OPA_VNIC_L4_HDR_LEN   2                    19 #define OPA_VNIC_L4_HDR_LEN   2
 20                                                    20 
 21 #define OPA_VNIC_HDR_LEN      (OPA_VNIC_L2_HDR     21 #define OPA_VNIC_HDR_LEN      (OPA_VNIC_L2_HDR_LEN + \
 22                                OPA_VNIC_L4_HDR     22                                OPA_VNIC_L4_HDR_LEN)
 23                                                    23 
 24 #define OPA_VNIC_L4_ETHR  0x78                     24 #define OPA_VNIC_L4_ETHR  0x78
 25                                                    25 
 26 #define OPA_VNIC_ICRC_LEN   4                      26 #define OPA_VNIC_ICRC_LEN   4
 27 #define OPA_VNIC_TAIL_LEN   1                      27 #define OPA_VNIC_TAIL_LEN   1
 28 #define OPA_VNIC_ICRC_TAIL_LEN  (OPA_VNIC_ICRC     28 #define OPA_VNIC_ICRC_TAIL_LEN  (OPA_VNIC_ICRC_LEN + OPA_VNIC_TAIL_LEN)
 29                                                    29 
 30 #define OPA_VNIC_SKB_MDATA_LEN         4           30 #define OPA_VNIC_SKB_MDATA_LEN         4
 31 #define OPA_VNIC_SKB_MDATA_ENCAP_ERR   0x1         31 #define OPA_VNIC_SKB_MDATA_ENCAP_ERR   0x1
 32                                                    32 
 33 /* opa vnic rdma netdev's private data structu     33 /* opa vnic rdma netdev's private data structure */
 34 struct opa_vnic_rdma_netdev {                      34 struct opa_vnic_rdma_netdev {
 35         struct rdma_netdev rn;  /* keep this f     35         struct rdma_netdev rn;  /* keep this first */
 36         /* followed by device private data */      36         /* followed by device private data */
 37         char *dev_priv[];                          37         char *dev_priv[];
 38 };                                                 38 };
 39                                                    39 
 40 static inline void *opa_vnic_priv(const struct     40 static inline void *opa_vnic_priv(const struct net_device *dev)
 41 {                                                  41 {
 42         struct rdma_netdev *rn = netdev_priv(d     42         struct rdma_netdev *rn = netdev_priv(dev);
 43                                                    43 
 44         return rn->clnt_priv;                      44         return rn->clnt_priv;
 45 }                                                  45 }
 46                                                    46 
 47 static inline void *opa_vnic_dev_priv(const st     47 static inline void *opa_vnic_dev_priv(const struct net_device *dev)
 48 {                                                  48 {
 49         struct opa_vnic_rdma_netdev *oparn = n     49         struct opa_vnic_rdma_netdev *oparn = netdev_priv(dev);
 50                                                    50 
 51         return oparn->dev_priv;                    51         return oparn->dev_priv;
 52 }                                                  52 }
 53                                                    53 
 54 /* opa_vnic skb meta data structure */             54 /* opa_vnic skb meta data structure */
 55 struct opa_vnic_skb_mdata {                        55 struct opa_vnic_skb_mdata {
 56         u8 vl;                                     56         u8 vl;
 57         u8 entropy;                                57         u8 entropy;
 58         u8 flags;                                  58         u8 flags;
 59         u8 rsvd;                                   59         u8 rsvd;
 60 } __packed;                                        60 } __packed;
 61                                                    61 
 62 /* OPA VNIC group statistics */                    62 /* OPA VNIC group statistics */
 63 struct opa_vnic_grp_stats {                        63 struct opa_vnic_grp_stats {
 64         u64 unicast;                               64         u64 unicast;
 65         u64 mcastbcast;                            65         u64 mcastbcast;
 66         u64 untagged;                              66         u64 untagged;
 67         u64 vlan;                                  67         u64 vlan;
 68         u64 s_64;                                  68         u64 s_64;
 69         u64 s_65_127;                              69         u64 s_65_127;
 70         u64 s_128_255;                             70         u64 s_128_255;
 71         u64 s_256_511;                             71         u64 s_256_511;
 72         u64 s_512_1023;                            72         u64 s_512_1023;
 73         u64 s_1024_1518;                           73         u64 s_1024_1518;
 74         u64 s_1519_max;                            74         u64 s_1519_max;
 75 };                                                 75 };
 76                                                    76 
 77 struct opa_vnic_stats {                            77 struct opa_vnic_stats {
 78         /* standard netdev statistics */           78         /* standard netdev statistics */
 79         struct rtnl_link_stats64 netstats;         79         struct rtnl_link_stats64 netstats;
 80                                                    80 
 81         /* OPA VNIC statistics */                  81         /* OPA VNIC statistics */
 82         struct opa_vnic_grp_stats tx_grp;          82         struct opa_vnic_grp_stats tx_grp;
 83         struct opa_vnic_grp_stats rx_grp;          83         struct opa_vnic_grp_stats rx_grp;
 84         u64 tx_dlid_zero;                          84         u64 tx_dlid_zero;
 85         u64 tx_drop_state;                         85         u64 tx_drop_state;
 86         u64 rx_drop_state;                         86         u64 rx_drop_state;
 87         u64 rx_runt;                               87         u64 rx_runt;
 88         u64 rx_oversize;                           88         u64 rx_oversize;
 89 };                                                 89 };
 90                                                    90 
 91 static inline bool rdma_cap_opa_vnic(struct ib     91 static inline bool rdma_cap_opa_vnic(struct ib_device *device)
 92 {                                                  92 {
 93         return !!(device->attrs.kernel_cap_fla     93         return !!(device->attrs.kernel_cap_flags & IBK_RDMA_NETDEV_OPA);
 94 }                                                  94 }
 95                                                    95 
 96 #endif /* _OPA_VNIC_H */                           96 #endif /* _OPA_VNIC_H */
 97                                                    97 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php