From: Vijayendra Suman <vijayendra.suman@oracle.com>
To: pabeni@redhat.com
Cc: a.fatoum@pengutronix.de, kernel@pengutronix.de,
linux-can@vger.kernel.org, netdev@vger.kernel.org,
somasundaram.krishnasamy@oracle.com,
ramanan.govindarajan@oracle.com,
Vijayendra Suman <vijayendra.suman@oracle.com>
Subject: Re: [BUG] pfifo_fast may cause out-of-order CAN frame transmission
Date: Wed, 7 Oct 2020 14:07:44 -0700 [thread overview]
Message-ID: <20201007210744.8546-1-vijayendra.suman@oracle.com> (raw)
In-Reply-To: <13e8950e8537e549f6afb6e254ec75a7462ce648.camel@redhat.com>
[PATCH] Patch with Network Performance Improvment qperf:tcp_lat
Check Performed for __QDISC_STATE_DEACTIVATED before checking BYPASS flag
qperf tcp_lat 65536bytes over an ib_switch
For 64K packet Performance improvment is around 47 % and performance deviation
is reduced to 5 % which was 27 % prior to this patch.
As mentioned by Paolo, With "net: dev: introduce support for sch BYPASS for lockless qdisc" commit
there may be out of order packet issue.
Is there any update to solve out of order packet issue.
qperf Counters for tcp_lat for 60 sec and packet size 64k
With Below Patch
1. 53817
2. 54100
3. 57016
4. 59410
5. 62017
6. 54625
7. 55770
8. 54015
9. 54406
10. 53137
Without Patch [Upstream Stream]
1. 83742
2. 107320
3. 82807
4. 105384
5. 77406
6. 132665
7. 117566
8. 109279
9. 94959
10. 82331
11. 91614
12. 104701
13. 91123
14. 93908
15. 200485
With UnRevert of commit 379349e9bc3b42b8b2f8f7a03f64a97623fff323
[Revert "net: dev: introduce support for sch BYPASS for lockless qdisc"]
1. 65550
2. 64285
3. 64110
4. 64300
5. 64645
6. 63928
7. 63574
8. 65024
9. 65153
10. 64281
Signed-off-by: Vijayendra Suman <vijayendra.suman@oracle.com>
---
net/core/dev.c | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 40bbb5e43f5d..6cc8e0209b20 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3384,35 +3384,27 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
struct net_device *dev,
struct netdev_queue *txq)
{
struct sk_buff *to_free = NULL;
bool contended;
- int rc;
+ int rc = NET_XMIT_SUCCESS;
qdisc_calculate_pkt_len(skb, q);
if (q->flags & TCQ_F_NOLOCK) {
- if ((q->flags & TCQ_F_CAN_BYPASS) && READ_ONCE(q->empty) &&
- qdisc_run_begin(q)) {
- if (unlikely(test_bit(__QDISC_STATE_DEACTIVATED,
- &q->state))) {
- __qdisc_drop(skb, &to_free);
- rc = NET_XMIT_DROP;
- goto end_run;
- }
- qdisc_bstats_cpu_update(q, skb);
-
- rc = NET_XMIT_SUCCESS;
+ if (unlikely(test_bit(__QDISC_STATE_DEACTIVATED, &q->state))) {
+ __qdisc_drop(skb, &to_free);
+ rc = NET_XMIT_DROP;
+ } else if ((q->flags & TCQ_F_CAN_BYPASS) && READ_ONCE(q->empty) &&
+ qdisc_run_begin(q)) {
+ qdisc_bstats_update(q, skb);
if (sch_direct_xmit(skb, q, dev, txq, NULL, true))
__qdisc_run(q);
-
-end_run:
qdisc_run_end(q);
} else {
rc = q->enqueue(skb, q, &to_free) & NET_XMIT_MASK;
qdisc_run(q);
}
-
if (unlikely(to_free))
kfree_skb_list(to_free);
return rc;
--
2.27.0
prev parent reply other threads:[~2020-10-07 21:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 14:55 [BUG] pfifo_fast may cause out-of-order CAN frame transmission Ahmad Fatoum
2020-01-09 12:51 ` Paolo Abeni
2020-01-09 17:39 ` Ahmad Fatoum
2020-01-10 16:31 ` Paolo Abeni
2020-01-12 21:29 ` Ahmad Fatoum
[not found] ` <57a2352dfc442ea2aa9cd653f8e09db277bf67c7.camel@redhat.com>
2020-01-20 16:06 ` Ahmad Fatoum
2020-02-04 16:25 ` Ahmad Fatoum
2020-02-06 13:21 ` Paolo Abeni
2020-02-06 17:06 ` Oliver Hartkopp
2020-02-14 16:03 ` Ahmad Fatoum
2020-10-07 21:07 ` Vijayendra Suman [this message]
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=20201007210744.8546-1-vijayendra.suman@oracle.com \
--to=vijayendra.suman@oracle.com \
--cc=a.fatoum@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ramanan.govindarajan@oracle.com \
--cc=somasundaram.krishnasamy@oracle.com \
/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).