Skip to content

Commit 1751cc3

Browse files
amaftei-xilinxdavem330
authored andcommitted
sfc: move common rx code
The moved code deals with managing rx buffers and queues. A tiny bit of refactoring was required in other files to stitch the code together. Signed-off-by: Alexandru-Mihai Maftei <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5f99925 commit 1751cc3

File tree

6 files changed

+383
-375
lines changed

6 files changed

+383
-375
lines changed

drivers/net/ethernet/sfc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
sfc-y += efx.o efx_common.o efx_channels.o nic.o \
33
farch.o siena.o ef10.o \
4-
tx.o rx.o \
4+
tx.o rx.o rx_common.o \
55
selftest.o ethtool.o ptp.o tx_tso.o \
66
mcdi.o mcdi_port.o \
77
mcdi_mon.o

drivers/net/ethernet/sfc/ef10.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include "net_driver.h"
8+
#include "rx_common.h"
89
#include "ef10_regs.h"
910
#include "io.h"
1011
#include "mcdi.h"

drivers/net/ethernet/sfc/efx.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,6 @@ static int efx_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **xdpfs,
128128
ASSERT_RTNL(); \
129129
} while (0)
130130

131-
/**************************************************************************
132-
*
133-
* Channel handling
134-
*
135-
*************************************************************************/
136-
137-
void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue)
138-
{
139-
mod_timer(&rx_queue->slow_fill, jiffies + msecs_to_jiffies(10));
140-
}
141-
142131
/**************************************************************************
143132
*
144133
* Port handling

drivers/net/ethernet/sfc/efx.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ static inline void efx_rx_flush_packet(struct efx_channel *channel)
3737
__efx_rx_packet(channel);
3838
}
3939

40+
void efx_init_rx_recycle_ring(struct efx_rx_queue *rx_queue);
41+
struct page *efx_reuse_page(struct efx_rx_queue *rx_queue);
42+
4043
#define EFX_MAX_DMAQ_SIZE 4096UL
4144
#define EFX_DEFAULT_DMAQ_SIZE 1024UL
4245
#define EFX_MIN_DMAQ_SIZE 512UL

0 commit comments

Comments
 (0)