aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/rx.c
diff options
context:
space:
mode:
authorAlex Maftei (amaftei) <amaftei@solarflare.com>2020-01-08 16:10:32 +0000
committerDavid S. Miller <davem@davemloft.net>2020-01-08 13:28:02 -0800
commite1253f391042e34de66faf7d499595c00f99a076 (patch)
treeee9afcfab438b6f9da3567822f543ed1e9088280 /drivers/net/ethernet/sfc/rx.c
parenthsr: fix dummy hsr_debugfs_rename() declaration (diff)
downloadlinux-dev-e1253f391042e34de66faf7d499595c00f99a076.tar.xz
linux-dev-e1253f391042e34de66faf7d499595c00f99a076.zip
sfc: add new headers in preparation for code split
New headers contain prototypes of functions that will be common between ef10 and upcoming driver. Removed static modifier from the affected functions. Some function prototypes were removed from existing headers. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/rx.c')
-rw-r--r--drivers/net/ethernet/sfc/rx.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
index c29bf862a94c..26b5c36237fe 100644
--- a/drivers/net/ethernet/sfc/rx.c
+++ b/drivers/net/ethernet/sfc/rx.c
@@ -21,6 +21,7 @@
#include <linux/bpf_trace.h>
#include "net_driver.h"
#include "efx.h"
+#include "rx_common.h"
#include "filter.h"
#include "nic.h"
#include "selftest.h"
@@ -77,15 +78,6 @@ static inline u32 efx_rx_buf_hash(struct efx_nic *efx, const u8 *eh)
#endif
}
-static inline struct efx_rx_buffer *
-efx_rx_buf_next(struct efx_rx_queue *rx_queue, struct efx_rx_buffer *rx_buf)
-{
- if (unlikely(rx_buf == efx_rx_buffer(rx_queue, rx_queue->ptr_mask)))
- return efx_rx_buffer(rx_queue, 0);
- else
- return rx_buf + 1;
-}
-
static inline void efx_sync_rx_buffer(struct efx_nic *efx,
struct efx_rx_buffer *rx_buf,
unsigned int len)
@@ -152,7 +144,7 @@ static struct page *efx_reuse_page(struct efx_rx_queue *rx_queue)
* 0 on success. If a single page can be used for multiple buffers,
* then the page will either be inserted fully, or not at all.
*/
-static int efx_init_rx_buffers(struct efx_rx_queue *rx_queue, bool atomic)
+int efx_init_rx_buffers(struct efx_rx_queue *rx_queue, bool atomic)
{
struct efx_nic *efx = rx_queue->efx;
struct efx_rx_buffer *rx_buf;
@@ -215,8 +207,8 @@ static int efx_init_rx_buffers(struct efx_rx_queue *rx_queue, bool atomic)
/* Unmap a DMA-mapped page. This function is only called for the final RX
* buffer in a page.
*/
-static void efx_unmap_rx_buffer(struct efx_nic *efx,
- struct efx_rx_buffer *rx_buf)
+void efx_unmap_rx_buffer(struct efx_nic *efx,
+ struct efx_rx_buffer *rx_buf)
{
struct page *page = rx_buf->page;
@@ -229,9 +221,9 @@ static void efx_unmap_rx_buffer(struct efx_nic *efx,
}
}
-static void efx_free_rx_buffers(struct efx_rx_queue *rx_queue,
- struct efx_rx_buffer *rx_buf,
- unsigned int num_bufs)
+void efx_free_rx_buffers(struct efx_rx_queue *rx_queue,
+ struct efx_rx_buffer *rx_buf,
+ unsigned int num_bufs)
{
do {
if (rx_buf->page) {