bnx2x.h (cb54b53adae70701bdd77d848cea4b9b39b61cf9) | bnx2x.h (e0d1095ae3405404d247afb00233ef837d58da83) |
---|---|
1/* bnx2x.h: Broadcom Everest network driver. 2 * 3 * Copyright (c) 2007-2013 Broadcom Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation. 8 * --- 472 unchanged lines hidden (view full) --- 481 TPA_MODE_GRO 482}; 483 484struct bnx2x_fastpath { 485 struct bnx2x *bp; /* parent */ 486 487 struct napi_struct napi; 488 | 1/* bnx2x.h: Broadcom Everest network driver. 2 * 3 * Copyright (c) 2007-2013 Broadcom Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation. 8 * --- 472 unchanged lines hidden (view full) --- 481 TPA_MODE_GRO 482}; 483 484struct bnx2x_fastpath { 485 struct bnx2x *bp; /* parent */ 486 487 struct napi_struct napi; 488 |
489#ifdef CONFIG_NET_LL_RX_POLL | 489#ifdef CONFIG_NET_RX_BUSY_POLL |
490 unsigned int state; 491#define BNX2X_FP_STATE_IDLE 0 492#define BNX2X_FP_STATE_NAPI (1 << 0) /* NAPI owns this FP */ 493#define BNX2X_FP_STATE_POLL (1 << 1) /* poll owns this FP */ 494#define BNX2X_FP_STATE_NAPI_YIELD (1 << 2) /* NAPI yielded this FP */ 495#define BNX2X_FP_STATE_POLL_YIELD (1 << 3) /* poll yielded this FP */ 496#define BNX2X_FP_YIELD (BNX2X_FP_STATE_NAPI_YIELD | BNX2X_FP_STATE_POLL_YIELD) 497#define BNX2X_FP_LOCKED (BNX2X_FP_STATE_NAPI | BNX2X_FP_STATE_POLL) 498#define BNX2X_FP_USER_PEND (BNX2X_FP_STATE_POLL | BNX2X_FP_STATE_POLL_YIELD) 499 /* protect state */ 500 spinlock_t lock; | 490 unsigned int state; 491#define BNX2X_FP_STATE_IDLE 0 492#define BNX2X_FP_STATE_NAPI (1 << 0) /* NAPI owns this FP */ 493#define BNX2X_FP_STATE_POLL (1 << 1) /* poll owns this FP */ 494#define BNX2X_FP_STATE_NAPI_YIELD (1 << 2) /* NAPI yielded this FP */ 495#define BNX2X_FP_STATE_POLL_YIELD (1 << 3) /* poll yielded this FP */ 496#define BNX2X_FP_YIELD (BNX2X_FP_STATE_NAPI_YIELD | BNX2X_FP_STATE_POLL_YIELD) 497#define BNX2X_FP_LOCKED (BNX2X_FP_STATE_NAPI | BNX2X_FP_STATE_POLL) 498#define BNX2X_FP_USER_PEND (BNX2X_FP_STATE_POLL | BNX2X_FP_STATE_POLL_YIELD) 499 /* protect state */ 500 spinlock_t lock; |
501#endif /* CONFIG_NET_LL_RX_POLL */ | 501#endif /* CONFIG_NET_RX_BUSY_POLL */ |
502 503 union host_hc_status_block status_blk; 504 /* chip independent shortcuts into sb structure */ 505 __le16 *sb_index_values; 506 __le16 *sb_running_index; 507 /* chip independent shortcut into rx_prods_offset memory */ 508 u32 ustorm_rx_prods_offset; 509 --- 57 unchanged lines hidden (view full) --- 567 char name[FP_NAME_SIZE]; 568}; 569 570#define bnx2x_fp(bp, nr, var) ((bp)->fp[(nr)].var) 571#define bnx2x_sp_obj(bp, fp) ((bp)->sp_objs[(fp)->index]) 572#define bnx2x_fp_stats(bp, fp) (&((bp)->fp_stats[(fp)->index])) 573#define bnx2x_fp_qstats(bp, fp) (&((bp)->fp_stats[(fp)->index].eth_q_stats)) 574 | 502 503 union host_hc_status_block status_blk; 504 /* chip independent shortcuts into sb structure */ 505 __le16 *sb_index_values; 506 __le16 *sb_running_index; 507 /* chip independent shortcut into rx_prods_offset memory */ 508 u32 ustorm_rx_prods_offset; 509 --- 57 unchanged lines hidden (view full) --- 567 char name[FP_NAME_SIZE]; 568}; 569 570#define bnx2x_fp(bp, nr, var) ((bp)->fp[(nr)].var) 571#define bnx2x_sp_obj(bp, fp) ((bp)->sp_objs[(fp)->index]) 572#define bnx2x_fp_stats(bp, fp) (&((bp)->fp_stats[(fp)->index])) 573#define bnx2x_fp_qstats(bp, fp) (&((bp)->fp_stats[(fp)->index].eth_q_stats)) 574 |
575#ifdef CONFIG_NET_LL_RX_POLL | 575#ifdef CONFIG_NET_RX_BUSY_POLL |
576static inline void bnx2x_fp_init_lock(struct bnx2x_fastpath *fp) 577{ 578 spin_lock_init(&fp->lock); 579 fp->state = BNX2X_FP_STATE_IDLE; 580} 581 582/* called from the device poll routine to get ownership of a FP */ 583static inline bool bnx2x_fp_lock_napi(struct bnx2x_fastpath *fp) --- 91 unchanged lines hidden (view full) --- 675{ 676 return false; 677} 678 679static inline bool bnx2x_fp_ll_polling(struct bnx2x_fastpath *fp) 680{ 681 return false; 682} | 576static inline void bnx2x_fp_init_lock(struct bnx2x_fastpath *fp) 577{ 578 spin_lock_init(&fp->lock); 579 fp->state = BNX2X_FP_STATE_IDLE; 580} 581 582/* called from the device poll routine to get ownership of a FP */ 583static inline bool bnx2x_fp_lock_napi(struct bnx2x_fastpath *fp) --- 91 unchanged lines hidden (view full) --- 675{ 676 return false; 677} 678 679static inline bool bnx2x_fp_ll_polling(struct bnx2x_fastpath *fp) 680{ 681 return false; 682} |
683#endif /* CONFIG_NET_LL_RX_POLL */ | 683#endif /* CONFIG_NET_RX_BUSY_POLL */ |
684 685/* Use 2500 as a mini-jumbo MTU for FCoE */ 686#define BNX2X_FCOE_MINI_JUMBO_MTU 2500 687 688#define FCOE_IDX_OFFSET 0 689 690#define FCOE_IDX(bp) (BNX2X_NUM_NON_CNIC_QUEUES(bp) + \ 691 FCOE_IDX_OFFSET) --- 1763 unchanged lines hidden --- | 684 685/* Use 2500 as a mini-jumbo MTU for FCoE */ 686#define BNX2X_FCOE_MINI_JUMBO_MTU 2500 687 688#define FCOE_IDX_OFFSET 0 689 690#define FCOE_IDX(bp) (BNX2X_NUM_NON_CNIC_QUEUES(bp) + \ 691 FCOE_IDX_OFFSET) --- 1763 unchanged lines hidden --- |