From: Eric Dumazet <eric.dumazet@gmail.com>
To: Sathya.Perla@Emulex.Com
Cc: jhautbois@gmail.com, netdev@vger.kernel.org
Subject: RE: Difficulties to get 1Gbps on be2net ethernet card
Date: Wed, 30 May 2012 12:30:57 +0200 [thread overview]
Message-ID: <1338373857.2760.150.camel@edumazet-glaptop> (raw)
In-Reply-To: <3367B80B08154D42A3B2BC708B5D41F647C678B73F@EXMAIL.ad.emulex.com>
On Wed, 2012-05-30 at 03:04 -0700, Sathya.Perla@Emulex.Com wrote:
> >-----Original Message-----
> >From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On
> >Behalf Of Jean-Michel Hautbois
> >
> >2012/5/30 Jean-Michel Hautbois <jhautbois@gmail.com>:
> >
> >I used vmstat in order to see the differences between the two kernels.
> >The main difference is the number of interrupts per second.
> >I have an average of 87500 on 3.2 and 7500 on 2.6, 10 times lower !
> >I suspect the be2net driver to be the main cause, and I checkes the
> >/proc/interrupts file in order to be sure.
> >
> >I have for eth1-tx on 2.6.26 about 2200 interrupts per second and 23000 on 3.2.
> >BTW, it is named eth1-q0 on 3.2 (and tx and rx are the same IRQ)
> >whereas there is eth1-rx0 and eth1-tx on 2.6.26.
>
> Yes, there is an issue with be2net interrupt mitigation in the recent code with
> RX and TX on the same Evt-Q (commit 10ef9ab4). The high interrupt rate happens when a TX blast is
> done while RX is relatively silent on a queue pair. Interrupt rate due to TX completions is not being
> mitigated.
>
> I have a fix and will send it out soon..
I also have a benet fix for non GRO :
Pulling 64 bytes in skb head is too much for TCP IPv4 with no
timestamps, as this makes splice() or TCP coalescing less effective.
(Having tcp payload in linear part of the skb disables various optims)
Could you please test it ?
Thanks
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 08efd30..f446b11 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1202,15 +1202,19 @@ static void skb_fill_rx_data(struct be_rx_obj *rxo, struct sk_buff *skb,
/* Copy data in the first descriptor of this completion */
curr_frag_len = min(rxcp->pkt_size, rx_frag_size);
- /* Copy the header portion into skb_data */
- hdr_len = min(BE_HDR_LEN, curr_frag_len);
+ /* If frame is small enough to fit in skb->head, pull it completely.
+ * If not, only pull ethernet header so that splice() or TCP coalesce
+ * are more efficient.
+ */
+ hdr_len = (curr_frag_len <= skb_tailroom(skb)) ?
+ curr_frag_len : ETH_HLEN;
+
memcpy(skb->data, start, hdr_len);
skb->len = curr_frag_len;
- if (curr_frag_len <= BE_HDR_LEN) { /* tiny packet */
+ skb->tail += hdr_len;
+ if (hdr_len == curr_frag_len) { /* tiny packet */
/* Complete packet has now been moved to data */
put_page(page_info->page);
- skb->data_len = 0;
- skb->tail += curr_frag_len;
} else {
skb_shinfo(skb)->nr_frags = 1;
skb_frag_set_page(skb, 0, page_info->page);
@@ -1219,7 +1223,6 @@ static void skb_fill_rx_data(struct be_rx_obj *rxo, struct sk_buff *skb,
skb_frag_size_set(&skb_shinfo(skb)->frags[0], curr_frag_len - hdr_len);
skb->data_len = curr_frag_len - hdr_len;
skb->truesize += rx_frag_size;
- skb->tail += hdr_len;
}
page_info->page = NULL;
next prev parent reply other threads:[~2012-05-30 10:31 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 14:46 Difficulties to get 1Gbps on be2net ethernet card Jean-Michel Hautbois
2012-05-30 6:28 ` Jean-Michel Hautbois
2012-05-30 6:48 ` Eric Dumazet
2012-05-30 6:51 ` Jean-Michel Hautbois
2012-05-30 7:06 ` Eric Dumazet
2012-05-30 7:25 ` Jean-Michel Hautbois
2012-05-30 9:40 ` Jean-Michel Hautbois
2012-05-30 9:56 ` Eric Dumazet
2012-05-30 10:06 ` Jean-Michel Hautbois
2012-05-30 10:04 ` Sathya.Perla
2012-05-30 10:07 ` Jean-Michel Hautbois
2012-06-06 10:04 ` Jean-Michel Hautbois
2012-06-06 11:01 ` Eric Dumazet
2012-06-06 12:34 ` Jean-Michel Hautbois
2012-06-06 13:07 ` Jean-Michel Hautbois
2012-06-06 14:36 ` Jean-Michel Hautbois
2012-06-07 12:27 ` Jean-Michel Hautbois
2012-06-07 12:31 ` Eric Dumazet
2012-06-07 12:54 ` Jean-Michel Hautbois
2012-06-08 6:08 ` Eric Dumazet
2012-06-08 8:14 ` Jean-Michel Hautbois
2012-06-08 8:22 ` Eric Dumazet
2012-06-08 14:53 ` Jean-Michel Hautbois
2012-06-12 8:24 ` Jean-Michel Hautbois
2012-06-12 8:55 ` Eric Dumazet
2012-06-12 9:01 ` Jean-Michel Hautbois
2012-06-12 9:06 ` Eric Dumazet
2012-06-12 9:10 ` Jean-Michel Hautbois
2012-05-30 10:30 ` Eric Dumazet [this message]
2012-05-30 11:10 ` Sathya.Perla
2012-05-31 6:54 ` Jean-Michel Hautbois
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=1338373857.2760.150.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=Sathya.Perla@Emulex.Com \
--cc=jhautbois@gmail.com \
--cc=netdev@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