Commit 0a25d92c authored by Ioana Ciornei's avatar Ioana Ciornei Committed by David S. Miller

dpaa2-eth: use netif_receive_skb_list

Take advantage of the software Rx batching by using
netif_receive_skb_list instead of napi_gro_receive.
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6da88a82
...@@ -435,7 +435,7 @@ static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv, ...@@ -435,7 +435,7 @@ static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv,
percpu_stats->rx_packets++; percpu_stats->rx_packets++;
percpu_stats->rx_bytes += dpaa2_fd_get_len(fd); percpu_stats->rx_bytes += dpaa2_fd_get_len(fd);
napi_gro_receive(&ch->napi, skb); list_add_tail(&skb->list, ch->rx_list);
return; return;
...@@ -1108,12 +1108,16 @@ static int dpaa2_eth_poll(struct napi_struct *napi, int budget) ...@@ -1108,12 +1108,16 @@ static int dpaa2_eth_poll(struct napi_struct *napi, int budget)
struct dpaa2_eth_fq *fq, *txc_fq = NULL; struct dpaa2_eth_fq *fq, *txc_fq = NULL;
struct netdev_queue *nq; struct netdev_queue *nq;
int store_cleaned, work_done; int store_cleaned, work_done;
struct list_head rx_list;
int err; int err;
ch = container_of(napi, struct dpaa2_eth_channel, napi); ch = container_of(napi, struct dpaa2_eth_channel, napi);
ch->xdp.res = 0; ch->xdp.res = 0;
priv = ch->priv; priv = ch->priv;
INIT_LIST_HEAD(&rx_list);
ch->rx_list = &rx_list;
do { do {
err = pull_channel(ch); err = pull_channel(ch);
if (unlikely(err)) if (unlikely(err))
...@@ -1157,6 +1161,8 @@ static int dpaa2_eth_poll(struct napi_struct *napi, int budget) ...@@ -1157,6 +1161,8 @@ static int dpaa2_eth_poll(struct napi_struct *napi, int budget)
work_done = max(rx_cleaned, 1); work_done = max(rx_cleaned, 1);
out: out:
netif_receive_skb_list(ch->rx_list);
if (txc_fq && txc_fq->dq_frames) { if (txc_fq && txc_fq->dq_frames) {
nq = netdev_get_tx_queue(priv->net_dev, txc_fq->flowid); nq = netdev_get_tx_queue(priv->net_dev, txc_fq->flowid);
netdev_tx_completed_queue(nq, txc_fq->dq_frames, netdev_tx_completed_queue(nq, txc_fq->dq_frames,
......
...@@ -334,6 +334,7 @@ struct dpaa2_eth_channel { ...@@ -334,6 +334,7 @@ struct dpaa2_eth_channel {
struct dpaa2_eth_ch_stats stats; struct dpaa2_eth_ch_stats stats;
struct dpaa2_eth_ch_xdp xdp; struct dpaa2_eth_ch_xdp xdp;
struct xdp_rxq_info xdp_rxq; struct xdp_rxq_info xdp_rxq;
struct list_head *rx_list;
}; };
struct dpaa2_eth_dist_fields { struct dpaa2_eth_dist_fields {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment