blob: 66e6de86ff0c56284a493239e05270d8c4194d3f [file] [log] [blame]
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +00001/******************************************************************************
2 * This software may be used and distributed according to the terms of
3 * the GNU General Public License (GPL), incorporated herein by reference.
4 * Drivers based on or derived from this code fall under the GPL and must
5 * retain the authorship, copyright and license notice. This file is not
6 * a complete program and may only be used when the entire operating
7 * system is licensed under the GPL.
8 * See the file COPYING in this distribution for more information.
9 *
Jon Mason926bd902010-07-15 08:47:26 +000010 * vxge-main.h: Driver for Exar Corp's X3100 Series 10GbE PCIe I/O
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +000011 * Virtualized Server Adapter.
Jon Mason926bd902010-07-15 08:47:26 +000012 * Copyright(c) 2002-2010 Exar Corp.
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +000013 ******************************************************************************/
14#ifndef VXGE_MAIN_H
15#define VXGE_MAIN_H
16
17#include "vxge-traffic.h"
18#include "vxge-config.h"
19#include "vxge-version.h"
20#include <linux/list.h>
21
22#define VXGE_DRIVER_NAME "vxge"
23#define VXGE_DRIVER_VENDOR "Neterion, Inc"
Sreenivasa Honnur22fa1252009-07-01 21:17:24 +000024#define VXGE_DRIVER_FW_VERSION_MAJOR 1
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +000025
26#define DRV_VERSION VXGE_VERSION_MAJOR"."VXGE_VERSION_MINOR"."\
27 VXGE_VERSION_FIX"."VXGE_VERSION_BUILD"-"\
28 VXGE_VERSION_FOR
29
30#define PCI_DEVICE_ID_TITAN_WIN 0x5733
31#define PCI_DEVICE_ID_TITAN_UNI 0x5833
Jon Masone7935c92010-11-11 04:26:00 +000032#define VXGE_HW_TITAN1_PCI_REVISION 1
33#define VXGE_HW_TITAN1A_PCI_REVISION 2
34
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +000035#define VXGE_USE_DEFAULT 0xffffffff
36#define VXGE_HW_VPATH_MSIX_ACTIVE 4
Sreenivasa Honnurb59c94572010-03-28 22:11:41 +000037#define VXGE_ALARM_MSIX_ID 2
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +000038#define VXGE_HW_RXSYNC_FREQ_CNT 4
39#define VXGE_LL_WATCH_DOG_TIMEOUT (15 * HZ)
40#define VXGE_LL_RX_COPY_THRESHOLD 256
41#define VXGE_DEF_FIFO_LENGTH 84
42
43#define NO_STEERING 0
44#define PORT_STEERING 0x1
45#define RTH_STEERING 0x2
46#define RX_TOS_STEERING 0x3
47#define RX_VLAN_STEERING 0x4
48#define RTH_BUCKET_SIZE 4
49
50#define TX_PRIORITY_STEERING 1
51#define TX_VLAN_STEERING 2
52#define TX_PORT_STEERING 3
53#define TX_MULTIQ_STEERING 4
54
55#define VXGE_HW_MAC_ADDR_LEARN_DEFAULT VXGE_HW_RTS_MAC_DISABLE
56
57#define VXGE_TTI_BTIMER_VAL 250000
58
Jon Masone7935c92010-11-11 04:26:00 +000059#define VXGE_TTI_LTIMER_VAL 1000
60#define VXGE_T1A_TTI_LTIMER_VAL 80
61#define VXGE_TTI_RTIMER_VAL 0
Jon Mason16fded72011-01-18 15:02:21 +000062#define VXGE_TTI_RTIMER_ADAPT_VAL 10
Jon Masone7935c92010-11-11 04:26:00 +000063#define VXGE_T1A_TTI_RTIMER_VAL 400
64#define VXGE_RTI_BTIMER_VAL 250
65#define VXGE_RTI_LTIMER_VAL 100
66#define VXGE_RTI_RTIMER_VAL 0
Jon Mason16fded72011-01-18 15:02:21 +000067#define VXGE_RTI_RTIMER_ADAPT_VAL 15
68#define VXGE_FIFO_INDICATE_MAX_PKTS VXGE_DEF_FIFO_LENGTH
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +000069#define VXGE_ISR_POLLING_CNT 8
70#define VXGE_MAX_CONFIG_DEV 0xFF
71#define VXGE_EXEC_MODE_DISABLE 0
72#define VXGE_EXEC_MODE_ENABLE 1
73#define VXGE_MAX_CONFIG_PORT 1
74#define VXGE_ALL_VID_DISABLE 0
75#define VXGE_ALL_VID_ENABLE 1
76#define VXGE_PAUSE_CTRL_DISABLE 0
77#define VXGE_PAUSE_CTRL_ENABLE 1
78
79#define TTI_TX_URANGE_A 5
80#define TTI_TX_URANGE_B 15
81#define TTI_TX_URANGE_C 40
82#define TTI_TX_UFC_A 5
83#define TTI_TX_UFC_B 40
84#define TTI_TX_UFC_C 60
85#define TTI_TX_UFC_D 100
Jon Masone7935c92010-11-11 04:26:00 +000086#define TTI_T1A_TX_UFC_A 30
87#define TTI_T1A_TX_UFC_B 80
88/* Slope - (max_mtu - min_mtu)/(max_mtu_ufc - min_mtu_ufc) */
89/* Slope - 93 */
90/* 60 - 9k Mtu, 140 - 1.5k mtu */
91#define TTI_T1A_TX_UFC_C(mtu) (60 + ((VXGE_HW_MAX_MTU - mtu) / 93))
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +000092
Jon Masone7935c92010-11-11 04:26:00 +000093/* Slope - 37 */
94/* 100 - 9k Mtu, 300 - 1.5k mtu */
95#define TTI_T1A_TX_UFC_D(mtu) (100 + ((VXGE_HW_MAX_MTU - mtu) / 37))
96
97
98#define RTI_RX_URANGE_A 5
99#define RTI_RX_URANGE_B 15
100#define RTI_RX_URANGE_C 40
101#define RTI_T1A_RX_URANGE_A 1
102#define RTI_T1A_RX_URANGE_B 20
103#define RTI_T1A_RX_URANGE_C 50
104#define RTI_RX_UFC_A 1
105#define RTI_RX_UFC_B 5
106#define RTI_RX_UFC_C 10
107#define RTI_RX_UFC_D 15
108#define RTI_T1A_RX_UFC_B 20
109#define RTI_T1A_RX_UFC_C 50
110#define RTI_T1A_RX_UFC_D 60
111
Jon Mason16fded72011-01-18 15:02:21 +0000112/*
113 * The interrupt rate is maintained at 3k per second with the moderation
114 * parameters for most traffic but not all. This is the maximum interrupt
115 * count allowed per function with INTA or per vector in the case of
116 * MSI-X in a 10 millisecond time period. Enabled only for Titan 1A.
117 */
118#define VXGE_T1A_MAX_INTERRUPT_COUNT 100
119#define VXGE_T1A_MAX_TX_INTERRUPT_COUNT 200
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000120
121/* Milli secs timer period */
122#define VXGE_TIMER_DELAY 10000
123
124#define VXGE_LL_MAX_FRAME_SIZE(dev) ((dev)->mtu + VXGE_HW_MAC_HEADER_MAX_SIZE)
125
Sreenivasa Honnurcb27ec62010-04-08 01:48:57 -0700126#define is_sriov(function_mode) \
127 ((function_mode == VXGE_HW_FUNCTION_MODE_SRIOV) || \
128 (function_mode == VXGE_HW_FUNCTION_MODE_SRIOV_8) || \
129 (function_mode == VXGE_HW_FUNCTION_MODE_SRIOV_4))
130
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000131enum vxge_reset_event {
132 /* reset events */
133 VXGE_LL_VPATH_RESET = 0,
134 VXGE_LL_DEVICE_RESET = 1,
135 VXGE_LL_FULL_RESET = 2,
136 VXGE_LL_START_RESET = 3,
137 VXGE_LL_COMPL_RESET = 4
138};
139/* These flags represent the devices temporary state */
140enum vxge_device_state_t {
141__VXGE_STATE_RESET_CARD = 0,
142__VXGE_STATE_CARD_UP
143};
144
145enum vxge_mac_addr_state {
146 /* mac address states */
147 VXGE_LL_MAC_ADDR_IN_LIST = 0,
148 VXGE_LL_MAC_ADDR_IN_DA_TABLE = 1
149};
150
151struct vxge_drv_config {
152 int config_dev_cnt;
153 int total_dev_cnt;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000154 int g_no_cpus;
155 unsigned int vpath_per_dev;
156};
157
158struct macInfo {
159 unsigned char macaddr[ETH_ALEN];
160 unsigned char macmask[ETH_ALEN];
161 unsigned int vpath_no;
162 enum vxge_mac_addr_state state;
163};
164
165struct vxge_config {
166 int tx_pause_enable;
167 int rx_pause_enable;
168
169#define NEW_NAPI_WEIGHT 64
170 int napi_weight;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000171 int intr_type;
172#define INTA 0
173#define MSI 1
174#define MSI_X 2
175
176 int addr_learn_en;
177
Jon Mason47f01db2010-11-11 04:25:53 +0000178 u32 rth_steering:2,
179 rth_algorithm:2,
180 rth_hash_type_tcpipv4:1,
181 rth_hash_type_ipv4:1,
182 rth_hash_type_tcpipv6:1,
183 rth_hash_type_ipv6:1,
184 rth_hash_type_tcpipv6ex:1,
185 rth_hash_type_ipv6ex:1,
186 rth_bkt_sz:8;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000187 int rth_jhash_golden_ratio;
188 int tx_steering_type;
189 int fifo_indicate_max_pkts;
190 struct vxge_hw_device_hw_info device_hw_info;
191};
192
193struct vxge_msix_entry {
194 /* Mimicing the msix_entry struct of Kernel. */
195 u16 vector;
196 u16 entry;
197 u16 in_use;
198 void *arg;
199};
200
201/* Software Statistics */
202
203struct vxge_sw_stats {
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000204
205 /* Virtual Path */
stephen hemminger62ea0552011-06-20 10:35:07 +0000206 unsigned long vpaths_open;
207 unsigned long vpath_open_fail;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000208
209 /* Misc. */
stephen hemminger62ea0552011-06-20 10:35:07 +0000210 unsigned long link_up;
211 unsigned long link_down;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000212};
213
214struct vxge_mac_addrs {
215 struct list_head item;
216 u64 macaddr;
217 u64 macmask;
218 enum vxge_mac_addr_state state;
219};
220
221struct vxgedev;
222
223struct vxge_fifo_stats {
stephen hemminger62ea0552011-06-20 10:35:07 +0000224 struct u64_stats_sync syncp;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000225 u64 tx_frms;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000226 u64 tx_bytes;
stephen hemminger62ea0552011-06-20 10:35:07 +0000227
228 unsigned long tx_errors;
229 unsigned long txd_not_free;
230 unsigned long txd_out_of_desc;
231 unsigned long pci_map_fail;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000232};
233
234struct vxge_fifo {
Jon Mason98f45da2010-07-15 08:47:25 +0000235 struct net_device *ndev;
236 struct pci_dev *pdev;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000237 struct __vxge_hw_fifo *handle;
Jon Mason98f45da2010-07-15 08:47:25 +0000238 struct netdev_queue *txq;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000239
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000240 int tx_steering_type;
241 int indicate_max_pkts;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000242
Jon Mason16fded72011-01-18 15:02:21 +0000243 /* Adaptive interrupt moderation parameters used in T1A */
244 unsigned long interrupt_count;
245 unsigned long jiffies;
246
247 u32 tx_vector_no;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000248 /* Tx stats */
249 struct vxge_fifo_stats stats;
250} ____cacheline_aligned;
251
252struct vxge_ring_stats {
stephen hemminger62ea0552011-06-20 10:35:07 +0000253 struct u64_stats_sync syncp;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000254 u64 rx_frms;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000255 u64 rx_mcast;
stephen hemminger62ea0552011-06-20 10:35:07 +0000256 u64 rx_bytes;
257
258 unsigned long rx_errors;
259 unsigned long rx_dropped;
260 unsigned long prev_rx_frms;
261 unsigned long pci_map_fail;
262 unsigned long skb_alloc_fail;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000263};
264
265struct vxge_ring {
266 struct net_device *ndev;
267 struct pci_dev *pdev;
268 struct __vxge_hw_ring *handle;
269 /* The vpath id maintained in the driver -
270 * 0 to 'maximum_vpaths_in_function - 1'
271 */
272 int driver_id;
273
Jon Mason16fded72011-01-18 15:02:21 +0000274 /* Adaptive interrupt moderation parameters used in T1A */
275 unsigned long interrupt_count;
276 unsigned long jiffies;
277
Michał Mirosławfeb990d2011-04-18 13:31:21 +0000278 /* copy of the flag indicating whether rx_hwts is to be used */
279 u32 rx_hwts:1;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000280
281 int pkts_processed;
282 int budget;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000283
284 struct napi_struct napi;
Sreenivasa Honnura5d165b2009-07-01 21:16:37 +0000285 struct napi_struct *napi_p;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000286
287#define VXGE_MAX_MAC_ADDR_COUNT 30
288
289 int vlan_tag_strip;
290 struct vlan_group *vlgrp;
Jon Mason16fded72011-01-18 15:02:21 +0000291 u32 rx_vector_no;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000292 enum vxge_hw_status last_status;
293
294 /* Rx stats */
295 struct vxge_ring_stats stats;
296} ____cacheline_aligned;
297
298struct vxge_vpath {
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000299 struct vxge_fifo fifo;
300 struct vxge_ring ring;
301
302 struct __vxge_hw_vpath_handle *handle;
303
304 /* Actual vpath id for this vpath in the device - 0 to 16 */
305 int device_id;
306 int max_mac_addr_cnt;
307 int is_configured;
308 int is_open;
309 struct vxgedev *vdev;
Jon Mason528f7272010-12-10 14:02:56 +0000310 u8 macaddr[ETH_ALEN];
311 u8 macmask[ETH_ALEN];
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000312
313#define VXGE_MAX_LEARN_MAC_ADDR_CNT 2048
314 /* mac addresses currently programmed into NIC */
315 u16 mac_addr_cnt;
316 u16 mcast_addr_cnt;
317 struct list_head mac_addr_list;
318
319 u32 level_err;
320 u32 level_trace;
321};
322#define VXGE_COPY_DEBUG_INFO_TO_LL(vdev, err, trace) { \
323 for (i = 0; i < vdev->no_of_vpath; i++) { \
324 vdev->vpaths[i].level_err = err; \
325 vdev->vpaths[i].level_trace = trace; \
326 } \
327 vdev->level_err = err; \
328 vdev->level_trace = trace; \
329}
330
331struct vxgedev {
332 struct net_device *ndev;
333 struct pci_dev *pdev;
334 struct __vxge_hw_device *devh;
335 struct vlan_group *vlgrp;
336 int vlan_tag_strip;
337 struct vxge_config config;
338 unsigned long state;
339
340 /* Indicates which vpath to reset */
341 unsigned long vp_reset;
342
343 /* Timer used for polling vpath resets */
344 struct timer_list vp_reset_timer;
345
346 /* Timer used for polling vpath lockup */
347 struct timer_list vp_lockup_timer;
348
349 /*
350 * Flags to track whether device is in All Multicast
351 * or in promiscuous mode.
352 */
353 u16 all_multi_flg;
354
Michał Mirosławfeb990d2011-04-18 13:31:21 +0000355 /* A flag indicating whether rx_hwts is to be used or not. */
356 u32 rx_hwts:1,
Jon Masone7935c92010-11-11 04:26:00 +0000357 titan1:1;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000358
359 struct vxge_msix_entry *vxge_entries;
360 struct msix_entry *entries;
361 /*
362 * 4 for each vpath * 17;
363 * total is 68
364 */
365#define VXGE_MAX_REQUESTED_MSIX 68
366#define VXGE_INTR_STRLEN 80
367 char desc[VXGE_MAX_REQUESTED_MSIX][VXGE_INTR_STRLEN];
368
369 enum vxge_hw_event cric_err_event;
370
371 int max_vpath_supported;
372 int no_of_vpath;
373
374 struct napi_struct napi;
375 /* A debug option, when enabled and if error condition occurs,
376 * the driver will do following steps:
377 * - mask all interrupts
378 * - Not clear the source of the alarm
379 * - gracefully stop all I/O
380 * A diagnostic dump of register and stats at this point
381 * reveals very useful information.
382 */
383 int exec_mode;
384 int max_config_port;
385 struct vxge_vpath *vpaths;
386
387 struct __vxge_hw_vpath_handle *vp_handles[VXGE_HW_MAX_VIRTUAL_PATHS];
388 void __iomem *bar0;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000389 struct vxge_sw_stats stats;
390 int mtu;
391 /* Below variables are used for vpath selection to transmit a packet */
392 u8 vpath_selector[VXGE_HW_MAX_VIRTUAL_PATHS];
393 u64 vpaths_deployed;
394
395 u32 intr_cnt;
396 u32 level_err;
397 u32 level_trace;
398 char fw_version[VXGE_HW_FW_STRLEN];
Jon Mason2e41f642010-12-10 14:02:59 +0000399 struct work_struct reset_task;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000400};
401
402struct vxge_rx_priv {
403 struct sk_buff *skb;
Benjamin LaHaiseea11bbe2009-08-04 10:21:57 +0000404 unsigned char *skb_data;
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000405 dma_addr_t data_dma;
406 dma_addr_t data_size;
407};
408
409struct vxge_tx_priv {
410 struct sk_buff *skb;
411 dma_addr_t dma_buffers[MAX_SKB_FRAGS+1];
412};
413
414#define VXGE_MODULE_PARAM_INT(p, val) \
415 static int p = val; \
416 module_param(p, int, 0)
417
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000418#define vxge_os_timer(timer, handle, arg, exp) do { \
419 init_timer(&timer); \
420 timer.function = handle; \
421 timer.data = (unsigned long) arg; \
422 mod_timer(&timer, (jiffies + exp)); \
423 } while (0);
424
Jon Mason528f7272010-12-10 14:02:56 +0000425void vxge_initialize_ethtool_ops(struct net_device *ndev);
Jon Mason4d2a5b42010-11-11 04:25:54 +0000426enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);
Jon Masone8ac1752010-11-11 04:25:57 +0000427int vxge_fw_upgrade(struct vxgedev *vdev, char *fw_name, int override);
428
Ramkrishna Vepa703da5a2009-04-01 18:15:13 +0000429/**
430 * #define VXGE_DEBUG_INIT: debug for initialization functions
431 * #define VXGE_DEBUG_TX : debug transmit related functions
432 * #define VXGE_DEBUG_RX : debug recevice related functions
433 * #define VXGE_DEBUG_MEM : debug memory module
434 * #define VXGE_DEBUG_LOCK: debug locks
435 * #define VXGE_DEBUG_SEM : debug semaphore
436 * #define VXGE_DEBUG_ENTRYEXIT: debug functions by adding entry exit statements
437*/
438#define VXGE_DEBUG_INIT 0x00000001
439#define VXGE_DEBUG_TX 0x00000002
440#define VXGE_DEBUG_RX 0x00000004
441#define VXGE_DEBUG_MEM 0x00000008
442#define VXGE_DEBUG_LOCK 0x00000010
443#define VXGE_DEBUG_SEM 0x00000020
444#define VXGE_DEBUG_ENTRYEXIT 0x00000040
445#define VXGE_DEBUG_INTR 0x00000080
446#define VXGE_DEBUG_LL_CONFIG 0x00000100
447
448/* Debug tracing for VXGE driver */
449#ifndef VXGE_DEBUG_MASK
450#define VXGE_DEBUG_MASK 0x0
451#endif
452
453#if (VXGE_DEBUG_LL_CONFIG & VXGE_DEBUG_MASK)
454#define vxge_debug_ll_config(level, fmt, ...) \
455 vxge_debug_ll(level, VXGE_DEBUG_LL_CONFIG, fmt, __VA_ARGS__)
456#else
457#define vxge_debug_ll_config(level, fmt, ...)
458#endif
459
460#if (VXGE_DEBUG_INIT & VXGE_DEBUG_MASK)
461#define vxge_debug_init(level, fmt, ...) \
462 vxge_debug_ll(level, VXGE_DEBUG_INIT, fmt, __VA_ARGS__)
463#else
464#define vxge_debug_init(level, fmt, ...)
465#endif
466
467#if (VXGE_DEBUG_TX & VXGE_DEBUG_MASK)
468#define vxge_debug_tx(level, fmt, ...) \
469 vxge_debug_ll(level, VXGE_DEBUG_TX, fmt, __VA_ARGS__)
470#else
471#define vxge_debug_tx(level, fmt, ...)
472#endif
473
474#if (VXGE_DEBUG_RX & VXGE_DEBUG_MASK)
475#define vxge_debug_rx(level, fmt, ...) \
476 vxge_debug_ll(level, VXGE_DEBUG_RX, fmt, __VA_ARGS__)
477#else
478#define vxge_debug_rx(level, fmt, ...)
479#endif
480
481#if (VXGE_DEBUG_MEM & VXGE_DEBUG_MASK)
482#define vxge_debug_mem(level, fmt, ...) \
483 vxge_debug_ll(level, VXGE_DEBUG_MEM, fmt, __VA_ARGS__)
484#else
485#define vxge_debug_mem(level, fmt, ...)
486#endif
487
488#if (VXGE_DEBUG_ENTRYEXIT & VXGE_DEBUG_MASK)
489#define vxge_debug_entryexit(level, fmt, ...) \
490 vxge_debug_ll(level, VXGE_DEBUG_ENTRYEXIT, fmt, __VA_ARGS__)
491#else
492#define vxge_debug_entryexit(level, fmt, ...)
493#endif
494
495#if (VXGE_DEBUG_INTR & VXGE_DEBUG_MASK)
496#define vxge_debug_intr(level, fmt, ...) \
497 vxge_debug_ll(level, VXGE_DEBUG_INTR, fmt, __VA_ARGS__)
498#else
499#define vxge_debug_intr(level, fmt, ...)
500#endif
501
502#define VXGE_DEVICE_DEBUG_LEVEL_SET(level, mask, vdev) {\
503 vxge_hw_device_debug_set((struct __vxge_hw_device *)vdev->devh, \
504 level, mask);\
505 VXGE_COPY_DEBUG_INFO_TO_LL(vdev, \
506 vxge_hw_device_error_level_get((struct __vxge_hw_device *) \
507 vdev->devh), \
508 vxge_hw_device_trace_level_get((struct __vxge_hw_device *) \
509 vdev->devh));\
510}
511
512#ifdef NETIF_F_GSO
513#define vxge_tcp_mss(skb) (skb_shinfo(skb)->gso_size)
514#define vxge_udp_mss(skb) (skb_shinfo(skb)->gso_size)
515#define vxge_offload_type(skb) (skb_shinfo(skb)->gso_type)
516#endif
517
518#endif