Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277537
b: refs/heads/master
c: e52fcb2
h: refs/heads/master
i:
  277535: 55b98b4
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 14, 2011
1 parent e4d5857 commit 3bbf5d3
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 170 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b2b5ce9d1ccf1c45f8ac68e5d901112ab76ba199
refs/heads/master: e52fcb2462ac484e6dd6e68869536609f0216938
30 changes: 23 additions & 7 deletions trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,13 @@ enum {
#define FCOE_TXQ_IDX(bp) (MAX_ETH_TXQ_IDX(bp))

/* fast path */
/*
* This driver uses new build_skb() API :
* RX ring buffer contains pointer to kmalloc() data only,
* skb are built only after Hardware filled the frame.
*/
struct sw_rx_bd {
struct sk_buff *skb;
u8 *data;
DEFINE_DMA_UNMAP_ADDR(mapping);
};

Expand Down Expand Up @@ -424,8 +429,8 @@ union host_hc_status_block {

struct bnx2x_agg_info {
/*
* First aggregation buffer is an skb, the following - are pages.
* We will preallocate the skbs for each aggregation when
* First aggregation buffer is a data buffer, the following - are pages.
* We will preallocate the data buffer for each aggregation when
* we open the interface and will replace the BD at the consumer
* with this one when we receive the TPA_START CQE in order to
* keep the Rx BD ring consistent.
Expand All @@ -439,6 +444,7 @@ struct bnx2x_agg_info {
u16 parsing_flags;
u16 vlan_tag;
u16 len_on_bd;
u32 rxhash;
};

#define Q_STATS_OFFSET32(stat_name) \
Expand Down Expand Up @@ -1187,10 +1193,20 @@ struct bnx2x {
#define ETH_MAX_JUMBO_PACKET_SIZE 9600

/* Max supported alignment is 256 (8 shift) */
#define BNX2X_RX_ALIGN_SHIFT ((L1_CACHE_SHIFT < 8) ? \
L1_CACHE_SHIFT : 8)
/* FW use 2 Cache lines Alignment for start packet and size */
#define BNX2X_FW_RX_ALIGN (2 << BNX2X_RX_ALIGN_SHIFT)
#define BNX2X_RX_ALIGN_SHIFT min(8, L1_CACHE_SHIFT)

/* FW uses 2 Cache lines Alignment for start packet and size
*
* We assume skb_build() uses sizeof(struct skb_shared_info) bytes
* at the end of skb->data, to avoid wasting a full cache line.
* This reduces memory use (skb->truesize).
*/
#define BNX2X_FW_RX_ALIGN_START (1UL << BNX2X_RX_ALIGN_SHIFT)

#define BNX2X_FW_RX_ALIGN_END \
max(1UL << BNX2X_RX_ALIGN_SHIFT, \
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))

#define BNX2X_PXP_DRAM_ALIGN (BNX2X_RX_ALIGN_SHIFT - 5)

struct host_sp_status_block *def_status_blk;
Expand Down
Loading

0 comments on commit 3bbf5d3

Please sign in to comment.