From: Michael Ellerman <michael@ellerman.id.au>
To: Anton Blanchard <anton@samba.org>
Cc: leitao@linux.vnet.ibm.com, netdev@vger.kernel.org
Subject: Re: [PATCH 2/14] ehea: Update multiqueue support
Date: Mon, 11 Apr 2011 11:13:26 +1000 [thread overview]
Message-ID: <1302484406.12482.19.camel@concordia> (raw)
In-Reply-To: <20110405212956.5eba3495@kryten>
[-- Attachment #1: Type: text/plain, Size: 2277 bytes --]
On Tue, 2011-04-05 at 21:29 +1000, Anton Blanchard wrote:
> The ehea driver had some multiqueue support but was missing the last
> few years of networking stack improvements:
...
> Index: linux-2.6/drivers/net/ehea/ehea_main.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/ehea/ehea_main.c 2011-04-05 20:34:36.300715364 +1000
> +++ linux-2.6/drivers/net/ehea/ehea_main.c 2011-04-05 20:35:36.703818722 +1000
> @@ -753,6 +753,8 @@ static int ehea_proc_rwqes(struct net_de
> skb_copy_to_linear_data(skb, ((char *)cqe) + 64,
> cqe->num_bytes_transfered - 4);
> ehea_fill_skb(dev, skb, cqe);
> + skb_record_rx_queue(skb,
> + pr - &pr->port->port_res[0]);
> } else if (rq == 2) {
> /* RQ2 */
> skb = get_skb_by_index(skb_arr_rq2,
> @@ -763,6 +765,8 @@ static int ehea_proc_rwqes(struct net_de
> break;
> }
> ehea_fill_skb(dev, skb, cqe);
> + skb_record_rx_queue(skb,
> + pr - &pr->port->port_res[0]);
> processed_rq2++;
> } else {
> /* RQ3 */
> @@ -774,6 +778,8 @@ static int ehea_proc_rwqes(struct net_de
> break;
> }
> ehea_fill_skb(dev, skb, cqe);
> + skb_record_rx_queue(skb,
> + pr - &pr->port->port_res[0]);
> processed_rq3++;
> }
>
Couldn't you call skb_record_rx_queue() in ehea_proc_skb() and save
replicating it three times?
> @@ -909,14 +916,16 @@ static struct ehea_cqe *ehea_proc_cqes(s
> ehea_update_feca(send_cq, cqe_counter);
> atomic_add(swqe_av, &pr->swqe_avail);
>
> - spin_lock_irqsave(&pr->netif_queue, flags);
> -
> - if (pr->queue_stopped && (atomic_read(&pr->swqe_avail)
> - >= pr->swqe_refill_th)) {
> - netif_wake_queue(pr->port->netdev);
> - pr->queue_stopped = 0;
> + if (unlikely(netif_tx_queue_stopped(txq) &&
> + (atomic_read(&pr->swqe_avail) >= pr->swqe_refill_th))) {
> + __netif_tx_lock(txq, smp_processor_id());
> + if (netif_tx_queue_stopped(txq) &&
> + (atomic_read(&pr->swqe_avail) >= pr->swqe_refill_th)) {
> + netif_tx_wake_queue(txq);
> + __netif_tx_unlock(txq);
> + }
> }
This potentially leaves the txq locked doesn't it, which I don't think
you want to do?
cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-04-11 1:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-05 11:28 [PATCH 1/14] ehea: Remove NETIF_F_LLTX Anton Blanchard
2011-04-05 11:29 ` [PATCH 2/14] ehea: Update multiqueue support Anton Blanchard
2011-04-11 1:13 ` Michael Ellerman [this message]
2011-04-05 11:30 ` [PATCH 3/14] ehea: Remove force_irq logic in napi poll routine Anton Blanchard
2011-04-05 11:32 ` [PATCH 4/14] ehea: Remove num_tx_qps module option Anton Blanchard
2011-04-05 11:33 ` [PATCH 5/14] ehea: Don't check NETIF_F_TSO in TX path Anton Blanchard
2011-04-05 11:35 ` [PATCH 6/14] ehea: Add vlan_features Anton Blanchard
2011-04-05 11:36 ` [PATCH 7/14] ehea: Allocate large enough skbs to avoid partial cacheline DMA writes Anton Blanchard
2011-04-05 11:39 ` [PATCH 8/14] ehea: Simplify ehea_xmit2 and ehea_xmit3 Anton Blanchard
2011-04-05 11:40 ` [PATCH 9/14] ehea: Merge swqe2 TSO and non TSO paths Anton Blanchard
2011-04-05 11:41 ` [PATCH 10/14] ehea: Simplify type 3 transmit routine Anton Blanchard
2011-04-05 11:41 ` [PATCH 11/14] ehea: Remove some unused definitions Anton Blanchard
2011-04-05 11:42 ` [PATCH 12/14] ehea: Add some more ethtool operations and 64bit stats Anton Blanchard
2011-04-05 13:07 ` Ben Hutchings
2011-04-05 21:35 ` Anton Blanchard
2011-04-05 11:43 ` [PATCH 13/14] ehea: Remove LRO support Anton Blanchard
2011-04-05 11:45 ` [PATCH 14/14] ehea: Add GRO support Anton Blanchard
2011-04-05 21:29 ` Jesse Gross
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=1302484406.12482.19.camel@concordia \
--to=michael@ellerman.id.au \
--cc=anton@samba.org \
--cc=leitao@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.