Skip to content

Commit

Permalink
Merge branch 'dpaa2-eth-small-updates'
Browse files Browse the repository at this point in the history
Ioana Ciornei says:

====================
dpaa2-eth: small updates

This patch set adds some updates to the dpaa2-eth driver: trimming of
the frame queue debugfs counters, cleanup of the remaining sparse
warnings and some other small fixes such as a recursive header include.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jun 25, 2020
2 parents 575691b + 05e1904 commit 1760421
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ static int dpaa2_dbg_fqs_show(struct seq_file *file, void *offset)
if (err)
fcnt = 0;

/* Skip FQs with no traffic */
if (!fq->stats.frames && !fcnt)
continue;

seq_printf(file, "%5d%16d%16d%16s%16llu%16u\n",
fq->fqid,
fq->target_cpu,
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include "dpaa2-eth.h"
#include <linux/tracepoint.h>

#define TR_FMT "[%s] fd: addr=0x%llx, len=%u, off=%u"
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,10 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv,

sg_init_table(scl, nr_frags + 1);
num_sg = skb_to_sgvec(skb, scl, 0, skb->len);
if (unlikely(num_sg < 0)) {
err = -ENOMEM;
goto dma_map_sg_failed;
}
num_dma_bufs = dma_map_sg(dev, scl, num_sg, DMA_BIDIRECTIONAL);
if (unlikely(!num_dma_bufs)) {
err = -ENOMEM;
Expand Down Expand Up @@ -1109,7 +1113,7 @@ static void drain_bufs(struct dpaa2_eth_priv *priv, int count)
buf_array, count);
if (ret < 0) {
if (ret == -EBUSY &&
retries++ >= DPAA2_ETH_SWP_BUSY_RETRIES)
retries++ < DPAA2_ETH_SWP_BUSY_RETRIES)
continue;
netdev_err(priv->net_dev, "dpaa2_io_service_acquire() failed\n");
return;
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/ethernet/freescale/dpaa2/dpni.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,10 +1558,10 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
* @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
* @token: Token of DPNI object
* @cg_point: Congestion point
* @q_type: Queue type on which the taildrop is configured.
* @qtype: Queue type on which the taildrop is configured.
* Only Rx queues are supported for now
* @tc: Traffic class to apply this taildrop to
* @q_index: Index of the queue if the DPNI supports multiple queues for
* @index: Index of the queue if the DPNI supports multiple queues for
* traffic distribution. Ignored if CONGESTION_POINT is not 0.
* @taildrop: Taildrop structure
*
Expand Down Expand Up @@ -1602,10 +1602,10 @@ int dpni_set_taildrop(struct fsl_mc_io *mc_io,
* @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
* @token: Token of DPNI object
* @cg_point: Congestion point
* @q_type: Queue type on which the taildrop is configured.
* @qtype: Queue type on which the taildrop is configured.
* Only Rx queues are supported for now
* @tc: Traffic class to apply this taildrop to
* @q_index: Index of the queue if the DPNI supports multiple queues for
* @index: Index of the queue if the DPNI supports multiple queues for
* traffic distribution. Ignored if CONGESTION_POINT is not 0.
* @taildrop: Taildrop structure
*
Expand Down

0 comments on commit 1760421

Please sign in to comment.