netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Collins <benmcollins13@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net: Add support for handling queueing in hardware
Date: Fri, 22 Mar 2013 10:50:38 -0400	[thread overview]
Message-ID: <63463136-FE5B-462D-9259-53DD5AC61BDB@gmail.com> (raw)
In-Reply-To: <1363962193.4431.59.camel@edumazet-glaptop>

On Mar 22, 2013, at 10:23 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:

> On Wed, 2011-07-13 at 08:52 -0500, Andy Fleming wrote:
>> The QDisc code does a bunch of locking which is unnecessary if
>> you have hardware which handles all of the queueing. Add
>> support for this, and skip over all of the queueing code if
>> the feature is enabled on a given device, which breaks QDisc
>> support on dpaa_eth, and also coopts the FCOE feature bit.
>> 
>> Signed-off-by: Andy Fleming <afleming@freescale.com>
>> Signed-off-by: Ben Collins <ben.c@servergy.com>
>> Cc: netdev@vger.kernel.org
>> ---
>> include/linux/netdev_features.h | 2 ++
>> net/core/dev.c                  | 6 ++++++
>> 2 files changed, 8 insertions(+)
>> 
>> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
>> index 3dd3934..ffb4587 100644
>> --- a/include/linux/netdev_features.h
>> +++ b/include/linux/netdev_features.h
>> @@ -56,6 +56,7 @@ enum {
>> 	NETIF_F_LOOPBACK_BIT,		/* Enable loopback */
>> 	NETIF_F_RXFCS_BIT,		/* Append FCS to skb pkt data */
>> 	NETIF_F_RXALL_BIT,		/* Receive errored frames too */
>> +	NETIF_F_HW_QDISC_BIT,		/* Supports hardware Qdisc */
>> 
>> 	/*
>> 	 * Add your fresh new feature above and remember to update
>> @@ -80,6 +81,7 @@ enum {
>> #define NETIF_F_GSO_ROBUST	__NETIF_F(GSO_ROBUST)
>> #define NETIF_F_HIGHDMA		__NETIF_F(HIGHDMA)
>> #define NETIF_F_HW_CSUM		__NETIF_F(HW_CSUM)
>> +#define NETIF_F_HW_QDISC	__NETIF_F(HW_QDISC)
>> #define NETIF_F_HW_VLAN_FILTER	__NETIF_F(HW_VLAN_FILTER)
>> #define NETIF_F_HW_VLAN_RX	__NETIF_F(HW_VLAN_RX)
>> #define NETIF_F_HW_VLAN_TX	__NETIF_F(HW_VLAN_TX)
>> diff --git a/net/core/dev.c b/net/core/dev.c
>> index dffbef7..6818b18 100644
>> --- a/net/core/dev.c
>> +++ b/net/core/dev.c
>> @@ -2743,6 +2743,12 @@ int dev_queue_xmit(struct sk_buff *skb)
>> 
>> 	skb_update_prio(skb);
>> 
>> +	if (dev->features & NETIF_F_HW_QDISC) {
>> +		txq = netdev_pick_tx(dev, skb);
>> +		rc = dev_hard_start_xmit(skb, dev, txq);
>> +		goto out;
>> +	}
>> +
>> 	txq = netdev_pick_tx(dev, skb);
>> 	q = rcu_dereference_bh(txq->qdisc);
>> 
> 
> Nobody forces you to use a qdisc.
> 
> And if your device really is lockless, it can use NETIF_F_LLTX feature.


        NETIF_F_LLTX_BIT,               /* LockLess TX - deprecated. Please */
                                        /* do not use LLTX in new drivers */

--
Servergy  : http://www.servergy.com/
SwissDisk : http://www.swissdisk.com/
Ubuntu    : http://www.ubuntu.com/
My Blog   : http://ben-collins.blogspot.com/

  reply	other threads:[~2013-03-22 14:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13 13:52 [PATCH] net: Add support for handling queueing in hardware Andy Fleming
2013-03-22 14:11 ` David Miller
2013-03-22 14:31   ` Fleming Andy-AFLEMING
2013-03-22 14:33     ` David Miller
2013-03-22 14:43       ` Ben Collins
2013-03-22 15:17         ` David Miller
2013-03-22 15:39           ` Ben Collins
2013-03-22 15:41             ` David Miller
2013-03-22 15:53               ` Ben Collins
2013-03-22 15:59                 ` David Miller
2013-03-22 16:14                   ` Ben Collins
2013-03-22 16:16                     ` David Miller
2013-03-22 16:23                       ` Ben Collins
2013-03-22 22:08             ` Theodore Ts'o
2013-03-23 19:10               ` Guenter Roeck
2013-04-01 14:13               ` Mark Brown
2013-03-23 19:02         ` Guenter Roeck
2013-03-24 19:06           ` Guenter Roeck
2013-03-22 14:23 ` Eric Dumazet
2013-03-22 14:50   ` Ben Collins [this message]
2013-03-22 15:01     ` Eric Dumazet

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=63463136-FE5B-462D-9259-53DD5AC61BDB@gmail.com \
    --to=benmcollins13@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).