[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <515D8AFD.1000709@cogentembedded.com>
Date: Thu, 04 Apr 2013 18:15:25 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
CC: davem@...emloft.net, Alexander Duyck <alexander.h.duyck@...el.com>,
netdev@...r.kernel.org, gospo@...hat.com, sassmann@...hat.com
Subject: Re: [net-next 09/13] igb: Pull adapter out of main path in igb_xmit_frame_ring
Hello.
On 04-04-2013 15:37, Jeff Kirsher wrote:
> From: Alexander Duyck <alexander.h.duyck@...el.com>
> We only need the adapter pointer in the case of ptp. As such we can pull the
> adapter out of the main path and place it inside the if statement to avoid
> the temptation of accessing the adapter pointer in the fast path.
> Signed-off-by: Alexander Duyck <alexander.h.duyck@...el.com>
> Tested-by: Aaron Brown <aaron.f.brown@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Two minor nits.
> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
> index 29facb5..6043245 100644
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
[...]
> @@ -4628,15 +4627,17 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
>
> skb_tx_timestamp(skb);
>
> - if (unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
> - !(adapter->ptp_tx_skb))) {
> - skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
> - tx_flags |= IGB_TX_FLAGS_TSTAMP;
> + if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
> + struct igb_adapter *adapter = netdev_priv(tx_ring->netdev);
An empty line wouldn't hurt here.
> + if (!(adapter->ptp_tx_skb)) {
Parens not needed here.
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists