Commit d113efb1 authored by Gerhard Engleder's avatar Gerhard Engleder Committed by David S. Miller

tsnep: Record RX queue

Other drivers record RX queue so it should make sense to do that also.
Signed-off-by: default avatarGerhard Engleder <gerhard@engleder-embedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17531519
...@@ -87,6 +87,7 @@ struct tsnep_rx_entry { ...@@ -87,6 +87,7 @@ struct tsnep_rx_entry {
struct tsnep_rx { struct tsnep_rx {
struct tsnep_adapter *adapter; struct tsnep_adapter *adapter;
void __iomem *addr; void __iomem *addr;
int queue_index;
void *page[TSNEP_RING_PAGE_COUNT]; void *page[TSNEP_RING_PAGE_COUNT];
dma_addr_t page_dma[TSNEP_RING_PAGE_COUNT]; dma_addr_t page_dma[TSNEP_RING_PAGE_COUNT];
......
...@@ -749,6 +749,7 @@ static int tsnep_rx_poll(struct tsnep_rx *rx, struct napi_struct *napi, ...@@ -749,6 +749,7 @@ static int tsnep_rx_poll(struct tsnep_rx *rx, struct napi_struct *napi,
hwtstamps->netdev_data = rx_inline; hwtstamps->netdev_data = rx_inline;
} }
skb_pull(skb, TSNEP_RX_INLINE_METADATA_SIZE); skb_pull(skb, TSNEP_RX_INLINE_METADATA_SIZE);
skb_record_rx_queue(skb, rx->queue_index);
skb->protocol = eth_type_trans(skb, skb->protocol = eth_type_trans(skb,
rx->adapter->netdev); rx->adapter->netdev);
...@@ -783,7 +784,7 @@ static int tsnep_rx_poll(struct tsnep_rx *rx, struct napi_struct *napi, ...@@ -783,7 +784,7 @@ static int tsnep_rx_poll(struct tsnep_rx *rx, struct napi_struct *napi,
} }
static int tsnep_rx_open(struct tsnep_adapter *adapter, void __iomem *addr, static int tsnep_rx_open(struct tsnep_adapter *adapter, void __iomem *addr,
struct tsnep_rx *rx) int queue_index, struct tsnep_rx *rx)
{ {
dma_addr_t dma; dma_addr_t dma;
int i; int i;
...@@ -792,6 +793,7 @@ static int tsnep_rx_open(struct tsnep_adapter *adapter, void __iomem *addr, ...@@ -792,6 +793,7 @@ static int tsnep_rx_open(struct tsnep_adapter *adapter, void __iomem *addr,
memset(rx, 0, sizeof(*rx)); memset(rx, 0, sizeof(*rx));
rx->adapter = adapter; rx->adapter = adapter;
rx->addr = addr; rx->addr = addr;
rx->queue_index = queue_index;
retval = tsnep_rx_ring_init(rx); retval = tsnep_rx_ring_init(rx);
if (retval) if (retval)
...@@ -878,6 +880,7 @@ static int tsnep_netdev_open(struct net_device *netdev) ...@@ -878,6 +880,7 @@ static int tsnep_netdev_open(struct net_device *netdev)
if (adapter->queue[i].rx) { if (adapter->queue[i].rx) {
addr = adapter->addr + TSNEP_QUEUE(rx_queue_index); addr = adapter->addr + TSNEP_QUEUE(rx_queue_index);
retval = tsnep_rx_open(adapter, addr, retval = tsnep_rx_open(adapter, addr,
rx_queue_index,
adapter->queue[i].rx); adapter->queue[i].rx);
if (retval) if (retval)
goto failed; goto failed;
......
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