Skip to content

Commit 05ae861

Browse files
Björn TöpelJeff Kirsher
authored andcommitted
ixgbe: move common Tx functions to ixgbe_txrx_common.h
This patch prepares for the upcoming zero-copy Tx functionality by moving common functions used both by the regular path and zero-copy path. Signed-off-by: Björn Töpel <[email protected]> Tested-by: William Tu <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent d0bcacd commit 05ae861

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -895,8 +895,8 @@ static void ixgbe_set_ivar(struct ixgbe_adapter *adapter, s8 direction,
895895
}
896896
}
897897

898-
static inline void ixgbe_irq_rearm_queues(struct ixgbe_adapter *adapter,
899-
u64 qmask)
898+
void ixgbe_irq_rearm_queues(struct ixgbe_adapter *adapter,
899+
u64 qmask)
900900
{
901901
u32 mask;
902902

@@ -8154,9 +8154,6 @@ static inline int ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size)
81548154
return __ixgbe_maybe_stop_tx(tx_ring, size);
81558155
}
81568156

8157-
#define IXGBE_TXD_CMD (IXGBE_TXD_CMD_EOP | \
8158-
IXGBE_TXD_CMD_RS)
8159-
81608157
static int ixgbe_tx_map(struct ixgbe_ring *tx_ring,
81618158
struct ixgbe_tx_buffer *first,
81628159
const u8 hdr_len)
@@ -10257,7 +10254,7 @@ static int ixgbe_xdp(struct net_device *dev, struct netdev_bpf *xdp)
1025710254
}
1025810255
}
1025910256

10260-
static void ixgbe_xdp_ring_update_tail(struct ixgbe_ring *ring)
10257+
void ixgbe_xdp_ring_update_tail(struct ixgbe_ring *ring)
1026110258
{
1026210259
/* Force memory writes to complete before letting h/w know there
1026310260
* are new descriptors to fetch.

drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#define IXGBE_XDP_TX BIT(1)
1010
#define IXGBE_XDP_REDIR BIT(2)
1111

12+
#define IXGBE_TXD_CMD (IXGBE_TXD_CMD_EOP | \
13+
IXGBE_TXD_CMD_RS)
14+
1215
int ixgbe_xmit_xdp_ring(struct ixgbe_adapter *adapter,
1316
struct xdp_frame *xdpf);
1417
bool ixgbe_cleanup_headers(struct ixgbe_ring *rx_ring,
@@ -19,6 +22,8 @@ void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
1922
struct sk_buff *skb);
2023
void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector,
2124
struct sk_buff *skb);
25+
void ixgbe_xdp_ring_update_tail(struct ixgbe_ring *ring);
26+
void ixgbe_irq_rearm_queues(struct ixgbe_adapter *adapter, u64 qmask);
2227

2328
void ixgbe_txrx_ring_disable(struct ixgbe_adapter *adapter, int ring);
2429
void ixgbe_txrx_ring_enable(struct ixgbe_adapter *adapter, int ring);

0 commit comments

Comments
 (0)