All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Krishna Kumar2 <krkumar2@in.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	NetDev <netdev@vger.kernel.org>,
	netdev-owner@vger.kernel.org, robert@herjulf.net
Subject: Re: pktgen and spin_lock_bh in xmit path
Date: Tue, 20 Oct 2009 22:32:55 -0700	[thread overview]
Message-ID: <4ADE9D07.2020506@candelatech.com> (raw)
In-Reply-To: <OFE19FAAE4.E89690B3-ON65257656.001B6B90-65257656.001CA0C0@in.ibm.com>

Krishna Kumar2 wrote:
> Ben Greear <greearb@candelatech.com>  wrote on 10/21/2009 02:40:13 AM:
>
> Coming back a bit to this post:
>
>   
>>> -   queue_map = skb_get_queue_mapping(pkt_dev->skb);
>>> +   queue_map = pkt_dev->cur_queue_map;
>>> +   /*
>>> +    * tells skb_tx_hash() to use this tx queue.
>>> +    * We should reset skb->mapping before each xmit() because
>>> +    * xmit() might change it.
>>> +    */
>>> +   skb_record_rx_queue(pkt_dev->skb, queue_map);
>>>      txq = netdev_get_tx_queue(odev, queue_map);
>>>       
>> I think that must be wrong.  The record_rx_queue sets it to queue_map + 1,
>>     
>> but the hard-start-xmit method (in ixgbe/ixgbe_main.c, at least), takes the
>> skb->queue_map and uses it as an index with no subtraction.
>>     
>
> But that should work fine. record_rx_q sets queue_mapping to +1,
> but skb_tx_hash calls skb_get_rx_queue, which does a -1 on this
> value, and updates that value into queue_mapping. Hence it will
> not cross the txq boundary. Drivers can use the queue_map value
> directly without requiring to subtract.
>   
When using pktgen on real physical hardware, there is none of the 
skb_tx_hash or dev_queue_xmit
logic called, just the hard-start-xmit.  That is why it fails to update 
the proper queue with
his first patch. 

On virtual devices like mac-vlans, the logic probably worked ok since it 
goes
through dev_queue_xmit.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com



      reply	other threads:[~2009-10-21  5:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20  3:38 pktgen and spin_lock_bh in xmit path Ben Greear
2009-10-20  3:48 ` Eric Dumazet
2009-10-20  4:52   ` Ben Greear
2009-10-20 17:37     ` Ben Greear
2009-10-20 17:44       ` Eric Dumazet
2009-10-20 17:54         ` Ben Greear
2009-10-20 18:35           ` Eric Dumazet
2009-10-20 18:54             ` Eric Dumazet
2009-10-20 20:16               ` Ben Greear
2009-10-20 21:10               ` Ben Greear
2009-10-20 21:22                 ` Eric Dumazet
2009-10-20 21:30                   ` Ben Greear
2009-10-20 21:57                     ` Eric Dumazet
2009-10-20 23:17                       ` Ben Greear
2009-10-21  3:05                         ` Ben Greear
2009-10-21  3:12                           ` Eric Dumazet
2009-10-21  3:59                             ` Eric Dumazet
2009-10-21  5:00                               ` Ben Greear
2009-10-21  5:14                                 ` Eric Dumazet
2009-10-21  5:40                                   ` Ben Greear
2009-10-21  5:12                 ` Krishna Kumar2
2009-10-21  5:32                   ` Ben Greear [this message]

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=4ADE9D07.2020506@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=krkumar2@in.ibm.com \
    --cc=netdev-owner@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robert@herjulf.net \
    /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.