diff mbox

[net-next] igb: remove skb_orphan calls

Message ID 20090226104621.10407.46879.stgit@lost.foo-projects.org
State Deferred, archived
Delegated to: David Miller
Headers show

Commit Message

Kirsher, Jeffrey T Feb. 26, 2009, 10:46 a.m. UTC
From: Alexander Duyck <alexander.h.duyck@intel.com>

The skb_orphan call in the tx path has been shown to cause issues as seen
with the workarounds required for timestamping.

In order to avoid this it is easiest just to remove the skb_orphan call as
the motivation for including it was purely performance based, and the
overall gain from having the call was minimal.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/igb_main.c |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Feb. 26, 2009, 12:14 p.m. UTC | #1
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 26 Feb 2009 02:46:23 -0800

> From: Alexander Duyck <alexander.h.duyck@intel.com>
> 
> The skb_orphan call in the tx path has been shown to cause issues as seen
> with the workarounds required for timestamping.
> 
> In order to avoid this it is easiest just to remove the skb_orphan call as
> the motivation for including it was purely performance based, and the
> overall gain from having the call was minimal.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Acked-by: Mitch Williams <mitch.a.williams@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

While I'm happy to apply this, I don't see it as helping the
timestamping situation.

All someone has to do is enable the new timestamping on loopback to
trigger the problem, the loopback MUST orphan SKBs before it pushes
them back into the stack for receive.

Also, Herbert and I have talked about orphaning SKBs even earlier than
dev_queue_xmit()

This post-send timestamping scheme is not going to work, is poorly
designed, and needs to be completely rearchitected.

If it isn't fixed soon, I'll have no choice but to completely revert
all of the timestamping stuff.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kirsher, Jeffrey T Feb. 26, 2009, 12:24 p.m. UTC | #2
On Thu, Feb 26, 2009 at 4:14 AM, David Miller <davem@davemloft.net> wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Thu, 26 Feb 2009 02:46:23 -0800
>
>> From: Alexander Duyck <alexander.h.duyck@intel.com>
>>
>> The skb_orphan call in the tx path has been shown to cause issues as seen
>> with the workarounds required for timestamping.
>>
>> In order to avoid this it is easiest just to remove the skb_orphan call as
>> the motivation for including it was purely performance based, and the
>> overall gain from having the call was minimal.
>>
>> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
>> Acked-by: Mitch Williams <mitch.a.williams@intel.com>
>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>
> While I'm happy to apply this, I don't see it as helping the
> timestamping situation.
>
> All someone has to do is enable the new timestamping on loopback to
> trigger the problem, the loopback MUST orphan SKBs before it pushes
> them back into the stack for receive.
>
> Also, Herbert and I have talked about orphaning SKBs even earlier than
> dev_queue_xmit()
>
> This post-send timestamping scheme is not going to work, is poorly
> designed, and needs to be completely rearchitected.
>
> If it isn't fixed soon, I'll have no choice but to completely revert
> all of the timestamping stuff.
> --
>

Adding Emil and Patrick.

While no issues were seen in testing, I will verify with Emil that
loopback testing was done.  Also I will work with Patrick to ensure
that we resolve any issues with lookback and timestamping.
diff mbox

Patch

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 6cae258..78558f8 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3258,14 +3258,6 @@  static int igb_xmit_frame_ring_adv(struct sk_buff *skb,
 	if (unlikely(shtx->hardware)) {
 		shtx->in_progress = 1;
 		tx_flags |= IGB_TX_FLAGS_TSTAMP;
-	} else if (likely(!shtx->software)) {
-		/*
-		 * TODO: can this be solved in dev.c:dev_hard_start_xmit()?
-		 * There are probably unmodified driver which do something
-		 * like this and thus don't work in combination with
-		 * SOF_TIMESTAMPING_TX_SOFTWARE.
-		 */
-		skb_orphan(skb);
 	}
 
 	if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
@@ -4253,9 +4245,6 @@  static void igb_tx_hwtstamp(struct igb_adapter *adapter, struct sk_buff *skb)
 				timecompare_transform(&adapter->compare, ns);
 			skb_tstamp_tx(skb, &shhwtstamps);
 		}
-
-		/* delayed orphaning: skb_tstamp_tx() needs the socket */
-		skb_orphan(skb);
 	}
 }