From: Evgeniy Polyakov <johnpol@2ka•mipt.ru>
To: Krishna Kumar <krkumar2@in•ibm.com>
Cc: jagana@us•ibm.com, Robert.Olsson@data•slu.se,
peter.p.waskiewicz.jr@intel•com, herbert@gondor•apana.org.au,
gaagaan@gmail•com, kumarkr@linux•ibm.com, rdreier@cisco•com,
hadi@cyberus•ca, netdev@vger•kernel.org, kaber@trash•net,
randy.dunlap@oracle•com, jeff@garzik•org,
general@lists•openfabrics.org, mchan@broadcom•com, tgraf@suug•ch,
mcarlson@broadcom•com, sri@us•ibm.com,
shemminger@linux-foundation•org, davem@davemloft•net
Subject: [ofa-general] Re: [PATCH 10/10 REV5] [E1000] Implement batching
Date: Fri, 14 Sep 2007 16:47:14 +0400 [thread overview]
Message-ID: <20070914124714.GD18517@2ka.mipt.ru> (raw)
In-Reply-To: <20070914090442.17589.23005.sendpatchset@K50wks273871wss.in.ibm.com>
On Fri, Sep 14, 2007 at 02:34:42PM +0530, Krishna Kumar (krkumar2@in•ibm.com) wrote:
> @@ -3276,7 +3282,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
>
> if (unlikely(skb->len <= 0)) {
> dev_kfree_skb_any(skb);
> - return NETDEV_TX_OK;
> + return NETDEV_TX_DROPPED;
> }
This changes could actually go as own patch, although not sure it is
ever used. just a though, not a stopper.
> /* 82571 and newer doesn't need the workaround that limited descriptor
> @@ -3322,7 +3328,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
> DPRINTK(DRV, ERR,
> "__pskb_pull_tail failed.\n");
> dev_kfree_skb_any(skb);
> - return NETDEV_TX_OK;
> + return NETDEV_TX_DROPPED;
> }
> len = skb->len - skb->data_len;
> break;
> @@ -3366,22 +3372,15 @@ e1000_xmit_frame(struct sk_buff *skb, st
> (adapter->hw.mac_type == e1000_82573))
> e1000_transfer_dhcp_info(adapter, skb);
>
> - if (!spin_trylock_irqsave(&tx_ring->tx_lock, flags))
> - /* Collision - tell upper layer to requeue */
> - return NETDEV_TX_LOCKED;
> -
> /* need: count + 2 desc gap to keep tail from touching
> * head, otherwise try next time */
> - if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2))) {
> - spin_unlock_irqrestore(&tx_ring->tx_lock, flags);
> + if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2)))
> return NETDEV_TX_BUSY;
> - }
>
> if (unlikely(adapter->hw.mac_type == e1000_82547)) {
> if (unlikely(e1000_82547_fifo_workaround(adapter, skb))) {
> netif_stop_queue(netdev);
> mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1);
> - spin_unlock_irqrestore(&tx_ring->tx_lock, flags);
> return NETDEV_TX_BUSY;
> }
> }
> @@ -3396,8 +3395,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
> tso = e1000_tso(adapter, tx_ring, skb);
> if (tso < 0) {
> dev_kfree_skb_any(skb);
> - spin_unlock_irqrestore(&tx_ring->tx_lock, flags);
> - return NETDEV_TX_OK;
> + return NETDEV_TX_DROPPED;
> }
>
> if (likely(tso)) {
> @@ -3416,13 +3414,61 @@ e1000_xmit_frame(struct sk_buff *skb, st
> e1000_tx_map(adapter, tx_ring, skb, first,
> max_per_txd, nr_frags, mss));
>
> - netdev->trans_start = jiffies;
> + return NETDEV_TX_OK;
> +}
> +
> +static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
> +{
> + struct e1000_adapter *adapter = netdev_priv(netdev);
> + struct e1000_tx_ring *tx_ring = adapter->tx_ring;
> + struct sk_buff_head *blist;
> + int ret, skbs_done = 0;
> + unsigned long flags;
> +
> + if (!spin_trylock_irqsave(&tx_ring->tx_lock, flags)) {
> + /* Collision - tell upper layer to requeue */
> + return NETDEV_TX_LOCKED;
> + }
>
> - /* Make sure there is space in the ring for the next send. */
> - e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2);
> + blist = netdev->skb_blist;
> +
> + if (!skb || (blist && skb_queue_len(blist))) {
> + /*
> + * Either batching xmit call, or single skb case but there are
> + * skbs already in the batch list from previous failure to
> + * xmit - send the earlier skbs first to avoid out of order.
> + */
> + if (skb)
> + __skb_queue_tail(blist, skb);
> + skb = __skb_dequeue(blist);
Why is it put at the end?
--
Evgeniy Polyakov
next prev parent reply other threads:[~2007-09-14 12:47 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-14 9:00 [PATCH 0/10 REV5] Implement skb batching and support in IPoIB/E1000 Krishna Kumar
2007-09-14 9:01 ` [PATCH 1/10 REV5] [Doc] HOWTO Documentation for batching Krishna Kumar
2007-09-14 18:37 ` [ofa-general] " Randy Dunlap
2007-09-17 4:10 ` Krishna Kumar2
2007-09-17 4:13 ` [ofa-general] " Jeff Garzik
2007-09-14 9:01 ` [PATCH 2/10 REV5] [core] Add skb_blist & support " Krishna Kumar
2007-09-14 12:46 ` [ofa-general] " Evgeniy Polyakov
2007-09-17 3:51 ` Krishna Kumar2
2007-09-14 9:01 ` [PATCH 3/10 REV5] [sched] Modify qdisc_run to support batching Krishna Kumar
2007-09-14 12:15 ` [ofa-general] " Evgeniy Polyakov
2007-09-17 3:49 ` Krishna Kumar2
2007-09-14 9:02 ` [PATCH 4/10 REV5] [ethtool] Add ethtool support Krishna Kumar
2007-09-14 9:02 ` [PATCH 5/10 REV5] [IPoIB] Header file changes Krishna Kumar
2007-09-14 9:03 ` [PATCH 6/10 REV5] [IPoIB] CM & Multicast changes Krishna Kumar
2007-09-14 9:03 ` [PATCH 7/10 REV5] [IPoIB] Verbs changes Krishna Kumar
2007-09-14 9:03 ` [PATCH 8/10 REV5] [IPoIB] Post and work completion handler changes Krishna Kumar
2007-09-14 9:04 ` [PATCH 9/10 REV5] [IPoIB] Implement batching Krishna Kumar
2007-09-14 9:04 ` [PATCH 10/10 REV5] [E1000] " Krishna Kumar
2007-09-14 12:47 ` Evgeniy Polyakov [this message]
2007-09-17 3:56 ` Krishna Kumar2
2007-11-13 21:28 ` [ofa-general] " Kok, Auke
2007-11-14 8:30 ` Krishna Kumar2
2007-09-14 12:49 ` [ofa-general] Re: [PATCH 0/10 REV5] Implement skb batching and support in IPoIB/E1000 Evgeniy Polyakov
2007-09-16 23:17 ` David Miller
2007-09-17 0:29 ` jamal
2007-09-17 1:02 ` David Miller
2007-09-17 2:14 ` [ofa-general] " jamal
2007-09-17 2:25 ` David Miller
2007-09-17 3:01 ` jamal
2007-09-17 3:13 ` David Miller
2007-09-17 12:51 ` jamal
2007-09-17 16:37 ` [ofa-general] " David Miller
2007-09-17 4:46 ` Krishna Kumar2
2007-09-23 17:53 ` [PATCHES] TX batching jamal
2007-09-23 17:56 ` [ofa-general] [PATCH 1/4] [NET_SCHED] explict hold dev tx lock jamal
2007-09-23 17:58 ` [ofa-general] [PATCH 2/4] [NET_BATCH] Introduce batching interface jamal
2007-09-23 18:00 ` [PATCH 3/4][NET_BATCH] net core use batching jamal
2007-09-23 18:02 ` [ofa-general] [PATCH 4/4][NET_SCHED] kill dev->gso_skb jamal
2007-09-30 18:53 ` [ofa-general] [PATCH 3/3][NET_SCHED] " jamal
2007-10-07 18:39 ` [ofa-general] [PATCH 3/3][NET_BATCH] " jamal
2007-09-30 18:52 ` [ofa-general] [PATCH 2/3][NET_BATCH] net core use batching jamal
2007-10-01 4:11 ` Bill Fink
2007-10-01 13:30 ` jamal
2007-10-02 4:25 ` [ofa-general] " Bill Fink
2007-10-02 13:20 ` jamal
2007-10-03 5:29 ` [ofa-general] " Bill Fink
2007-10-03 13:42 ` jamal
2007-10-01 10:42 ` [ofa-general] " Patrick McHardy
2007-10-01 13:21 ` jamal
2007-10-08 5:03 ` Krishna Kumar2
2007-10-08 13:17 ` jamal
2007-10-09 3:09 ` [ofa-general] " Krishna Kumar2
2007-10-09 13:10 ` jamal
2007-10-07 18:38 ` [ofa-general] " jamal
2007-09-30 18:51 ` [ofa-general] [PATCH 1/4] [NET_BATCH] Introduce batching interface jamal
2007-09-30 18:54 ` [ofa-general] Re: [PATCH 1/3] " jamal
2007-10-07 18:36 ` [ofa-general] " jamal
2007-10-08 9:59 ` Krishna Kumar2
2007-10-08 13:49 ` jamal
2007-09-24 19:12 ` [ofa-general] RE: [PATCH 1/4] [NET_SCHED] explict hold dev tx lock Waskiewicz Jr, Peter P
2007-09-24 22:51 ` jamal
2007-09-24 22:57 ` Waskiewicz Jr, Peter P
2007-09-24 23:38 ` [ofa-general] " jamal
2007-09-24 23:47 ` Waskiewicz Jr, Peter P
2007-09-25 0:14 ` [ofa-general] " Stephen Hemminger
2007-09-25 0:31 ` [ofa-general] " Waskiewicz Jr, Peter P
2007-09-25 13:15 ` [ofa-general] " jamal
2007-09-25 15:24 ` Stephen Hemminger
2007-09-25 22:14 ` jamal
2007-09-25 22:43 ` jamal
2007-09-25 13:08 ` [ofa-general] " jamal
2007-10-08 4:51 ` [ofa-general] " David Miller
2007-10-08 13:34 ` jamal
2007-10-08 14:22 ` parallel networking (was Re: [PATCH 1/4] [NET_SCHED] explict hold dev tx lock) Jeff Garzik
2007-10-08 15:18 ` [ofa-general] " jamal
2007-10-08 21:11 ` [ofa-general] Re: parallel networking David Miller
2007-10-08 22:30 ` jamal
2007-10-08 22:33 ` David Miller
2007-10-08 22:35 ` [ofa-general] " Waskiewicz Jr, Peter P
2007-10-08 23:42 ` [ofa-general] " jamal
2007-10-09 1:53 ` Jeff Garzik
2007-10-09 14:59 ` Michael Krause
2007-10-08 21:05 ` [PATCH 1/4] [NET_SCHED] explict hold dev tx lock David Miller
2007-09-23 18:19 ` [PATCHES] TX batching Jeff Garzik
2007-09-23 19:11 ` [ofa-general] " jamal
2007-09-23 19:36 ` Kok, Auke
2007-09-23 21:20 ` jamal
2007-09-24 7:00 ` Kok, Auke
2007-09-24 22:38 ` jamal
2007-09-24 22:52 ` [ofa-general] " Kok, Auke
2007-09-24 22:54 ` [DOC] Net batching driver howto jamal
2007-09-25 20:16 ` [ofa-general] " Randy Dunlap
2007-09-25 22:28 ` jamal
2007-09-25 0:15 ` [PATCHES] TX batching Jeff Garzik
2007-09-30 18:50 ` [ofa-general] " jamal
2007-09-30 19:19 ` [ofa-general] " jamal
2007-10-07 18:34 ` [ofa-general] " jamal
2007-10-08 12:51 ` [ofa-general] " Evgeniy Polyakov
2007-10-08 14:05 ` jamal
2007-10-09 8:14 ` Krishna Kumar2
2007-10-09 13:25 ` jamal
2007-09-17 4:08 ` [PATCH 0/10 REV5] Implement skb batching and support in IPoIB/E1000 Krishna Kumar2
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=20070914124714.GD18517@2ka.mipt.ru \
--to=johnpol@2ka$(echo .)mipt.ru \
--cc=Robert.Olsson@data$(echo .)slu.se \
--cc=davem@davemloft$(echo .)net \
--cc=gaagaan@gmail$(echo .)com \
--cc=general@lists$(echo .)openfabrics.org \
--cc=hadi@cyberus$(echo .)ca \
--cc=herbert@gondor$(echo .)apana.org.au \
--cc=jagana@us$(echo .)ibm.com \
--cc=jeff@garzik$(echo .)org \
--cc=kaber@trash$(echo .)net \
--cc=krkumar2@in$(echo .)ibm.com \
--cc=kumarkr@linux$(echo .)ibm.com \
--cc=mcarlson@broadcom$(echo .)com \
--cc=mchan@broadcom$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=peter.p.waskiewicz.jr@intel$(echo .)com \
--cc=randy.dunlap@oracle$(echo .)com \
--cc=rdreier@cisco$(echo .)com \
--cc=shemminger@linux-foundation$(echo .)org \
--cc=sri@us$(echo .)ibm.com \
--cc=tgraf@suug$(echo .)ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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