Netdev List
 help / color / mirror / Atom feed
* Re: [net] net_sched: make dev_trans_start return vlan's real dev trans_start
From: Veaceslav Falico @ 2013-08-03 19:09 UTC (permalink / raw)
  To: David Miller; +Cc: nikolay, netdev, fubar, jhs
In-Reply-To: <20130803.115228.1509916868029010372.davem@davemloft.net>

On Sat, Aug 03, 2013 at 11:52:28AM -0700, David Miller wrote:
>From: Veaceslav Falico <vfalico@redhat.com>
>Date: Sat, 3 Aug 2013 19:07:33 +0200
>
>> On Sat, Aug 03, 2013 at 05:07:51PM +0200, nikolay@redhat.com wrote:
>> ...snip...
>>>+	while (is_vlan_dev(dev))
>>>+		dev = vlan_dev_real_dev(dev);
>>
>> While at it - I've checked a few users (mainly network drivers) of
>> vlan_dev_real_dev(dev) and they all rely on that the return device
>> would be the *real* device, but not another vlan.
>
>Did you find any cases that want the device under the VLAN,
>whether it is a non-vlan device or not?

Not really. All of the cases seem to explicitly call it to get a non-vlan
device, and not the purely 'underlying' one.

Another point is that they won't work properly with QinQ... cause the
majority of callers are searching for their own device. Or bonding, as in
netxen that Nik mentioned. And they will find yet another vlan device.

So either QinQ isn't really that used or I'm missing something...

>
>> So maybe we should move this while loop to vlan_dev_real_dev()
>> instead?
>
>Perhaps.  As per above, we may also need the one-level demux
>helper too, something like "vlan_dev_slave(dev)".

I haven't found any usage for it, tbh. Only the vlan code itself might
benefit from it, but it already uses the vlan_dev_priv(dev)->real_dev, and
not the vlan_dev_real_dev(), which is used by drivers.

^ permalink raw reply

* Re: [PATCH v1 3/4] USBNET: support DMA SG
From: David Miller @ 2013-08-03 19:07 UTC (permalink / raw)
  To: oneukum-l3A5Bk7waGM
  Cc: ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	sarah.a.sharp-VuQAYsv1563Yd54FQh9/CA,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w,
	bhutchings-s/n/eUQHGBpZroRs9YW3xA,
	grundler-hpIqsD4AKlfQT0dZR+AlfA, freddy-knRN6Y/kmf1NUHwG+Fw1Kw,
	stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz
In-Reply-To: <1375509413.2201.2.camel-B2T3B9s34ElbnMAlSieJcQ@public.gmane.org>

From: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
Date: Sat, 03 Aug 2013 07:56:53 +0200

> On Sat, 2013-08-03 at 10:46 +0800, Ming Lei wrote:
> 
>> @@ -1268,10 +1298,14 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
>>  	entry = (struct skb_data *) skb->cb;
>>  	entry->urb = urb;
>>  	entry->dev = dev;
>> -	entry->length = length;
>>  
>>  	usb_fill_bulk_urb (urb, dev->udev, dev->out,
>>  			skb->data, skb->len, tx_complete, skb);
>> +	if (dev->can_dma_sg) {
>> +		if (build_dma_sg(skb, urb) < 0)
>> +			goto drop;
> 
> Where do you free urb->sg?

Indeed, this appears to leak.

The devio.c code in the USB layer takes care to manage freeing of
the urb->sg, so this usbnet code will have to as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH net 0/8] qlcnic: Bug fixes
From: David Miller @ 2013-08-03 19:03 UTC (permalink / raw)
  To: shahed.shaikh; +Cc: netdev, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1375499761-21141-1-git-send-email-shahed.shaikh@qlogic.com>

From: Shahed Shaikh <shahed.shaikh@qlogic.com>
Date: Fri, 2 Aug 2013 23:15:53 -0400

> From: Shahed Shaikh <shahed.shaikh@qlogic.com>
> 
> This patch series contains the following bug fixes :
> 
> * Fix programming of MAC address filter.
> * Fix MAC address learning of ingress packets.
> * Free memory in error path.
> * Remove adapter series name from warning messages.
> * Fix external loopback diagnostic test.
> * Fix improper link speed display.
> * Fix flash update failure due to improper error handling of
>   read register API.
> 
> Please apply this series to net.

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next] fib_rules: reorder struct fib_rules fields
From: David Miller @ 2013-08-03 18:54 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, stefan.tomanek
In-Reply-To: <1375555835.4457.26.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 03 Aug 2013 11:50:35 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> Move refcnt, pref, suppress_ifgroup, suppress_prefixlen out of first
> cache line, as they are not used in fast path.
> 
> Make sure ctarget & fr_net are in first cache line.
> 
> (Assuming 64 bit arches and 64 bytes cache lines)
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks Eric.

^ permalink raw reply

* Re: [net PATCH 1/1] net: ethernet: davinci_emac: drop IRQF_DISABLED
From: David Miller @ 2013-08-03 18:53 UTC (permalink / raw)
  To: mugunthanvnm; +Cc: netdev, linux-omap
In-Reply-To: <1375528185-24507-1-git-send-email-mugunthanvnm@ti.com>

From: Mugunthan V N <mugunthanvnm@ti.com>
Date: Sat, 3 Aug 2013 16:39:45 +0530

> IRQF_DISABLED is a no-op by now and should be removed.
> 
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>

Applied, thanks.

^ permalink raw reply

* Re: [net] net_sched: make dev_trans_start return vlan's real dev trans_start
From: David Miller @ 2013-08-03 18:52 UTC (permalink / raw)
  To: vfalico; +Cc: nikolay, netdev, fubar, jhs
In-Reply-To: <20130803170733.GA10218@redhat.com>

From: Veaceslav Falico <vfalico@redhat.com>
Date: Sat, 3 Aug 2013 19:07:33 +0200

> On Sat, Aug 03, 2013 at 05:07:51PM +0200, nikolay@redhat.com wrote:
> ...snip...
>>+	while (is_vlan_dev(dev))
>>+		dev = vlan_dev_real_dev(dev);
> 
> While at it - I've checked a few users (mainly network drivers) of
> vlan_dev_real_dev(dev) and they all rely on that the return device
> would be the *real* device, but not another vlan.

Did you find any cases that want the device under the VLAN,
whether it is a non-vlan device or not?

> So maybe we should move this while loop to vlan_dev_real_dev()
> instead?

Perhaps.  As per above, we may also need the one-level demux
helper too, something like "vlan_dev_slave(dev)".

^ permalink raw reply

* [PATCH net-next] fib_rules: reorder struct fib_rules fields
From: Eric Dumazet @ 2013-08-03 18:50 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Stefan Tomanek

From: Eric Dumazet <edumazet@google.com>

Move refcnt, pref, suppress_ifgroup, suppress_prefixlen out of first
cache line, as they are not used in fast path.

Make sure ctarget & fr_net are in first cache line.

(Assuming 64 bit arches and 64 bytes cache lines)

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/net/fib_rules.h |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index 9d0fcbaa..4b2b557 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -10,23 +10,25 @@
 
 struct fib_rule {
 	struct list_head	list;
-	atomic_t		refcnt;
 	int			iifindex;
 	int			oifindex;
 	u32			mark;
 	u32			mark_mask;
-	u32			pref;
 	u32			flags;
 	u32			table;
-	int			suppress_ifgroup;
-	int			suppress_prefixlen;
 	u8			action;
+	/* 3 bytes hole, try to use */
 	u32			target;
 	struct fib_rule __rcu	*ctarget;
+	struct net		*fr_net;
+
+	atomic_t		refcnt;
+	u32			pref;
+	int			suppress_ifgroup;
+	int			suppress_prefixlen;
 	char			iifname[IFNAMSIZ];
 	char			oifname[IFNAMSIZ];
 	struct rcu_head		rcu;
-	struct net *		fr_net;
 };
 
 struct fib_lookup_arg {

^ permalink raw reply related

* Re: [PATCH] fib_rules: fix suppressor names and default values
From: Stefan Tomanek @ 2013-08-03 18:28 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20130803.104125.609502695540219854.davem@davemloft.net>

Dies schrieb David Miller (davem@davemloft.net):

> I had to fix the following obvious typo:
> 
> diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
> index 47916b0..2e65413 100644
> --- a/net/core/fib_rules.c
> +++ b/net/core/fib_rules.c
> @@ -351,7 +351,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh)
>  	if (tb[FRA_SUPPRESS_IFGROUP])
>  		rule->suppress_ifgroup = nla_get_u32(tb[FRA_SUPPRESS_IFGROUP]);
>  	else
> -		rule->suppress_ifgroup -1;
> +		rule->suppress_ifgroup = -1;
>  
>  	if (!tb[FRA_PRIORITY] && ops->default_pref)
>  		rule->pref = ops->default_pref(ops);
> 
> Are you even looking at the build of the code you are submitting?
> Because here the compiler told me:
> 
> net/core/fib_rules.c: In function ‘fib_nl_newrule’:
> net/core/fib_rules.c:354:3: warning: statement with no effect [-Wunused-value]

My apologies, I just checked my tinkering branch where the typo is not present;
it must have crept in while squashing together a number of smaller commits
while compiling the patch, perhaps while fixing some whitespace issue (empty
line).

The compiler message must have slipped by, I'll try to triple check next time.

Thank you for the quick fix.

Stefan Tomanek

^ permalink raw reply

* Re: [net] net_sched: make dev_trans_start return vlan's real dev trans_start
From: Veaceslav Falico @ 2013-08-03 18:25 UTC (permalink / raw)
  To: Nikolay Aleksandrov; +Cc: netdev, davem, fubar, jhs
In-Reply-To: <51FD499E.70104@redhat.com>

On Sat, Aug 03, 2013 at 08:19:10PM +0200, Nikolay Aleksandrov wrote:
>On 08/03/2013 08:13 PM, Nikolay Aleksandrov wrote:
>> On 08/03/2013 07:07 PM, Veaceslav Falico wrote:
>>> On Sat, Aug 03, 2013 at 05:07:51PM +0200, nikolay@redhat.com wrote:
>>> ...snip...
>>>> +    while (is_vlan_dev(dev))
>>>> +        dev = vlan_dev_real_dev(dev);
>>>
>>> While at it - I've checked a few users (mainly network drivers) of
>>> vlan_dev_real_dev(dev) and they all rely on that the return device would be
>>> the *real* device, but not another vlan.
>>>
>>> So maybe we should move this while loop to vlan_dev_real_dev() instead?
><snip>
>> Not really, there're users that rely to get only 1 level of real_dev (e.g.
>> netxen ip config which expects a configuration like vlan -> bond -> netxen,
>> and it needs to go from vlan to bond only) which will be broken, there're
>Scratch this part, I need to get some sleep :-)

:)

Yeah, it only modifies the QinQ scenario. I've never used it personally,
though.

Here you go, I think the code is more readable than my english:

diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 4a78c4d..6ee48aa 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -91,7 +91,12 @@ EXPORT_SYMBOL(__vlan_find_dev_deep);
  
  struct net_device *vlan_dev_real_dev(const struct net_device *dev)
  {
-	return vlan_dev_priv(dev)->real_dev;
+	struct net_device *ret = vlan_dev_priv(dev)->real_dev;
+
+	while (is_vlan_dev(ret))
+		ret = vlan_dev_priv(ret)->real_dev;
+
+	return ret;
  }
  EXPORT_SYMBOL(vlan_dev_real_dev);
  

>
>
>> also many non-ethernet users which may rely on similar behaviour.
>> Most of the network drivers don't expect a *real* device, they check if the
>> returned device is one of their own after using that function.

True, and in case of vlan -> vlan -> dev they'll won't find themselves,
which is bad.

>> I'd suggest using a helper that uses vlan_dev_real_dev so we will have both
>> without breaking anything.

I don't have any preference in that, tbh, I don't know the vlan part that
good :).

>>
>> Nik
>> --
>> 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
>>
>

^ permalink raw reply related

* Re: [net] net_sched: make dev_trans_start return vlan's real dev trans_start
From: Nikolay Aleksandrov @ 2013-08-03 18:19 UTC (permalink / raw)
  To: Veaceslav Falico; +Cc: netdev, davem, fubar, jhs
In-Reply-To: <51FD4864.6060009@redhat.com>

On 08/03/2013 08:13 PM, Nikolay Aleksandrov wrote:
> On 08/03/2013 07:07 PM, Veaceslav Falico wrote:
>> On Sat, Aug 03, 2013 at 05:07:51PM +0200, nikolay@redhat.com wrote:
>> ...snip...
>>> +    while (is_vlan_dev(dev))
>>> +        dev = vlan_dev_real_dev(dev);
>>
>> While at it - I've checked a few users (mainly network drivers) of
>> vlan_dev_real_dev(dev) and they all rely on that the return device would be
>> the *real* device, but not another vlan.
>>
>> So maybe we should move this while loop to vlan_dev_real_dev() instead?
<snip>
> Not really, there're users that rely to get only 1 level of real_dev (e.g.
> netxen ip config which expects a configuration like vlan -> bond -> netxen,
> and it needs to go from vlan to bond only) which will be broken, there're
Scratch this part, I need to get some sleep :-)


> also many non-ethernet users which may rely on similar behaviour.
> Most of the network drivers don't expect a *real* device, they check if the
> returned device is one of their own after using that function.
> I'd suggest using a helper that uses vlan_dev_real_dev so we will have both
> without breaking anything.
> 
> Nik
> --
> 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
> 

^ permalink raw reply

* Re: [net] net_sched: make dev_trans_start return vlan's real dev trans_start
From: Nikolay Aleksandrov @ 2013-08-03 18:13 UTC (permalink / raw)
  To: Veaceslav Falico; +Cc: netdev, davem, fubar, jhs
In-Reply-To: <20130803170733.GA10218@redhat.com>

On 08/03/2013 07:07 PM, Veaceslav Falico wrote:
> On Sat, Aug 03, 2013 at 05:07:51PM +0200, nikolay@redhat.com wrote:
> ...snip...
>> +    while (is_vlan_dev(dev))
>> +        dev = vlan_dev_real_dev(dev);
> 
> While at it - I've checked a few users (mainly network drivers) of
> vlan_dev_real_dev(dev) and they all rely on that the return device would be
> the *real* device, but not another vlan.
> 
> So maybe we should move this while loop to vlan_dev_real_dev() instead?
Not really, there're users that rely to get only 1 level of real_dev (e.g.
netxen ip config which expects a configuration like vlan -> bond -> netxen,
and it needs to go from vlan to bond only) which will be broken, there're
also many non-ethernet users which may rely on similar behaviour.
Most of the network drivers don't expect a *real* device, they check if the
returned device is one of their own after using that function.
I'd suggest using a helper that uses vlan_dev_real_dev so we will have both
without breaking anything.

Nik

^ permalink raw reply

* Re: [PATCH] fib_rules: fix suppressor names and default values
From: David Miller @ 2013-08-03 17:41 UTC (permalink / raw)
  To: stefan.tomanek; +Cc: netdev
In-Reply-To: <20130803.103722.780534029060943275.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Sat, 03 Aug 2013 10:37:22 -0700 (PDT)

> From: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
> Date: Sat, 3 Aug 2013 14:14:43 +0200
> 
>> This change brings the suppressor attribute names into line; it also changes
>> the data types to provide a more consistent interface.
>> 
>> While -1 indicates that the suppressor is not enabled, values >= 0 for
>> suppress_prefixlen or suppress_ifgroup  reject routing decisions violating the
>> constraint.
>> 
>> This changes the previously presented behaviour of suppress_prefixlen, where a
>> prefix length _less_ than the attribute value was rejected. After this change,
>> a prefix length less than *or* equal to the value is considered a violation of
>> the rule constraint.
>> 
>> It also changes the default values for default and newly added rules (disabling
>> any suppression for those).
>> 
>> Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
> 
> Applied, thanks.

I had to fix the following obvious typo:

diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 47916b0..2e65413 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -351,7 +351,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh)
 	if (tb[FRA_SUPPRESS_IFGROUP])
 		rule->suppress_ifgroup = nla_get_u32(tb[FRA_SUPPRESS_IFGROUP]);
 	else
-		rule->suppress_ifgroup -1;
+		rule->suppress_ifgroup = -1;
 
 	if (!tb[FRA_PRIORITY] && ops->default_pref)
 		rule->pref = ops->default_pref(ops);

Are you even looking at the build of the code you are submitting?
Because here the compiler told me:

net/core/fib_rules.c: In function ‘fib_nl_newrule’:
net/core/fib_rules.c:354:3: warning: statement with no effect [-Wunused-value]

^ permalink raw reply related

* Re: [PATCH] fib_rules: fix suppressor names and default values
From: David Miller @ 2013-08-03 17:37 UTC (permalink / raw)
  To: stefan.tomanek; +Cc: netdev
In-Reply-To: <20130803121443.GL21970@zirkel.wertarbyte.de>

From: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
Date: Sat, 3 Aug 2013 14:14:43 +0200

> This change brings the suppressor attribute names into line; it also changes
> the data types to provide a more consistent interface.
> 
> While -1 indicates that the suppressor is not enabled, values >= 0 for
> suppress_prefixlen or suppress_ifgroup  reject routing decisions violating the
> constraint.
> 
> This changes the previously presented behaviour of suppress_prefixlen, where a
> prefix length _less_ than the attribute value was rejected. After this change,
> a prefix length less than *or* equal to the value is considered a violation of
> the rule constraint.
> 
> It also changes the default values for default and newly added rules (disabling
> any suppression for those).
> 
> Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] vlan: cleanup the usage of vlan_dev_priv(dev)
From: David Miller @ 2013-08-03 17:33 UTC (permalink / raw)
  To: shhuiw; +Cc: kaber, netdev
In-Reply-To: <51FCC55A.808@gmail.com>

From: Wang Sheng-Hui <shhuiw@gmail.com>
Date: Sat, 03 Aug 2013 16:54:50 +0800

> 
> This patch cleanup 2 points for the usage of vlan_dev_priv(dev):
> * In vlan_dev.c/vlan_dev_hard_header, we should use the var *vlan directly
>   after grabing the pointer at the beginning with
>         *vlan = vlan_dev_priv(dev);
>   when we need to access the fields of *vlan.
> * In vlan.c/register_vlan_device, add the var *vlan pointer
>         struct vlan_dev_priv *vlan;
> to cleanup the code to access the fields of vlan_dev_priv(new_dev).
> 
> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>

Applied.

^ permalink raw reply

* Re: [net] net_sched: make dev_trans_start return vlan's real dev trans_start
From: Veaceslav Falico @ 2013-08-03 17:07 UTC (permalink / raw)
  To: nikolay; +Cc: netdev, davem, fubar, jhs
In-Reply-To: <1375542471-22739-1-git-send-email-nikolay@redhat.com>

On Sat, Aug 03, 2013 at 05:07:51PM +0200, nikolay@redhat.com wrote:
...snip...
>+	while (is_vlan_dev(dev))
>+		dev = vlan_dev_real_dev(dev);

While at it - I've checked a few users (mainly network drivers) of
vlan_dev_real_dev(dev) and they all rely on that the return device would be
the *real* device, but not another vlan.

So maybe we should move this while loop to vlan_dev_real_dev() instead?

^ permalink raw reply

* Пропозиція кредиту на 3% річних .... Подати заявку зараз.
From: GLANT LOAN FIRM @ 2013-08-03 16:38 UTC (permalink / raw)




Добрий день,

  GLANT LOAN FIRM кредит призначений для бізнесу впливають на життя людей в усьому світі позитивно, ми пропонуємо приватні, комерційні і персональні кредити з дуже мінімальні Річні відсоткові ставки за ціною від 3% в межах від 1 до 6 років термін погашення період в будь-якій частині світу. Ми видаємо кредитів і наш кредитний добре застраховані на максимальну безпеку.
  Ви втратили сон ночами турбує, як отримати законним позики, щоб почати свій бізнес або розширити існуючий? Ви кусати ваші нігті, щоб швидко? Замість того, щоб бити себе, чому б не зв'язатися з нами сьогодні в GLANT ФІРМА миттєвий кредит на надання кредиту до вас з всі життєво важливі вимоги. Ми допомогти зупинити поганою кредитною історією. Відкриваючи виграшним рішенням наша місія. Якщо ви зацікавлені в будь-якому кредиту, будь ласка, заповніть та надішліть цю форму кредитної заявки назад до нас.

Ім'я: ...........
Адреса: ...........
Дата народження: ........
Стать: ...............
Телефон: ...........
Рід занять: ...........
Місячний рівень доходів: ........
Сума кредиту Необхідні: ........
Тривалість: ...............
Мета: ..........
Країна: ..................
Країна: ..........
Поштовий індекс: .........


НАШІ КОНТАКТНІ ДАНІ:
E-MAIL АДРЕСА: glantloanfirm@webadicta.org
Контактний телефон: +447035996343


GLANT LOAN FIRM призначеним представником FISA (фінанси Галузеві стандарти асоціації), які мають право і регулюється Управлінням з фінансових послуг (FSA).


З теплотою повагою,
Місіс Becky Tom.

^ permalink raw reply

* Re: [PATCH v1 1/4] USB: introduce usb_device_no_sg_limit() helper
From: Alan Stern @ 2013-08-03 15:53 UTC (permalink / raw)
  To: Ming Lei
  Cc: David S. Miller, Greg Kroah-Hartman, Oliver Neukum, Sarah Sharp,
	netdev, linux-usb
In-Reply-To: <1375497998-7424-2-git-send-email-ming.lei@canonical.com>

On Sat, 3 Aug 2013, Ming Lei wrote:

> Some host controllers(such as xHCI) can support building
> packet from discontinuous buffers, so introduce one flag
> and helper for this kind of host controllers, then the
> feature can help some applications(such as, usbnet) by
> supporting arbitrary length of sg buffers.

> diff --git a/include/linux/usb.h b/include/linux/usb.h
> index 84f14e2..5d03074 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -337,6 +337,7 @@ struct usb_bus {
>  					 * the ep queue on a short transfer
>  					 * with the URB_SHORT_NOT_OK flag set.
>  					 */
> +	unsigned no_sg_limit:1;		/* no sg list limit */

Why do you call this "no_sg_limit"?  It isn't a limit on the SG list; 
the list can be arbitrarily long, provided all the entries except the 
last are divisible by the maxpacket size.

You could call it "no_sg_constraint" if you want.  Or 
"allow_arbitrary_sg", to put a more positive spin on it.

Alan Stern

^ permalink raw reply

* [PATCH net] net_sched: make dev_trans_start return vlan's real dev trans_start
From: Nikolay Aleksandrov @ 2013-08-03 15:07 UTC (permalink / raw)
  To: netdev; +Cc: davem, fubar, jhs

From: Nikolay Aleksandrov <Nikolay Aleksandrov nikolay@redhat.com>

Vlan devices are LLTX and don't update their own trans_start, so if
dev_trans_start has to be called with a vlan device then 0 or a stale value
will be returned. Currently the bonding is the only such user, and it's
needed for proper arp monitoring when the slaves are vlans.
Fix this by extracting the vlan's real device trans_start.

Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
---
 net/sched/sch_generic.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 4626cef..da936f6 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -25,6 +25,7 @@
 #include <linux/rcupdate.h>
 #include <linux/list.h>
 #include <linux/slab.h>
+#include <linux/if_vlan.h>
 #include <net/sch_generic.h>
 #include <net/pkt_sched.h>
 #include <net/dst.h>
@@ -207,15 +208,19 @@ void __qdisc_run(struct Qdisc *q)
 
 unsigned long dev_trans_start(struct net_device *dev)
 {
-	unsigned long val, res = dev->trans_start;
+	unsigned long val, res;
 	unsigned int i;
 
+	while (is_vlan_dev(dev))
+		dev = vlan_dev_real_dev(dev);
+	res = dev->trans_start;
 	for (i = 0; i < dev->num_tx_queues; i++) {
 		val = netdev_get_tx_queue(dev, i)->trans_start;
 		if (val && time_after(val, res))
 			res = val;
 	}
 	dev->trans_start = res;
+
 	return res;
 }
 EXPORT_SYMBOL(dev_trans_start);
-- 
1.8.1.4

^ permalink raw reply related

* Re: [PATCH v2] fib_rules: add route suppression based on ifgroup
From: Stefan Tomanek @ 2013-08-03 12:25 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20130802.152457.2096924772877120236.davem@davemloft.net>

Dies schrieb David Miller (davem@davemloft.net):

> > This change adds the ability to suppress a routing decision based upon the
> > interface group the selected interface belongs to. This allows it to
> > exclude specific devices from a routing decision.
> > 
> > Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
> 
> Looks fine, applied, thanks.

Whoops, there's a small glitch in that patch regarding the default values;
all default rules actually suppress routes leading to devices in the
default group; I've tidied it up in the patch just transmitted.

^ permalink raw reply

* [PATCH iproute2 v2 2/2] ip rule: add route suppression options
From: Stefan Tomanek @ 2013-08-03 12:23 UTC (permalink / raw)
  To: netdev

When configuring a system with multiple network uplinks and default routes, it
is often convenient to reference a routing table multiple times - but reject
its routing decision if certain constraints are not met by it.

Consider this setup:

$ ip route add table secuplink default via 10.42.23.1

$ ip rule add pref 100            table main suppress_prefixlength 0
$ ip rule add pref 150 fwmark 0xA table secuplink

With this setup, packets marked 0xA will be processed by the additional routing
table "secuplink", but only if no suitable route in the main routing table can
be found. By suppressing entries with a prefixlength of 0 (or less), the
default route (/0) of the table "main" is hidden to packets processed by rule
100; packets traveling to destinations via more specific routes are processed
as usual.

It is also possible to suppress a routing entry if a device belonging to
a specific interface group is to be used:

$ ip rule add pref 150 table main suppress_group 1

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
---
 include/linux/fib_rules.h |    4 ++--
 ip/iprule.c               |   34 +++++++++++++++++++++++++++++++++-
 man/man8/ip-rule.8        |   17 +++++++++++++++++
 3 files changed, 52 insertions(+), 3 deletions(-)

diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h
index 51da65b..2b82d7e 100644
--- a/include/linux/fib_rules.h
+++ b/include/linux/fib_rules.h
@@ -44,8 +44,8 @@ enum {
 	FRA_FWMARK,	/* mark */
 	FRA_FLOW,	/* flow/class id */
 	FRA_UNUSED6,
-	FRA_UNUSED7,
-	FRA_UNUSED8,
+	FRA_SUPPRESS_IFGROUP,
+	FRA_SUPPRESS_PREFIXLEN,
 	FRA_TABLE,	/* Extended table id */
 	FRA_FWMASK,	/* mask for netfilter mark */
 	FRA_OIFNAME,
diff --git a/ip/iprule.c b/ip/iprule.c
index a5fcd43..d934f67 100644
--- a/ip/iprule.c
+++ b/ip/iprule.c
@@ -39,6 +39,9 @@ static void usage(void)
 	fprintf(stderr, "          [ prohibit | reject | unreachable ]\n");
 	fprintf(stderr, "          [ realms [SRCREALM/]DSTREALM ]\n");
 	fprintf(stderr, "          [ goto NUMBER ]\n");
+	fprintf(stderr, "          SUPPRESSOR\n");
+	fprintf(stderr, "SUPPRESSOR := [ suppress_prefixlength NUMBER ]\n");
+	fprintf(stderr, "              [ suppress_ifgroup DEVGROUP ]\n");
 	fprintf(stderr, "TABLE_ID := [ local | main | default | NUMBER ]\n");
 	exit(-1);
 }
@@ -153,9 +156,24 @@ int print_rule(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 	}
 
 	table = rtm_get_table(r, tb);
-	if (table)
+	if (table) {
 		fprintf(fp, "lookup %s ", rtnl_rttable_n2a(table, b1, sizeof(b1)));
 
+		if (tb[FRA_SUPPRESS_PREFIXLEN]) {
+			int pl = rta_getattr_u32(tb[FRA_SUPPRESS_PREFIXLEN]);
+			if (pl != -1) {
+				fprintf(fp, "suppress_prefixlength %d ", pl);
+			}
+		}
+		if (tb[FRA_SUPPRESS_IFGROUP]) {
+			int group = rta_getattr_u32(tb[FRA_SUPPRESS_IFGROUP]);
+			if (group != -1) {
+				SPRINT_BUF(b1);
+				fprintf(fp, "suppress_ifgroup %s ", rtnl_group_n2a(group, b1, sizeof(b1)));
+			}
+		}
+	}
+
 	if (tb[FRA_FLOW]) {
 		__u32 to = rta_getattr_u32(tb[FRA_FLOW]);
 		__u32 from = to>>16;
@@ -310,6 +328,20 @@ static int iprule_modify(int cmd, int argc, char **argv)
 				addattr32(&req.n, sizeof(req), FRA_TABLE, tid);
 			}
 			table_ok = 1;
+		} else if (matches(*argv, "suppress_prefixlength") == 0 ||
+			   strcmp(*argv, "sup_pl") == 0) {
+			int pl;
+			NEXT_ARG();
+			if (get_s32(&pl, *argv, 0) || pl < 0)
+				invarg("suppress_prefixlength value is invalid\n", *argv);
+			addattr32(&req.n, sizeof(req), FRA_SUPPRESS_PREFIXLEN, pl);
+		} else if (matches(*argv, "suppress_ifgroup") == 0 ||
+			   strcmp(*argv, "sup_group") == 0) {
+			NEXT_ARG();
+			int group;
+			if (rtnl_group_a2n(&group, *argv))
+				invarg("Invalid \"suppress_ifgroup\" value\n", *argv);
+			addattr32(&req.n, sizeof(req), FRA_SUPPRESS_IFGROUP, group);
 		} else if (strcmp(*argv, "dev") == 0 ||
 			   strcmp(*argv, "iif") == 0) {
 			NEXT_ARG();
diff --git a/man/man8/ip-rule.8 b/man/man8/ip-rule.8
index 36e46f1..62df3b0 100644
--- a/man/man8/ip-rule.8
+++ b/man/man8/ip-rule.8
@@ -43,6 +43,14 @@ ip-rule \- routing policy database management
 .IR ADDRESS " ] [ "
 .BR prohibit " | " reject " | " unreachable " ] [ " realms
 .RI "[" SRCREALM "/]" DSTREALM " ]"
+.I  SUPPRESSOR
+
+.ti -8
+.IR SUPPRESSOR " := [ "
+.B  suppress_prefixlength
+.IR NUMBER " ] [ "
+.B  suppress_ifgroup
+.IR GROUP " ]"
 
 .ti -8
 .IR TABLE_ID " := [ "
@@ -217,6 +225,15 @@ the routing table identifier to lookup if the rule selector matches.
 It is also possible to use lookup instead of table.
 
 .TP
+.BI suppress_prefixlength " NUMBER"
+reject routing decisions that have a prefix length of NUMBER or less.
+
+.TP
+.BI suppress_ifgroup " GROUP"
+reject routing decisions that use a device belonging to the interface
+group GROUP.
+
+.TP
 .BI realms " FROM/TO"
 Realms to select if the rule matched and the routing table lookup
 succeeded.  Realm
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH iproute2 v2 1/2] ip link: fix display of interface groups
From: Stefan Tomanek @ 2013-08-03 12:20 UTC (permalink / raw)
  To: netdev

This change adds the interface group to the output of "ip link show".

It also makes "ip link" print _all_ devices if no group filter is specified;
previously, only interfaces of the default group (0) were shown.

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
---
 include/rt_names.h |    1 +
 ip/ipaddress.c     |   10 ++++++++--
 lib/rt_names.c     |   19 +++++++++++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/include/rt_names.h b/include/rt_names.h
index 37adbd3..56b649a 100644
--- a/include/rt_names.h
+++ b/include/rt_names.h
@@ -8,6 +8,7 @@ const char *rtnl_rtscope_n2a(int id, char *buf, int len);
 const char *rtnl_rttable_n2a(__u32 id, char *buf, int len);
 const char *rtnl_rtrealm_n2a(int id, char *buf, int len);
 const char *rtnl_dsfield_n2a(int id, char *buf, int len);
+const char *rtnl_group_n2a(int id, char *buf, int len);
 
 int rtnl_rtprot_a2n(__u32 *id, const char *arg);
 int rtnl_rtscope_a2n(__u32 *id, const char *arg);
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 013b4cb..1c3e4da 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -418,7 +418,7 @@ int print_linkinfo(const struct sockaddr_nl *who,
 
 	if (tb[IFLA_GROUP]) {
 		int group = *(int*)RTA_DATA(tb[IFLA_GROUP]);
-		if (group != filter.group)
+		if (filter.group != -1 && group != filter.group)
 			return -1;
 	}
 
@@ -458,6 +458,12 @@ int print_linkinfo(const struct sockaddr_nl *who,
 	if (do_link && tb[IFLA_LINKMODE])
 		print_linkmode(fp, tb[IFLA_LINKMODE]);
 
+	if (tb[IFLA_GROUP]) {
+		SPRINT_BUF(b1);
+		int group = *(int*)RTA_DATA(tb[IFLA_GROUP]);
+		fprintf(fp, "group %s ", rtnl_group_n2a(group, b1, sizeof(b1)));
+	}
+
 	if (filter.showqueue)
 		print_queuelen(fp, tb);
 
@@ -1050,7 +1056,7 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action)
 	if (filter.family == AF_UNSPEC)
 		filter.family = preferred_family;
 
-	filter.group = INIT_NETDEV_GROUP;
+	filter.group = -1;
 
 	if (action == IPADD_FLUSH) {
 		if (argc <= 0) {
diff --git a/lib/rt_names.c b/lib/rt_names.c
index 02f1417..67e4c49 100644
--- a/lib/rt_names.c
+++ b/lib/rt_names.c
@@ -500,3 +500,22 @@ int rtnl_group_a2n(int *id, const char *arg)
 	*id = i;
 	return 0;
 }
+
+const char *rtnl_group_n2a(int id, char *buf, int len)
+{
+	struct rtnl_hash_entry *entry;
+	int i;
+
+	if (!rtnl_group_init)
+		rtnl_group_initialize();
+
+	for (i=0; i<256; i++) {
+		entry = rtnl_group_hash[i];
+		if (entry && entry->id == id) {
+			return entry->name;
+		}
+	}
+
+	snprintf(buf, len, "%d", id);
+	return buf;
+}
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH] fib_rules: fix suppressor names and default values
From: Stefan Tomanek @ 2013-08-03 12:14 UTC (permalink / raw)
  To: netdev; +Cc: David Miller

This change brings the suppressor attribute names into line; it also changes
the data types to provide a more consistent interface.

While -1 indicates that the suppressor is not enabled, values >= 0 for
suppress_prefixlen or suppress_ifgroup  reject routing decisions violating the
constraint.

This changes the previously presented behaviour of suppress_prefixlen, where a
prefix length _less_ than the attribute value was rejected. After this change,
a prefix length less than *or* equal to the value is considered a violation of
the rule constraint.

It also changes the default values for default and newly added rules (disabling
any suppression for those).

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
---
 include/net/fib_rules.h        |    4 ++--
 include/uapi/linux/fib_rules.h |    2 +-
 net/core/fib_rules.c           |   15 +++++++++++----
 net/ipv4/fib_rules.c           |    2 +-
 net/ipv6/fib6_rules.c          |    2 +-
 5 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index d13c461..9d0fcbaa 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -19,7 +19,7 @@ struct fib_rule {
 	u32			flags;
 	u32			table;
 	int			suppress_ifgroup;
-	u8			table_prefixlen_min;
+	int			suppress_prefixlen;
 	u8			action;
 	u32			target;
 	struct fib_rule __rcu	*ctarget;
@@ -84,7 +84,7 @@ struct fib_rules_ops {
 	[FRA_FWMARK]	= { .type = NLA_U32 }, \
 	[FRA_FWMASK]	= { .type = NLA_U32 }, \
 	[FRA_TABLE]     = { .type = NLA_U32 }, \
-	[FRA_TABLE_PREFIXLEN_MIN] = { .type = NLA_U8 }, \
+	[FRA_SUPPRESS_PREFIXLEN] = { .type = NLA_U32 }, \
 	[FRA_SUPPRESS_IFGROUP] = { .type = NLA_U32 }, \
 	[FRA_GOTO]	= { .type = NLA_U32 }
 
diff --git a/include/uapi/linux/fib_rules.h b/include/uapi/linux/fib_rules.h
index 63e3116..2b82d7e 100644
--- a/include/uapi/linux/fib_rules.h
+++ b/include/uapi/linux/fib_rules.h
@@ -45,7 +45,7 @@ enum {
 	FRA_FLOW,	/* flow/class id */
 	FRA_UNUSED6,
 	FRA_SUPPRESS_IFGROUP,
-	FRA_TABLE_PREFIXLEN_MIN,
+	FRA_SUPPRESS_PREFIXLEN,
 	FRA_TABLE,	/* Extended table id */
 	FRA_FWMASK,	/* mask for netfilter mark */
 	FRA_OIFNAME,
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 5040a61..47916b0 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -33,6 +33,9 @@ int fib_default_rule_add(struct fib_rules_ops *ops,
 	r->flags = flags;
 	r->fr_net = hold_net(ops->fro_net);
 
+	r->suppress_prefixlen = -1;
+	r->suppress_ifgroup = -1;
+
 	/* The lock is not required here, the list in unreacheable
 	 * at the moment this function is called */
 	list_add_tail(&r->list, &ops->rules_list);
@@ -340,11 +343,15 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh)
 	rule->action = frh->action;
 	rule->flags = frh->flags;
 	rule->table = frh_get_table(frh, tb);
-	if (tb[FRA_TABLE_PREFIXLEN_MIN])
-		rule->table_prefixlen_min = nla_get_u8(tb[FRA_TABLE_PREFIXLEN_MIN]);
+	if (tb[FRA_SUPPRESS_PREFIXLEN])
+		rule->suppress_prefixlen = nla_get_u32(tb[FRA_SUPPRESS_PREFIXLEN]);
+	else
+		rule->suppress_prefixlen = -1;
 
 	if (tb[FRA_SUPPRESS_IFGROUP])
 		rule->suppress_ifgroup = nla_get_u32(tb[FRA_SUPPRESS_IFGROUP]);
+	else
+		rule->suppress_ifgroup -1;
 
 	if (!tb[FRA_PRIORITY] && ops->default_pref)
 		rule->pref = ops->default_pref(ops);
@@ -531,7 +538,7 @@ static inline size_t fib_rule_nlmsg_size(struct fib_rules_ops *ops,
 			 + nla_total_size(IFNAMSIZ) /* FRA_OIFNAME */
 			 + nla_total_size(4) /* FRA_PRIORITY */
 			 + nla_total_size(4) /* FRA_TABLE */
-			 + nla_total_size(1) /* FRA_TABLE_PREFIXLEN_MIN */
+			 + nla_total_size(4) /* FRA_SUPPRESS_PREFIXLEN */
 			 + nla_total_size(4) /* FRA_SUPPRESS_IFGROUP */
 			 + nla_total_size(4) /* FRA_FWMARK */
 			 + nla_total_size(4); /* FRA_FWMASK */
@@ -558,7 +565,7 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule,
 	frh->table = rule->table;
 	if (nla_put_u32(skb, FRA_TABLE, rule->table))
 		goto nla_put_failure;
-	if (nla_put_u8(skb, FRA_TABLE_PREFIXLEN_MIN, rule->table_prefixlen_min))
+	if (nla_put_u32(skb, FRA_SUPPRESS_PREFIXLEN, rule->suppress_prefixlen))
 		goto nla_put_failure;
 	frh->res1 = 0;
 	frh->res2 = 0;
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index b78fd28..523be38 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -109,7 +109,7 @@ static bool fib4_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg
 	/* do not accept result if the route does
 	 * not meet the required prefix length
 	 */
-	if (result->prefixlen < rule->table_prefixlen_min)
+	if (result->prefixlen <= rule->suppress_prefixlen)
 		goto suppress_route;
 
 	/* do not accept result if the route uses a device
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 3628326..a6c58ce 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -126,7 +126,7 @@ static bool fib6_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg
 	/* do not accept result if the route does
 	 * not meet the required prefix length
 	 */
-	if (rt->rt6i_dst.plen < rule->table_prefixlen_min)
+	if (rt->rt6i_dst.plen <= rule->suppress_prefixlen)
 		goto suppress_route;
 
 	/* do not accept result if the route uses a device
-- 
1.7.10.4

^ permalink raw reply related

* Re: locating the 'tc actions' hook
From: Jamal Hadi Salim @ 2013-08-03 11:49 UTC (permalink / raw)
  To: John Fastabend
  Cc: John Fastabend, Stephen Hemminger, Eric Dumazet, Tom Herbert,
	netdev
In-Reply-To: <51FBFE7B.1010602@gmail.com>



On 13-08-02 02:46 PM, John Fastabend wrote:

> Perhaps another incorrect observation but what protects the tc_actions?
>
> Create a series of actions via 'tc actions' which populates the hash
> table protected by hinfo->lock and also rtnetlink is holding the rtnl
> lock.
>
> Add a filter with index hook to get this action graph attached to a
> filters tcf_exts pointer.
>
> Now for what I think is the race, the classifier will call tcf_exts_exec
> which will call tcf_action_exec() and start walking the actions and
> executing them with the qdisc_lock held.
>
> At the same time tcf_action_destroy() may be called via 'tc actions
> delete' which will only hold the rtnl lock via rtnetlink.
>

One runs in user context and the other in softirq context; so it will
work fine.

cheers,
jamal

^ permalink raw reply

* Re: locating the 'tc actions' hook
From: Jamal Hadi Salim @ 2013-08-03 11:47 UTC (permalink / raw)
  To: John Fastabend
  Cc: John Fastabend, Stephen Hemminger, Eric Dumazet, Tom Herbert,
	netdev
In-Reply-To: <51FAECBF.3030704@intel.com>

On 13-08-01 07:18 PM, John Fastabend wrote:

[..]

> The first being directly related to the previous per queue rate limiter
> patch. With rate limiters per queue on a multiqueue device using mq or
> mqprio I need some mechanism to steer packets to queues. One way to do
> this is to use mqprio and create a 'tc' with a single queue in it.
> And then use iptables or netprio_cgroup to steer packets. Another way
> to do this would be to use 'skbedit queue_mapping' to set the queue from
> 'tc' but unfortunately with the existing flows the queue has already
> been selected by the time the classifiers are called.

I am assuming the skb (mark) will be tagged with a proper meaningful
tag maybe by the driver. Such a tag can be used later up-stack.

>Calling into the
> classifier chain before picking the qdisc would fix this. For flow based
> QOS with multiqueue devices this type of functionality would be useful.
>

 From your description this seems to be ingress side; so we should be
able to use that tag if you set it.


> The second thought that I've been piecing together would be to populate
> the rxhash (or maybe some other field) using the hardware flow
> classifier in some meaningful way for the ingress qdisc.


The rxhash would be useful for further classification or avoiding
further classification.

> Some of the
> existing Intel NICs can do this and I believe other vendors have similar
> capabilities. Although currently with the qdisc lock running around the
> ingress qdisc the multiqueue devices take a perf hit just by
> instantiating the ingress qdisc which really is only using the lock to
> guard some stats and keep the classifier/action chains sane.
>

Instantiating any qdisc is not a problem. You do it once and are done.
There are penalties with using qdiscs in terms of locking.
The locks penalties really have to do with the design of the netdev
not qdiscs i.e queues are centered around netdevs and netdevs
are shared across  processors.


> If you have some good examples it would be great to see them and drop
> them in my testbed. Go ahead and send them to me offlist if you can.
>

will do.

cheers,
jamal


> .John
>

^ permalink raw reply

* [net PATCH 1/1] net: ethernet: davinci_emac: drop IRQF_DISABLED
From: Mugunthan V N @ 2013-08-03 11:09 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-omap, Mugunthan V N

IRQF_DISABLED is a no-op by now and should be removed.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 drivers/net/ethernet/ti/davinci_emac.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 07b176b..1a222bce 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -1568,8 +1568,7 @@ static int emac_dev_open(struct net_device *ndev)
 	while ((res = platform_get_resource(priv->pdev, IORESOURCE_IRQ, k))) {
 		for (i = res->start; i <= res->end; i++) {
 			if (devm_request_irq(&priv->pdev->dev, i, emac_irq,
-					     IRQF_DISABLED,
-					     ndev->name, ndev))
+					     0, ndev->name, ndev))
 				goto rollback;
 		}
 		k++;
-- 
1.8.4.rc0.11.g35f5eaa

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox