From: <lironh@marvell.com>
To: <jerinj@marvell.com>
Cc: <dev@dpdk.org>, Liron Himi <lironh@marvell.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH v2 02/37] net/mvpp2: remove debug log on fast-path
Date: Fri, 22 Jan 2021 21:18:50 +0200 [thread overview]
Message-ID: <20210122191925.24308-3-lironh@marvell.com> (raw)
In-Reply-To: <20210122191925.24308-1-lironh@marvell.com>
From: Liron Himi <lironh@marvell.com>
In case of non-ip frame the current code reached the 'default'
case which result with function call to log a msg.
those kind of calls should not be performed on fast-path.
The performance for this kind of frames increased by 50%
Fixes: acab7d58c ("net/mvpp2: convert to dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: Liron Himi <lironh@marvell.com>
---
drivers/net/mvpp2/mrvl_ethdev.c | 27 ++++-----------------------
1 file changed, 4 insertions(+), 23 deletions(-)
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 93fb30cdb..bfe496ff7 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -2171,7 +2171,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
*l4_offset = *l3_offset + MRVL_ARP_LENGTH;
break;
default:
- MRVL_LOG(DEBUG, "Failed to recognise l3 packet type");
break;
}
@@ -2183,7 +2182,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
packet_type |= RTE_PTYPE_L4_UDP;
break;
default:
- MRVL_LOG(DEBUG, "Failed to recognise l4 packet type");
break;
}
@@ -2253,10 +2251,9 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
ret = pp2_ppio_recv(q->priv->ppio, q->priv->rxq_map[q->queue_id].tc,
q->priv->rxq_map[q->queue_id].inq, descs, &nb_pkts);
- if (unlikely(ret < 0)) {
- MRVL_LOG(ERR, "Failed to receive packets");
+ if (unlikely(ret < 0))
return 0;
- }
+
mrvl_port_bpool_size[bpool->pp2_id][bpool->id][core_id] -= nb_pkts;
for (i = 0; i < nb_pkts; i++) {
@@ -2319,21 +2316,13 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
if (unlikely(num <= q->priv->bpool_min_size ||
(!rx_done && num < q->priv->bpool_init_size))) {
- ret = mrvl_fill_bpool(q, MRVL_BURST_SIZE);
- if (ret)
- MRVL_LOG(ERR, "Failed to fill bpool");
+ mrvl_fill_bpool(q, MRVL_BURST_SIZE);
} else if (unlikely(num > q->priv->bpool_max_size)) {
int i;
int pkt_to_remove = num - q->priv->bpool_init_size;
struct rte_mbuf *mbuf;
struct pp2_buff_inf buff;
- MRVL_LOG(DEBUG,
- "port-%d:%d: bpool %d oversize - remove %d buffers (pool size: %d -> %d)",
- bpool->pp2_id, q->priv->ppio->port_id,
- bpool->id, pkt_to_remove, num,
- q->priv->bpool_init_size);
-
for (i = 0; i < pkt_to_remove; i++) {
ret = pp2_bpool_get_buff(hif, bpool, &buff);
if (ret)
@@ -2526,12 +2515,8 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
sq, q->queue_id, 0);
sq_free_size = MRVL_PP2_TX_SHADOWQ_SIZE - sq->size - 1;
- if (unlikely(nb_pkts > sq_free_size)) {
- MRVL_LOG(DEBUG,
- "No room in shadow queue for %d packets! %d packets will be sent.",
- nb_pkts, sq_free_size);
+ if (unlikely(nb_pkts > sq_free_size))
nb_pkts = sq_free_size;
- }
for (i = 0; i < nb_pkts; i++) {
struct rte_mbuf *mbuf = tx_pkts[i];
@@ -2648,10 +2633,6 @@ mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,
*/
if (unlikely(total_descs > sq_free_size)) {
total_descs -= nb_segs;
- RTE_LOG(DEBUG, PMD,
- "No room in shadow queue for %d packets! "
- "%d packets will be sent.\n",
- nb_pkts, i);
break;
}
--
2.28.0
next prev parent reply other threads:[~2021-01-22 19:19 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201202101212.4717-1-lironh@marvell.com>
2020-12-02 10:11 ` [dpdk-stable] [PATCH v1 01/38] net/mvpp2: fix stack corruption lironh
2020-12-23 9:43 ` [dpdk-stable] [dpdk-dev] " Michael Shamis
2020-12-02 10:11 ` [dpdk-stable] [PATCH v1 02/38] net/mvpp2: remove debug log on fast-path lironh
2020-12-23 9:44 ` [dpdk-stable] [dpdk-dev] " Michael Shamis
2021-01-11 14:33 ` Jerin Jacob
2020-12-02 10:11 ` [dpdk-stable] [PATCH v1 03/38] net/mvpp2: fix rx/tx bytes statistics lironh
2020-12-23 9:43 ` [dpdk-stable] [dpdk-dev] " Michael Shamis
2020-12-02 10:11 ` [dpdk-stable] [PATCH v1 04/38] net/mvpp2: skip vlan flush lironh
2020-12-23 9:42 ` [dpdk-stable] [dpdk-dev] " Michael Shamis
2021-01-11 14:38 ` Jerin Jacob
2020-12-02 10:11 ` [dpdk-stable] [PATCH v1 05/38] net/mvpp2: remove CRC len from MRU validation lironh
2020-12-23 9:42 ` [dpdk-stable] [dpdk-dev] " Michael Shamis
2020-12-02 10:11 ` [dpdk-stable] [PATCH v1 06/38] net/mvpp2: fix frame size checking lironh
2020-12-23 9:42 ` [dpdk-stable] [dpdk-dev] " Michael Shamis
2020-12-02 10:11 ` [dpdk-stable] [PATCH v1 07/38] net/mvpp2: reduce prints on rx path lironh
2020-12-23 9:42 ` [dpdk-stable] [dpdk-dev] " Michael Shamis
2021-01-11 14:40 ` Jerin Jacob
[not found] ` <20210122191925.24308-1-lironh@marvell.com>
2021-01-22 19:18 ` [dpdk-stable] [PATCH v2 01/37] net/mvpp2: fix stack corruption lironh
2021-01-22 19:18 ` lironh [this message]
2021-01-22 19:18 ` [dpdk-stable] [PATCH v2 03/37] net/mvpp2: fix Rx/Tx bytes statistics lironh
2021-01-26 17:02 ` Ferruh Yigit
2021-01-26 17:25 ` [dpdk-stable] [EXT] " Liron Himi
2021-01-26 17:29 ` Ferruh Yigit
2021-01-22 19:18 ` [dpdk-stable] [PATCH v2 04/37] net/mvpp2: remove VLAN flush lironh
2021-01-22 19:18 ` [dpdk-stable] [PATCH v2 05/37] net/mvpp2: remove CRC len from MRU validation lironh
2021-01-22 19:18 ` [dpdk-stable] [PATCH v2 06/37] net/mvpp2: fix frame size checking lironh
[not found] ` <20210127160948.6008-1-lironh@marvell.com>
2021-01-27 16:09 ` [dpdk-stable] [PATCH v3 01/34] net/mvpp2: fix stack corruption lironh
2021-01-27 16:09 ` [dpdk-stable] [PATCH v3 02/34] net/mvpp2: remove debug log on fast-path lironh
2021-01-27 16:09 ` [dpdk-stable] [PATCH v3 03/34] net/mvpp2: remove VLAN flush lironh
2021-01-27 16:09 ` [dpdk-stable] [PATCH v3 04/34] net/mvpp2: remove CRC len from MRU validation lironh
2021-01-27 16:09 ` [dpdk-stable] [PATCH v3 05/34] net/mvpp2: fix frame size checking lironh
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=20210122191925.24308-3-lironh@marvell.com \
--to=lironh@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=stable@dpdk.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;
as well as URLs for NNTP newsgroup(s).