提交 19147bb5 编写于 作者: A Alexander Duyck 提交者: David S. Miller

igb: remove skb_orphan calls

Remove skb_orphan call from igb driver as it can cause multiple issues due
to the fact that it is calling the desctructor and removing the skb from
the socket prior to transmission.

The call was added to improve performance but did so by allowing the skb to
be removed from the socket which gave the socket more window space to
transmit.  The performance gain is not worth the extra problems that this
kind of workaround can introduce as this could lead to a potential DoS if a
UDP stream decided to monopolize the transmit path.
Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
Acked-by: NMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d3a21be8
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册