Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162884
b: refs/heads/master
c: 07e3163
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Sep 15, 2009
1 parent f8df936 commit d996dc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 99455153d0670ba110e6a3b855b8369bcbd11120
refs/heads/master: 07e316377458484d95f7624f7af7af99d9bd18cb
10 changes: 6 additions & 4 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
#define RX_DEF_PENDING RX_MAX_PENDING

/* This is the worst case number of transmit list elements for a single skb:
VLAN + TSO + CKSUM + Data + skb_frags * DMA */
#define MAX_SKB_TX_LE (4 + (sizeof(dma_addr_t)/sizeof(u32))*MAX_SKB_FRAGS)
VLAN:GSO + CKSUM + Data + skb_frags * DMA */
#define MAX_SKB_TX_LE (2 + (sizeof(dma_addr_t)/sizeof(u32))*(MAX_SKB_FRAGS+1))
#define TX_MIN_PENDING (MAX_SKB_TX_LE+1)
#define TX_MAX_PENDING 4096
#define TX_DEF_PENDING 127
Expand Down Expand Up @@ -1567,11 +1567,13 @@ static unsigned tx_le_req(const struct sk_buff *skb)
{
unsigned count;

count = sizeof(dma_addr_t) / sizeof(u32);
count += skb_shinfo(skb)->nr_frags * count;
count = (skb_shinfo(skb)->nr_frags + 1)
* (sizeof(dma_addr_t) / sizeof(u32));

if (skb_is_gso(skb))
++count;
else if (sizeof(dma_addr_t) == sizeof(u32))
++count; /* possible vlan */

if (skb->ip_summed == CHECKSUM_PARTIAL)
++count;
Expand Down

0 comments on commit d996dc1

Please sign in to comment.