Commit 63544e9c authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

ixgbe: Move all values that deal with count, next_to_use, next_to_clean to u16

This change updates all values dealing with count, next_to_use, and
next_to_clean so that they stay u16 values.  The advantage of this is that
there is no re-casting of type during the propagation through the stack.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 7d4987de
...@@ -6537,11 +6537,12 @@ static int ixgbe_tx_map(struct ixgbe_adapter *adapter, ...@@ -6537,11 +6537,12 @@ static int ixgbe_tx_map(struct ixgbe_adapter *adapter,
struct ixgbe_tx_buffer *tx_buffer_info; struct ixgbe_tx_buffer *tx_buffer_info;
unsigned int len; unsigned int len;
unsigned int total = skb->len; unsigned int total = skb->len;
unsigned int offset = 0, size, count = 0, i; unsigned int offset = 0, size, count = 0;
unsigned int nr_frags = skb_shinfo(skb)->nr_frags; unsigned int nr_frags = skb_shinfo(skb)->nr_frags;
unsigned int f; unsigned int f;
unsigned int bytecount = skb->len; unsigned int bytecount = skb->len;
u16 gso_segs = 1; u16 gso_segs = 1;
u16 i;
i = tx_ring->next_to_use; i = tx_ring->next_to_use;
...@@ -6807,7 +6808,7 @@ static void ixgbe_atr(struct ixgbe_ring *ring, struct sk_buff *skb, ...@@ -6807,7 +6808,7 @@ static void ixgbe_atr(struct ixgbe_ring *ring, struct sk_buff *skb,
input, common, ring->queue_index); input, common, ring->queue_index);
} }
static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, int size) static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size)
{ {
netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index); netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
/* Herbert's original patch had: /* Herbert's original patch had:
...@@ -6826,7 +6827,7 @@ static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, int size) ...@@ -6826,7 +6827,7 @@ static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, int size)
return 0; return 0;
} }
static int ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, int size) static int ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size)
{ {
if (likely(ixgbe_desc_unused(tx_ring) >= size)) if (likely(ixgbe_desc_unused(tx_ring) >= size))
return 0; return 0;
...@@ -6864,13 +6865,13 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, ...@@ -6864,13 +6865,13 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
struct ixgbe_adapter *adapter, struct ixgbe_adapter *adapter,
struct ixgbe_ring *tx_ring) struct ixgbe_ring *tx_ring)
{ {
unsigned int first;
unsigned int tx_flags = 0; unsigned int tx_flags = 0;
u8 hdr_len = 0;
int tso; int tso;
int count = 0; u16 count = 0;
u16 first;
unsigned int f; unsigned int f;
__be16 protocol; __be16 protocol;
u8 hdr_len = 0;
protocol = vlan_get_protocol(skb); protocol = vlan_get_protocol(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment