amd-xgbe: Simplify the Rx desciptor ring tracking
Make the Rx descriptor ring processing similar to the Tx descriptor ring processing. Remove the realloc_index and realloc_threshold variables and base everything on the current index counter and the dirty index counter. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
916102c666
commit
270894e7dc
@@ -361,8 +361,7 @@ struct xgbe_ring {
|
||||
* cur - Tx: index of descriptor to be used for current transfer
|
||||
* Rx: index of descriptor to check for packet availability
|
||||
* dirty - Tx: index of descriptor to check for transfer complete
|
||||
* Rx: count of descriptors in which a packet has been received
|
||||
* (used with skb_realloc_index to refresh the ring)
|
||||
* Rx: index of descriptor to check for buffer reallocation
|
||||
*/
|
||||
unsigned int cur;
|
||||
unsigned int dirty;
|
||||
@@ -377,11 +376,6 @@ struct xgbe_ring {
|
||||
unsigned short cur_mss;
|
||||
unsigned short cur_vlan_ctag;
|
||||
} tx;
|
||||
|
||||
struct {
|
||||
unsigned int realloc_index;
|
||||
unsigned int realloc_threshold;
|
||||
} rx;
|
||||
};
|
||||
} ____cacheline_aligned;
|
||||
|
||||
@@ -596,7 +590,8 @@ struct xgbe_desc_if {
|
||||
int (*alloc_ring_resources)(struct xgbe_prv_data *);
|
||||
void (*free_ring_resources)(struct xgbe_prv_data *);
|
||||
int (*map_tx_skb)(struct xgbe_channel *, struct sk_buff *);
|
||||
void (*realloc_rx_buffer)(struct xgbe_channel *);
|
||||
int (*map_rx_buffer)(struct xgbe_prv_data *, struct xgbe_ring *,
|
||||
struct xgbe_ring_data *);
|
||||
void (*unmap_rdata)(struct xgbe_prv_data *, struct xgbe_ring_data *);
|
||||
void (*wrapper_tx_desc_init)(struct xgbe_prv_data *);
|
||||
void (*wrapper_rx_desc_init)(struct xgbe_prv_data *);
|
||||
|
Reference in New Issue
Block a user