mirror of
https://github.com/torvalds/linux.git
synced 2026-05-03 05:52:38 -04:00
Currently the driver attempts to wake the Tx queue for every descriptor processed. However, this is overkill and can cause thrashing since Tx xmit can be running concurrently on a different CPU than Tx clean. Fix this by refactoring Tx cq servicing into its own function so the Tx wake code can run after processing all Tx descriptors. The driver isn't using the expected memory barriers to make sure the stop/start bits are coherent. Fix this by making sure to use the correct memory barriers. Also, the driver is using the wake API during Tx xmit even though it's already scheduled. Fix this by using the start API during Tx xmit. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
21 lines
759 B
C
21 lines
759 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
|
|
|
|
#ifndef _IONIC_TXRX_H_
|
|
#define _IONIC_TXRX_H_
|
|
|
|
void ionic_tx_flush(struct ionic_cq *cq);
|
|
|
|
void ionic_rx_fill(struct ionic_queue *q);
|
|
void ionic_rx_empty(struct ionic_queue *q);
|
|
void ionic_tx_empty(struct ionic_queue *q);
|
|
int ionic_rx_napi(struct napi_struct *napi, int budget);
|
|
int ionic_tx_napi(struct napi_struct *napi, int budget);
|
|
int ionic_txrx_napi(struct napi_struct *napi, int budget);
|
|
netdev_tx_t ionic_start_xmit(struct sk_buff *skb, struct net_device *netdev);
|
|
|
|
bool ionic_rx_service(struct ionic_cq *cq, struct ionic_cq_info *cq_info);
|
|
|
|
int ionic_xdp_xmit(struct net_device *netdev, int n, struct xdp_frame **xdp, u32 flags);
|
|
#endif /* _IONIC_TXRX_H_ */
|