Lines Matching refs:rx

883 static void tsnep_rx_ring_cleanup(struct tsnep_rx *rx)  in tsnep_rx_ring_cleanup()  argument
885 struct device *dmadev = rx->adapter->dmadev; in tsnep_rx_ring_cleanup()
890 entry = &rx->entry[i]; in tsnep_rx_ring_cleanup()
891 if (!rx->xsk_pool && entry->page) in tsnep_rx_ring_cleanup()
892 page_pool_put_full_page(rx->page_pool, entry->page, in tsnep_rx_ring_cleanup()
894 if (rx->xsk_pool && entry->xdp) in tsnep_rx_ring_cleanup()
900 if (rx->page_pool) in tsnep_rx_ring_cleanup()
901 page_pool_destroy(rx->page_pool); in tsnep_rx_ring_cleanup()
903 memset(rx->entry, 0, sizeof(rx->entry)); in tsnep_rx_ring_cleanup()
906 if (rx->page[i]) { in tsnep_rx_ring_cleanup()
907 dma_free_coherent(dmadev, PAGE_SIZE, rx->page[i], in tsnep_rx_ring_cleanup()
908 rx->page_dma[i]); in tsnep_rx_ring_cleanup()
909 rx->page[i] = NULL; in tsnep_rx_ring_cleanup()
910 rx->page_dma[i] = 0; in tsnep_rx_ring_cleanup()
915 static int tsnep_rx_ring_create(struct tsnep_rx *rx) in tsnep_rx_ring_create() argument
917 struct device *dmadev = rx->adapter->dmadev; in tsnep_rx_ring_create()
925 rx->page[i] = in tsnep_rx_ring_create()
926 dma_alloc_coherent(dmadev, PAGE_SIZE, &rx->page_dma[i], in tsnep_rx_ring_create()
928 if (!rx->page[i]) { in tsnep_rx_ring_create()
933 entry = &rx->entry[TSNEP_RING_ENTRIES_PER_PAGE * i + j]; in tsnep_rx_ring_create()
935 (((u8 *)rx->page[i]) + TSNEP_DESC_SIZE * j); in tsnep_rx_ring_create()
938 entry->desc_dma = rx->page_dma[i] + TSNEP_DESC_SIZE * j; in tsnep_rx_ring_create()
950 rx->page_pool = page_pool_create(&pp_params); in tsnep_rx_ring_create()
951 if (IS_ERR(rx->page_pool)) { in tsnep_rx_ring_create()
952 retval = PTR_ERR(rx->page_pool); in tsnep_rx_ring_create()
953 rx->page_pool = NULL; in tsnep_rx_ring_create()
958 entry = &rx->entry[i]; in tsnep_rx_ring_create()
959 next_entry = &rx->entry[(i + 1) & TSNEP_RING_MASK]; in tsnep_rx_ring_create()
966 tsnep_rx_ring_cleanup(rx); in tsnep_rx_ring_create()
970 static void tsnep_rx_init(struct tsnep_rx *rx) in tsnep_rx_init() argument
974 dma = rx->entry[0].desc_dma | TSNEP_RESET_OWNER_COUNTER; in tsnep_rx_init()
975 iowrite32(DMA_ADDR_LOW(dma), rx->addr + TSNEP_RX_DESC_ADDR_LOW); in tsnep_rx_init()
976 iowrite32(DMA_ADDR_HIGH(dma), rx->addr + TSNEP_RX_DESC_ADDR_HIGH); in tsnep_rx_init()
977 rx->write = 0; in tsnep_rx_init()
978 rx->read = 0; in tsnep_rx_init()
979 rx->owner_counter = 1; in tsnep_rx_init()
980 rx->increment_owner_counter = TSNEP_RING_SIZE - 1; in tsnep_rx_init()
983 static void tsnep_rx_enable(struct tsnep_rx *rx) in tsnep_rx_enable() argument
988 iowrite32(TSNEP_CONTROL_RX_ENABLE, rx->addr + TSNEP_CONTROL); in tsnep_rx_enable()
991 static void tsnep_rx_disable(struct tsnep_rx *rx) in tsnep_rx_disable() argument
995 iowrite32(TSNEP_CONTROL_RX_DISABLE, rx->addr + TSNEP_CONTROL); in tsnep_rx_disable()
996 readx_poll_timeout(ioread32, rx->addr + TSNEP_CONTROL, val, in tsnep_rx_disable()
1001 static int tsnep_rx_desc_available(struct tsnep_rx *rx) in tsnep_rx_desc_available() argument
1003 if (rx->read <= rx->write) in tsnep_rx_desc_available()
1004 return TSNEP_RING_SIZE - rx->write + rx->read - 1; in tsnep_rx_desc_available()
1006 return rx->read - rx->write - 1; in tsnep_rx_desc_available()
1009 static void tsnep_rx_free_page_buffer(struct tsnep_rx *rx) in tsnep_rx_free_page_buffer() argument
1016 page = rx->page_buffer; in tsnep_rx_free_page_buffer()
1018 page_pool_put_full_page(rx->page_pool, *page, false); in tsnep_rx_free_page_buffer()
1024 static int tsnep_rx_alloc_page_buffer(struct tsnep_rx *rx) in tsnep_rx_alloc_page_buffer() argument
1032 rx->page_buffer[i] = page_pool_dev_alloc_pages(rx->page_pool); in tsnep_rx_alloc_page_buffer()
1033 if (!rx->page_buffer[i]) { in tsnep_rx_alloc_page_buffer()
1034 tsnep_rx_free_page_buffer(rx); in tsnep_rx_alloc_page_buffer()
1043 static void tsnep_rx_set_page(struct tsnep_rx *rx, struct tsnep_rx_entry *entry, in tsnep_rx_set_page() argument
1049 entry->desc->rx = __cpu_to_le64(entry->dma + TSNEP_RX_OFFSET); in tsnep_rx_set_page()
1052 static int tsnep_rx_alloc_buffer(struct tsnep_rx *rx, int index) in tsnep_rx_alloc_buffer() argument
1054 struct tsnep_rx_entry *entry = &rx->entry[index]; in tsnep_rx_alloc_buffer()
1057 page = page_pool_dev_alloc_pages(rx->page_pool); in tsnep_rx_alloc_buffer()
1060 tsnep_rx_set_page(rx, entry, page); in tsnep_rx_alloc_buffer()
1065 static void tsnep_rx_reuse_buffer(struct tsnep_rx *rx, int index) in tsnep_rx_reuse_buffer() argument
1067 struct tsnep_rx_entry *entry = &rx->entry[index]; in tsnep_rx_reuse_buffer()
1068 struct tsnep_rx_entry *read = &rx->entry[rx->read]; in tsnep_rx_reuse_buffer()
1070 tsnep_rx_set_page(rx, entry, read->page); in tsnep_rx_reuse_buffer()
1074 static void tsnep_rx_activate(struct tsnep_rx *rx, int index) in tsnep_rx_activate() argument
1076 struct tsnep_rx_entry *entry = &rx->entry[index]; in tsnep_rx_activate()
1081 if (index == rx->increment_owner_counter) { in tsnep_rx_activate()
1082 rx->owner_counter++; in tsnep_rx_activate()
1083 if (rx->owner_counter == 4) in tsnep_rx_activate()
1084 rx->owner_counter = 1; in tsnep_rx_activate()
1085 rx->increment_owner_counter--; in tsnep_rx_activate()
1086 if (rx->increment_owner_counter < 0) in tsnep_rx_activate()
1087 rx->increment_owner_counter = TSNEP_RING_SIZE - 1; in tsnep_rx_activate()
1090 (rx->owner_counter << TSNEP_DESC_OWNER_COUNTER_SHIFT) & in tsnep_rx_activate()
1101 static int tsnep_rx_alloc(struct tsnep_rx *rx, int count, bool reuse) in tsnep_rx_alloc() argument
1107 index = (rx->write + i) & TSNEP_RING_MASK; in tsnep_rx_alloc()
1109 if (unlikely(tsnep_rx_alloc_buffer(rx, index))) { in tsnep_rx_alloc()
1110 rx->alloc_failed++; in tsnep_rx_alloc()
1115 tsnep_rx_reuse_buffer(rx, index); in tsnep_rx_alloc()
1120 tsnep_rx_activate(rx, index); in tsnep_rx_alloc()
1124 rx->write = (rx->write + i) & TSNEP_RING_MASK; in tsnep_rx_alloc()
1129 static int tsnep_rx_refill(struct tsnep_rx *rx, int count, bool reuse) in tsnep_rx_refill() argument
1133 desc_refilled = tsnep_rx_alloc(rx, count, reuse); in tsnep_rx_refill()
1135 tsnep_rx_enable(rx); in tsnep_rx_refill()
1140 static void tsnep_rx_set_xdp(struct tsnep_rx *rx, struct tsnep_rx_entry *entry, in tsnep_rx_set_xdp() argument
1146 entry->desc->rx = __cpu_to_le64(entry->dma); in tsnep_rx_set_xdp()
1149 static void tsnep_rx_reuse_buffer_zc(struct tsnep_rx *rx, int index) in tsnep_rx_reuse_buffer_zc() argument
1151 struct tsnep_rx_entry *entry = &rx->entry[index]; in tsnep_rx_reuse_buffer_zc()
1152 struct tsnep_rx_entry *read = &rx->entry[rx->read]; in tsnep_rx_reuse_buffer_zc()
1154 tsnep_rx_set_xdp(rx, entry, read->xdp); in tsnep_rx_reuse_buffer_zc()
1158 static int tsnep_rx_alloc_zc(struct tsnep_rx *rx, int count, bool reuse) in tsnep_rx_alloc_zc() argument
1163 allocated = xsk_buff_alloc_batch(rx->xsk_pool, rx->xdp_batch, count); in tsnep_rx_alloc_zc()
1165 int index = (rx->write + i) & TSNEP_RING_MASK; in tsnep_rx_alloc_zc()
1166 struct tsnep_rx_entry *entry = &rx->entry[index]; in tsnep_rx_alloc_zc()
1168 tsnep_rx_set_xdp(rx, entry, rx->xdp_batch[i]); in tsnep_rx_alloc_zc()
1169 tsnep_rx_activate(rx, index); in tsnep_rx_alloc_zc()
1172 rx->alloc_failed++; in tsnep_rx_alloc_zc()
1175 tsnep_rx_reuse_buffer_zc(rx, rx->write); in tsnep_rx_alloc_zc()
1176 tsnep_rx_activate(rx, rx->write); in tsnep_rx_alloc_zc()
1181 rx->write = (rx->write + i) & TSNEP_RING_MASK; in tsnep_rx_alloc_zc()
1186 static void tsnep_rx_free_zc(struct tsnep_rx *rx) in tsnep_rx_free_zc() argument
1191 struct tsnep_rx_entry *entry = &rx->entry[i]; in tsnep_rx_free_zc()
1199 static int tsnep_rx_refill_zc(struct tsnep_rx *rx, int count, bool reuse) in tsnep_rx_refill_zc() argument
1203 desc_refilled = tsnep_rx_alloc_zc(rx, count, reuse); in tsnep_rx_refill_zc()
1205 tsnep_rx_enable(rx); in tsnep_rx_refill_zc()
1210 static bool tsnep_xdp_run_prog(struct tsnep_rx *rx, struct bpf_prog *prog, in tsnep_xdp_run_prog() argument
1225 if (!tsnep_xdp_xmit_back(rx->adapter, xdp, tx_nq, tx)) in tsnep_xdp_run_prog()
1230 if (xdp_do_redirect(rx->adapter->netdev, xdp, prog) < 0) in tsnep_xdp_run_prog()
1235 bpf_warn_invalid_xdp_action(rx->adapter->netdev, prog, act); in tsnep_xdp_run_prog()
1239 trace_xdp_exception(rx->adapter->netdev, prog, act); in tsnep_xdp_run_prog()
1248 page_pool_put_page(rx->page_pool, virt_to_head_page(xdp->data), in tsnep_xdp_run_prog()
1254 static bool tsnep_xdp_run_prog_zc(struct tsnep_rx *rx, struct bpf_prog *prog, in tsnep_xdp_run_prog_zc() argument
1265 if (xdp_do_redirect(rx->adapter->netdev, xdp, prog) < 0) in tsnep_xdp_run_prog_zc()
1275 if (!tsnep_xdp_xmit_back(rx->adapter, xdp, tx_nq, tx)) in tsnep_xdp_run_prog_zc()
1280 bpf_warn_invalid_xdp_action(rx->adapter->netdev, prog, act); in tsnep_xdp_run_prog_zc()
1284 trace_xdp_exception(rx->adapter->netdev, prog, act); in tsnep_xdp_run_prog_zc()
1305 static struct sk_buff *tsnep_build_skb(struct tsnep_rx *rx, struct page *page, in tsnep_build_skb() argument
1318 if (rx->adapter->hwtstamp_config.rx_filter == HWTSTAMP_FILTER_ALL) { in tsnep_build_skb()
1330 skb_record_rx_queue(skb, rx->queue_index); in tsnep_build_skb()
1331 skb->protocol = eth_type_trans(skb, rx->adapter->netdev); in tsnep_build_skb()
1336 static void tsnep_rx_page(struct tsnep_rx *rx, struct napi_struct *napi, in tsnep_rx_page() argument
1341 skb = tsnep_build_skb(rx, page, length); in tsnep_rx_page()
1345 rx->packets++; in tsnep_rx_page()
1346 rx->bytes += length; in tsnep_rx_page()
1348 rx->multicast++; in tsnep_rx_page()
1352 page_pool_recycle_direct(rx->page_pool, page); in tsnep_rx_page()
1354 rx->dropped++; in tsnep_rx_page()
1358 static int tsnep_rx_poll(struct tsnep_rx *rx, struct napi_struct *napi, in tsnep_rx_poll() argument
1361 struct device *dmadev = rx->adapter->dmadev; in tsnep_rx_poll()
1373 desc_available = tsnep_rx_desc_available(rx); in tsnep_rx_poll()
1374 dma_dir = page_pool_get_dma_dir(rx->page_pool); in tsnep_rx_poll()
1375 prog = READ_ONCE(rx->adapter->xdp_prog); in tsnep_rx_poll()
1377 tx_nq = netdev_get_tx_queue(rx->adapter->netdev, in tsnep_rx_poll()
1378 rx->tx_queue_index); in tsnep_rx_poll()
1379 tx = &rx->adapter->tx[rx->tx_queue_index]; in tsnep_rx_poll()
1381 xdp_init_buff(&xdp, PAGE_SIZE, &rx->xdp_rxq); in tsnep_rx_poll()
1384 while (likely(done < budget) && (rx->read != rx->write)) { in tsnep_rx_poll()
1385 entry = &rx->entry[rx->read]; in tsnep_rx_poll()
1395 desc_available -= tsnep_rx_refill(rx, desc_available, in tsnep_rx_poll()
1402 rx->read = (rx->read + 1) & TSNEP_RING_MASK; in tsnep_rx_poll()
1405 rx->dropped++; in tsnep_rx_poll()
1429 rx->read = (rx->read + 1) & TSNEP_RING_MASK; in tsnep_rx_poll()
1439 consume = tsnep_xdp_run_prog(rx, prog, &xdp, in tsnep_rx_poll()
1442 rx->packets++; in tsnep_rx_poll()
1443 rx->bytes += length; in tsnep_rx_poll()
1451 tsnep_rx_page(rx, napi, entry->page, length); in tsnep_rx_poll()
1456 tsnep_finalize_xdp(rx->adapter, xdp_status, tx_nq, tx); in tsnep_rx_poll()
1459 tsnep_rx_refill(rx, desc_available, false); in tsnep_rx_poll()
1464 static int tsnep_rx_poll_zc(struct tsnep_rx *rx, struct napi_struct *napi, in tsnep_rx_poll_zc() argument
1477 desc_available = tsnep_rx_desc_available(rx); in tsnep_rx_poll_zc()
1478 prog = READ_ONCE(rx->adapter->xdp_prog); in tsnep_rx_poll_zc()
1480 tx_nq = netdev_get_tx_queue(rx->adapter->netdev, in tsnep_rx_poll_zc()
1481 rx->tx_queue_index); in tsnep_rx_poll_zc()
1482 tx = &rx->adapter->tx[rx->tx_queue_index]; in tsnep_rx_poll_zc()
1485 while (likely(done < budget) && (rx->read != rx->write)) { in tsnep_rx_poll_zc()
1486 entry = &rx->entry[rx->read]; in tsnep_rx_poll_zc()
1496 desc_available -= tsnep_rx_refill_zc(rx, desc_available, in tsnep_rx_poll_zc()
1503 rx->read = (rx->read + 1) & TSNEP_RING_MASK; in tsnep_rx_poll_zc()
1506 rx->dropped++; in tsnep_rx_poll_zc()
1521 xsk_buff_dma_sync_for_cpu(entry->xdp, rx->xsk_pool); in tsnep_rx_poll_zc()
1530 rx->read = (rx->read + 1) & TSNEP_RING_MASK; in tsnep_rx_poll_zc()
1539 consume = tsnep_xdp_run_prog_zc(rx, prog, entry->xdp, in tsnep_rx_poll_zc()
1542 rx->packets++; in tsnep_rx_poll_zc()
1543 rx->bytes += length; in tsnep_rx_poll_zc()
1551 page = page_pool_dev_alloc_pages(rx->page_pool); in tsnep_rx_poll_zc()
1556 tsnep_rx_page(rx, napi, page, length); in tsnep_rx_poll_zc()
1558 rx->dropped++; in tsnep_rx_poll_zc()
1565 tsnep_finalize_xdp(rx->adapter, xdp_status, tx_nq, tx); in tsnep_rx_poll_zc()
1568 desc_available -= tsnep_rx_refill_zc(rx, desc_available, false); in tsnep_rx_poll_zc()
1570 if (xsk_uses_need_wakeup(rx->xsk_pool)) { in tsnep_rx_poll_zc()
1572 xsk_set_rx_need_wakeup(rx->xsk_pool); in tsnep_rx_poll_zc()
1574 xsk_clear_rx_need_wakeup(rx->xsk_pool); in tsnep_rx_poll_zc()
1582 static bool tsnep_rx_pending(struct tsnep_rx *rx) in tsnep_rx_pending() argument
1586 if (rx->read != rx->write) { in tsnep_rx_pending()
1587 entry = &rx->entry[rx->read]; in tsnep_rx_pending()
1597 static int tsnep_rx_open(struct tsnep_rx *rx) in tsnep_rx_open() argument
1602 retval = tsnep_rx_ring_create(rx); in tsnep_rx_open()
1606 tsnep_rx_init(rx); in tsnep_rx_open()
1608 desc_available = tsnep_rx_desc_available(rx); in tsnep_rx_open()
1609 if (rx->xsk_pool) in tsnep_rx_open()
1610 retval = tsnep_rx_alloc_zc(rx, desc_available, false); in tsnep_rx_open()
1612 retval = tsnep_rx_alloc(rx, desc_available, false); in tsnep_rx_open()
1622 if (rx->xsk_pool) { in tsnep_rx_open()
1623 retval = tsnep_rx_alloc_page_buffer(rx); in tsnep_rx_open()
1631 tsnep_rx_ring_cleanup(rx); in tsnep_rx_open()
1635 static void tsnep_rx_close(struct tsnep_rx *rx) in tsnep_rx_close() argument
1637 if (rx->xsk_pool) in tsnep_rx_close()
1638 tsnep_rx_free_page_buffer(rx); in tsnep_rx_close()
1640 tsnep_rx_ring_cleanup(rx); in tsnep_rx_close()
1643 static void tsnep_rx_reopen(struct tsnep_rx *rx) in tsnep_rx_reopen() argument
1645 struct page **page = rx->page_buffer; in tsnep_rx_reopen()
1648 tsnep_rx_init(rx); in tsnep_rx_reopen()
1651 struct tsnep_rx_entry *entry = &rx->entry[i]; in tsnep_rx_reopen()
1661 tsnep_rx_set_page(rx, entry, *page); in tsnep_rx_reopen()
1662 tsnep_rx_activate(rx, rx->write); in tsnep_rx_reopen()
1663 rx->write++; in tsnep_rx_reopen()
1671 static void tsnep_rx_reopen_xsk(struct tsnep_rx *rx) in tsnep_rx_reopen_xsk() argument
1673 struct page **page = rx->page_buffer; in tsnep_rx_reopen_xsk()
1677 tsnep_rx_init(rx); in tsnep_rx_reopen_xsk()
1683 allocated = xsk_buff_alloc_batch(rx->xsk_pool, rx->xdp_batch, in tsnep_rx_reopen_xsk()
1687 struct tsnep_rx_entry *entry = &rx->entry[i]; in tsnep_rx_reopen_xsk()
1706 tsnep_rx_set_xdp(rx, entry, in tsnep_rx_reopen_xsk()
1707 rx->xdp_batch[allocated - 1]); in tsnep_rx_reopen_xsk()
1708 tsnep_rx_activate(rx, rx->write); in tsnep_rx_reopen_xsk()
1709 rx->write++; in tsnep_rx_reopen_xsk()
1721 if (queue->rx && tsnep_rx_pending(queue->rx)) in tsnep_pending()
1741 if (queue->rx) { in tsnep_poll()
1742 done = queue->rx->xsk_pool ? in tsnep_poll()
1743 tsnep_rx_poll_zc(queue->rx, napi, budget) : in tsnep_poll()
1744 tsnep_rx_poll(queue->rx, napi, budget); in tsnep_poll()
1781 if (queue->tx && queue->rx) in tsnep_request_irq()
1783 queue->rx->queue_index); in tsnep_request_irq()
1789 queue->rx->queue_index); in tsnep_request_irq()
1821 struct tsnep_rx *rx = queue->rx; in tsnep_queue_close() local
1825 if (rx) { in tsnep_queue_close()
1826 if (xdp_rxq_info_is_reg(&rx->xdp_rxq)) in tsnep_queue_close()
1827 xdp_rxq_info_unreg(&rx->xdp_rxq); in tsnep_queue_close()
1828 if (xdp_rxq_info_is_reg(&rx->xdp_rxq_zc)) in tsnep_queue_close()
1829 xdp_rxq_info_unreg(&rx->xdp_rxq_zc); in tsnep_queue_close()
1838 struct tsnep_rx *rx = queue->rx; in tsnep_queue_open() local
1844 if (rx) { in tsnep_queue_open()
1847 rx->tx_queue_index = tx->queue_index; in tsnep_queue_open()
1848 else if (rx->queue_index < adapter->num_tx_queues) in tsnep_queue_open()
1849 rx->tx_queue_index = rx->queue_index; in tsnep_queue_open()
1851 rx->tx_queue_index = 0; in tsnep_queue_open()
1857 retval = xdp_rxq_info_reg(&rx->xdp_rxq, adapter->netdev, in tsnep_queue_open()
1858 rx->queue_index, queue->napi.napi_id); in tsnep_queue_open()
1861 retval = xdp_rxq_info_reg_mem_model(&rx->xdp_rxq, in tsnep_queue_open()
1863 rx->page_pool); in tsnep_queue_open()
1866 retval = xdp_rxq_info_reg(&rx->xdp_rxq_zc, adapter->netdev, in tsnep_queue_open()
1867 rx->queue_index, queue->napi.napi_id); in tsnep_queue_open()
1870 retval = xdp_rxq_info_reg_mem_model(&rx->xdp_rxq_zc, in tsnep_queue_open()
1875 if (rx->xsk_pool) in tsnep_queue_open()
1876 xsk_pool_set_rxq_info(rx->xsk_pool, &rx->xdp_rxq_zc); in tsnep_queue_open()
1902 if (queue->rx) in tsnep_queue_enable()
1903 tsnep_rx_enable(queue->rx); in tsnep_queue_enable()
1917 if (queue->rx) in tsnep_queue_disable()
1918 tsnep_rx_disable(queue->rx); in tsnep_queue_disable()
1932 if (adapter->queue[i].rx) { in tsnep_netdev_open()
1933 retval = tsnep_rx_open(adapter->queue[i].rx); in tsnep_netdev_open()
1968 if (adapter->queue[i].rx) in tsnep_netdev_open()
1969 tsnep_rx_close(adapter->queue[i].rx); in tsnep_netdev_open()
1989 if (adapter->queue[i].rx) in tsnep_netdev_close()
1990 tsnep_rx_close(adapter->queue[i].rx); in tsnep_netdev_close()
2007 queue->rx->page_buffer = kcalloc(TSNEP_RING_SIZE, in tsnep_enable_xsk()
2008 sizeof(*queue->rx->page_buffer), in tsnep_enable_xsk()
2010 if (!queue->rx->page_buffer) in tsnep_enable_xsk()
2012 queue->rx->xdp_batch = kcalloc(TSNEP_RING_SIZE, in tsnep_enable_xsk()
2013 sizeof(*queue->rx->xdp_batch), in tsnep_enable_xsk()
2015 if (!queue->rx->xdp_batch) { in tsnep_enable_xsk()
2016 kfree(queue->rx->page_buffer); in tsnep_enable_xsk()
2017 queue->rx->page_buffer = NULL; in tsnep_enable_xsk()
2022 xsk_pool_set_rxq_info(pool, &queue->rx->xdp_rxq_zc); in tsnep_enable_xsk()
2028 queue->rx->xsk_pool = pool; in tsnep_enable_xsk()
2031 tsnep_rx_reopen_xsk(queue->rx); in tsnep_enable_xsk()
2045 tsnep_rx_free_zc(queue->rx); in tsnep_disable_xsk()
2047 queue->rx->xsk_pool = NULL; in tsnep_disable_xsk()
2051 tsnep_rx_reopen(queue->rx); in tsnep_disable_xsk()
2055 kfree(queue->rx->xdp_batch); in tsnep_disable_xsk()
2056 queue->rx->xdp_batch = NULL; in tsnep_disable_xsk()
2057 kfree(queue->rx->page_buffer); in tsnep_disable_xsk()
2058 queue->rx->page_buffer = NULL; in tsnep_disable_xsk()
2113 stats->rx_packets += adapter->rx[i].packets; in tsnep_netdev_get_stats64()
2114 stats->rx_bytes += adapter->rx[i].bytes; in tsnep_netdev_get_stats64()
2115 stats->rx_dropped += adapter->rx[i].dropped; in tsnep_netdev_get_stats64()
2116 stats->multicast += adapter->rx[i].multicast; in tsnep_netdev_get_stats64()
2420 adapter->queue[0].rx = &adapter->rx[0]; in tsnep_queue_init()
2421 adapter->queue[0].rx->adapter = adapter; in tsnep_queue_init()
2422 adapter->queue[0].rx->addr = adapter->addr + TSNEP_QUEUE(0); in tsnep_queue_init()
2423 adapter->queue[0].rx->queue_index = 0; in tsnep_queue_init()
2451 adapter->queue[i].rx = &adapter->rx[i]; in tsnep_queue_init()
2452 adapter->queue[i].rx->adapter = adapter; in tsnep_queue_init()
2453 adapter->queue[i].rx->addr = adapter->addr + TSNEP_QUEUE(i); in tsnep_queue_init()
2454 adapter->queue[i].rx->queue_index = i; in tsnep_queue_init()