[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201602171531.30XnsR5H%fengguang.wu@intel.com>
Date: Wed, 17 Feb 2016 15:57:41 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Yuval Mintz <Yuval.Mintz@...gic.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org,
Ariel Elior <Ariel.Elior@...gic.com>
Subject: [net-next:master 367/387]
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c:224:11: error:
'DCBX_APP_SF_DEFAULT' undeclared
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 547b9ca879eafeb3507c00dc77002953c9c04b0b
commit: e5d3a51cefbb08c8b8c521f627aef1f998834530 [367/387] bnx2x: extend DCBx support
config: powerpc-defconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout e5d3a51cefbb08c8b8c521f627aef1f998834530
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/broadcom/bnx2x/bnx2x.h:56:0,
from drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c:30:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c: In function 'bnx2x_dcbx_get_ap_feature':
>> drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c:224:11: error: 'DCBX_APP_SF_DEFAULT' undeclared (first use in this function)
DCBX_APP_SF_DEFAULT) &&
^
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h:120:45: note: in definition of macro 'GET_FLAGS'
#define GET_FLAGS(flags, bits) ((flags) & (bits))
^
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c:224:11: note: each undeclared identifier is reported only once for each function it appears in
DCBX_APP_SF_DEFAULT) &&
^
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h:120:45: note: in definition of macro 'GET_FLAGS'
#define GET_FLAGS(flags, bits) ((flags) & (bits))
^
vim +/DCBX_APP_SF_DEFAULT +224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
24 #include <linux/netdevice.h>
25 #include <linux/types.h>
26 #include <linux/errno.h>
27 #include <linux/rtnetlink.h>
28 #include <net/dcbnl.h>
29
> 30 #include "bnx2x.h"
31 #include "bnx2x_cmn.h"
32 #include "bnx2x_dcb.h"
33
34 /* forward declarations of dcbx related functions */
35 static void bnx2x_pfc_set_pfc(struct bnx2x *bp);
36 static void bnx2x_dcbx_update_ets_params(struct bnx2x *bp);
37 static void bnx2x_dcbx_get_ets_pri_pg_tbl(struct bnx2x *bp,
38 u32 *set_configuration_ets_pg,
39 u32 *pri_pg_tbl);
40 static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp,
41 u32 *pg_pri_orginal_spread,
42 struct pg_help_data *help_data);
43 static void bnx2x_dcbx_fill_cos_params(struct bnx2x *bp,
44 struct pg_help_data *help_data,
45 struct dcbx_ets_feature *ets,
46 u32 *pg_pri_orginal_spread);
47 static void bnx2x_dcbx_separate_pauseable_from_non(struct bnx2x *bp,
48 struct cos_help_data *cos_data,
49 u32 *pg_pri_orginal_spread,
50 struct dcbx_ets_feature *ets);
51 static void bnx2x_dcbx_fw_struct(struct bnx2x *bp,
52 struct bnx2x_func_tx_start_params*);
53
54 /* helpers: read/write len bytes from addr into buff by REG_RD/REG_WR */
55 static void bnx2x_read_data(struct bnx2x *bp, u32 *buff,
56 u32 addr, u32 len)
57 {
58 int i;
59 for (i = 0; i < len; i += 4, buff++)
60 *buff = REG_RD(bp, addr + i);
61 }
62
63 static void bnx2x_write_data(struct bnx2x *bp, u32 *buff,
64 u32 addr, u32 len)
65 {
66 int i;
67 for (i = 0; i < len; i += 4, buff++)
68 REG_WR(bp, addr + i, *buff);
69 }
70
71 static void bnx2x_pfc_set(struct bnx2x *bp)
72 {
73 struct bnx2x_nig_brb_pfc_port_params pfc_params = {0};
74 u32 pri_bit, val = 0;
75 int i;
76
77 pfc_params.num_of_rx_cos_priority_mask =
78 bp->dcbx_port_params.ets.num_of_cos;
79
80 /* Tx COS configuration */
81 for (i = 0; i < bp->dcbx_port_params.ets.num_of_cos; i++)
82 /*
83 * We configure only the pauseable bits (non pauseable aren't
84 * configured at all) it's done to avoid false pauses from
85 * network
86 */
87 pfc_params.rx_cos_priority_mask[i] =
88 bp->dcbx_port_params.ets.cos_params[i].pri_bitmask
89 & DCBX_PFC_PRI_PAUSE_MASK(bp);
90
91 /*
92 * Rx COS configuration
93 * Changing PFC RX configuration .
94 * In RX COS0 will always be configured to lossless and COS1 to lossy
95 */
96 for (i = 0 ; i < MAX_PFC_PRIORITIES ; i++) {
97 pri_bit = 1 << i;
98
99 if (!(pri_bit & DCBX_PFC_PRI_PAUSE_MASK(bp)))
100 val |= 1 << (i * 4);
101 }
102
103 pfc_params.pkt_priority_to_cos = val;
104
105 /* RX COS0 */
106 pfc_params.llfc_low_priority_classes = DCBX_PFC_PRI_PAUSE_MASK(bp);
107 /* RX COS1 */
108 pfc_params.llfc_high_priority_classes = 0;
109
110 bnx2x_acquire_phy_lock(bp);
111 bp->link_params.feature_config_flags |= FEATURE_CONFIG_PFC_ENABLED;
112 bnx2x_update_pfc(&bp->link_params, &bp->link_vars, &pfc_params);
113 bnx2x_release_phy_lock(bp);
114 }
115
116 static void bnx2x_pfc_clear(struct bnx2x *bp)
117 {
118 struct bnx2x_nig_brb_pfc_port_params nig_params = {0};
119 nig_params.pause_enable = 1;
120 bnx2x_acquire_phy_lock(bp);
121 bp->link_params.feature_config_flags &= ~FEATURE_CONFIG_PFC_ENABLED;
122 bnx2x_update_pfc(&bp->link_params, &bp->link_vars, &nig_params);
123 bnx2x_release_phy_lock(bp);
124 }
125
126 static void bnx2x_dump_dcbx_drv_param(struct bnx2x *bp,
127 struct dcbx_features *features,
128 u32 error)
129 {
130 u8 i = 0;
131 DP(NETIF_MSG_LINK, "local_mib.error %x\n", error);
132
133 /* PG */
134 DP(NETIF_MSG_LINK,
135 "local_mib.features.ets.enabled %x\n", features->ets.enabled);
136 for (i = 0; i < DCBX_MAX_NUM_PG_BW_ENTRIES; i++)
137 DP(NETIF_MSG_LINK,
138 "local_mib.features.ets.pg_bw_tbl[%d] %d\n", i,
139 DCBX_PG_BW_GET(features->ets.pg_bw_tbl, i));
140 for (i = 0; i < DCBX_MAX_NUM_PRI_PG_ENTRIES; i++)
141 DP(NETIF_MSG_LINK,
142 "local_mib.features.ets.pri_pg_tbl[%d] %d\n", i,
143 DCBX_PRI_PG_GET(features->ets.pri_pg_tbl, i));
144
145 /* pfc */
146 DP(BNX2X_MSG_DCB, "dcbx_features.pfc.pri_en_bitmap %x\n",
147 features->pfc.pri_en_bitmap);
148 DP(BNX2X_MSG_DCB, "dcbx_features.pfc.pfc_caps %x\n",
149 features->pfc.pfc_caps);
150 DP(BNX2X_MSG_DCB, "dcbx_features.pfc.enabled %x\n",
151 features->pfc.enabled);
152
153 DP(BNX2X_MSG_DCB, "dcbx_features.app.default_pri %x\n",
154 features->app.default_pri);
155 DP(BNX2X_MSG_DCB, "dcbx_features.app.tc_supported %x\n",
156 features->app.tc_supported);
157 DP(BNX2X_MSG_DCB, "dcbx_features.app.enabled %x\n",
158 features->app.enabled);
159 for (i = 0; i < DCBX_MAX_APP_PROTOCOL; i++) {
160 DP(BNX2X_MSG_DCB,
161 "dcbx_features.app.app_pri_tbl[%x].app_id %x\n",
162 i, features->app.app_pri_tbl[i].app_id);
163 DP(BNX2X_MSG_DCB,
164 "dcbx_features.app.app_pri_tbl[%x].pri_bitmap %x\n",
165 i, features->app.app_pri_tbl[i].pri_bitmap);
166 DP(BNX2X_MSG_DCB,
167 "dcbx_features.app.app_pri_tbl[%x].appBitfield %x\n",
168 i, features->app.app_pri_tbl[i].appBitfield);
169 }
170 }
171
172 static void bnx2x_dcbx_get_ap_priority(struct bnx2x *bp,
173 u8 pri_bitmap,
174 u8 llfc_traf_type)
175 {
176 u32 pri = MAX_PFC_PRIORITIES;
177 u32 index = MAX_PFC_PRIORITIES - 1;
178 u32 pri_mask;
179 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority;
180
181 /* Choose the highest priority */
182 while ((MAX_PFC_PRIORITIES == pri) && (0 != index)) {
183 pri_mask = 1 << index;
184 if (GET_FLAGS(pri_bitmap, pri_mask))
185 pri = index ;
186 index--;
187 }
188
189 if (pri < MAX_PFC_PRIORITIES)
190 ttp[llfc_traf_type] = max_t(u32, ttp[llfc_traf_type], pri);
191 }
192
193 static void bnx2x_dcbx_get_ap_feature(struct bnx2x *bp,
194 struct dcbx_app_priority_feature *app,
195 u32 error) {
196 u8 index;
197 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority;
198 u8 iscsi_pri_found = 0, fcoe_pri_found = 0;
199
200 if (GET_FLAGS(error, DCBX_LOCAL_APP_ERROR))
201 DP(BNX2X_MSG_DCB, "DCBX_LOCAL_APP_ERROR\n");
202
203 if (GET_FLAGS(error, DCBX_LOCAL_APP_MISMATCH))
204 DP(BNX2X_MSG_DCB, "DCBX_LOCAL_APP_MISMATCH\n");
205
206 if (GET_FLAGS(error, DCBX_REMOTE_APP_TLV_NOT_FOUND))
207 DP(BNX2X_MSG_DCB, "DCBX_REMOTE_APP_TLV_NOT_FOUND\n");
208 if (app->enabled &&
209 !GET_FLAGS(error, DCBX_LOCAL_APP_ERROR | DCBX_LOCAL_APP_MISMATCH |
210 DCBX_REMOTE_APP_TLV_NOT_FOUND)) {
211
212 bp->dcbx_port_params.app.enabled = true;
213
214 /* Use 0 as the default application priority for all. */
215 for (index = 0 ; index < LLFC_DRIVER_TRAFFIC_TYPE_MAX; index++)
216 ttp[index] = 0;
217
218 for (index = 0 ; index < DCBX_MAX_APP_PROTOCOL; index++) {
219 struct dcbx_app_priority_entry *entry =
220 app->app_pri_tbl;
221 enum traffic_type type = MAX_TRAFFIC_TYPE;
222
223 if (GET_FLAGS(entry[index].appBitfield,
> 224 DCBX_APP_SF_DEFAULT) &&
225 GET_FLAGS(entry[index].appBitfield,
226 DCBX_APP_SF_ETH_TYPE)) {
227 type = LLFC_TRAFFIC_TYPE_NW;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/octet-stream" (21907 bytes)
Powered by blists - more mailing lists