From: Ioana Radulescu <ruxandra.radulescu@nxp.com>
To: <gregkh@linuxfoundation.org>
Cc: <devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>,
<bogdan.purcareata@nxp.com>
Subject: [PATCH 3/6] staging: fsl-dpaa2/eth: Add counter for skb reallocs
Date: Fri, 8 Dec 2017 06:47:55 -0600 [thread overview]
Message-ID: <20171208124758.2732-4-ruxandra.radulescu@nxp.com> (raw)
In-Reply-To: <20171208124758.2732-1-ruxandra.radulescu@nxp.com>
Add a counter for the number of egress frames that need to be
realloc'ed due to insufficient headroom space.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
---
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 1 +
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 1 +
drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
index 04db65c..6de6cdd 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
@@ -578,6 +578,7 @@ static netdev_tx_t dpaa2_eth_tx(struct sk_buff *skb, struct net_device *net_dev)
percpu_stats->tx_dropped++;
goto err_alloc_headroom;
}
+ percpu_extras->tx_reallocs++;
dev_kfree_skb(skb);
skb = ns;
}
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
index 63b09d1..6940a98 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
@@ -231,6 +231,7 @@ struct dpaa2_eth_drv_stats {
__u64 tx_conf_bytes;
__u64 tx_sg_frames;
__u64 tx_sg_bytes;
+ __u64 tx_reallocs;
__u64 rx_sg_frames;
__u64 rx_sg_bytes;
/* Enqueues retried due to portal busy */
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
index ebe8fd6..070a3f2 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
@@ -62,6 +62,7 @@ static char dpaa2_ethtool_extras[][ETH_GSTRING_LEN] = {
"[drv] tx conf bytes",
"[drv] tx sg frames",
"[drv] tx sg bytes",
+ "[drv] tx realloc frames",
"[drv] rx sg frames",
"[drv] rx sg bytes",
"[drv] enqueue portal busy",
--
2.7.4
next prev parent reply other threads:[~2017-12-08 12:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 12:47 [PATCH 0/6] staging: fsl-dpaa2/eth: Frame buffer optimizations Ioana Radulescu
2017-12-08 12:47 ` [PATCH 1/6] staging: fsl-dpaa2/eth: Fix access to FAS field Ioana Radulescu
2017-12-08 12:47 ` [PATCH 2/6] staging: fsl-dpaa2/eth: Don't set netdev->needed_headroom Ioana Radulescu
2017-12-08 12:47 ` Ioana Radulescu [this message]
2017-12-08 12:47 ` [PATCH 4/6] staging: fsl-dpaa2/eth: Don't enable FAS on Tx Ioana Radulescu
2017-12-08 12:47 ` [PATCH 5/6] staging: fsl-dpaa2/eth: Compute needed headroom per frame Ioana Radulescu
2017-12-08 12:47 ` [PATCH 6/6] staging: fsl-dpaa2/eth: Make Tx buffer alignment optional Ioana Radulescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171208124758.2732-4-ruxandra.radulescu@nxp.com \
--to=ruxandra.radulescu@nxp.com \
--cc=bogdan.purcareata@nxp.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®