|
@@ -4974,6 +4974,7 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
|
|
struct igb_tx_buffer *first;
|
|
struct igb_tx_buffer *first;
|
|
int tso;
|
|
int tso;
|
|
u32 tx_flags = 0;
|
|
u32 tx_flags = 0;
|
|
|
|
+ unsigned short f;
|
|
u16 count = TXD_USE_COUNT(skb_headlen(skb));
|
|
u16 count = TXD_USE_COUNT(skb_headlen(skb));
|
|
__be16 protocol = vlan_get_protocol(skb);
|
|
__be16 protocol = vlan_get_protocol(skb);
|
|
u8 hdr_len = 0;
|
|
u8 hdr_len = 0;
|
|
@@ -4984,14 +4985,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
|
|
* + 1 desc for context descriptor,
|
|
* + 1 desc for context descriptor,
|
|
* otherwise try next time
|
|
* otherwise try next time
|
|
*/
|
|
*/
|
|
- if (NETDEV_FRAG_PAGE_MAX_SIZE > IGB_MAX_DATA_PER_TXD) {
|
|
|
|
- unsigned short f;
|
|
|
|
-
|
|
|
|
- for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
|
|
|
|
- count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
|
|
|
|
- } else {
|
|
|
|
- count += skb_shinfo(skb)->nr_frags;
|
|
|
|
- }
|
|
|
|
|
|
+ for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
|
|
|
|
+ count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
|
|
|
|
|
|
if (igb_maybe_stop_tx(tx_ring, count + 3)) {
|
|
if (igb_maybe_stop_tx(tx_ring, count + 3)) {
|
|
/* this is a hard error */
|
|
/* this is a hard error */
|