Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next-2.6] can: EG20T PCH: use BIT(X)
From: Marc Kleine-Budde @ 2010-11-17 13:04 UTC (permalink / raw)
  To: Tomoya MORINAGA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w, Samuel Ortiz,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w, Wolfgang Grandegger,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w, David S. Miller,
	Christian Pellegrin, qi.wang-ral2JQCrhuEAvxtiuMwx3w
In-Reply-To: <4CE3C90D.6010705-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 4446 bytes --]

On 11/17/2010 01:22 PM, Tomoya MORINAGA wrote:
> Replace bit assignment value to BIT(X).
> For easy to readable/identifiable, replace all bit assigned macros to BIT(X)
> 
> Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>

IMHO you can squash this into the "add  prefix to macro" patch.
You have my Acked-by for both solutions.

cheers, Marc

> ---
>  drivers/net/can/pch_can.c |   73 +++++++++++++++++++++++----------------------
>  1 files changed, 37 insertions(+), 36 deletions(-)
> 
> diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
> index c523e3d..238622a 100644
> --- a/drivers/net/can/pch_can.c
> +++ b/drivers/net/can/pch_can.c
> @@ -38,50 +38,51 @@
>  
>  #define PCH_ENABLE		1 /* The enable flag */
>  #define PCH_DISABLE		0 /* The disable flag */
> -#define PCH_CTRL_INIT		0x0001 /* The INIT bit of CANCONT register. */
> -#define PCH_CTRL_IE		0x0002 /* The IE bit of CAN control register */
> -#define PCH_CTRL_IE_SIE_EIE	0x000e
> -#define PCH_CTRL_CCE		0x0040
> -#define PCH_CTRL_OPT		0x0080 /* The OPT bit of CANCONT register. */
> -#define PCH_OPT_SILENT		0x0008 /* The Silent bit of CANOPT reg. */
> -#define PCH_OPT_LBACK		0x0010 /* The LoopBack bit of CANOPT reg. */
> +#define PCH_CTRL_INIT		BIT(0) /* The INIT bit of CANCONT register. */
> +#define PCH_CTRL_IE		BIT(1) /* The IE bit of CAN control register */
> +#define PCH_CTRL_IE_SIE_EIE	(BIT(3) | BIT(2) | BIT(1))
> +#define PCH_CTRL_CCE		BIT(6)
> +#define PCH_CTRL_OPT		BIT(7) /* The OPT bit of CANCONT register. */
> +#define PCH_OPT_SILENT		BIT(3) /* The Silent bit of CANOPT reg. */
> +#define PCH_OPT_LBACK		BIT(4) /* The LoopBack bit of CANOPT reg. */
> +
>  #define PCH_CMASK_RX_TX_SET	0x00f3
>  #define PCH_CMASK_RX_TX_GET	0x0073
>  #define PCH_CMASK_ALL		0xff
> -#define PCH_CMASK_RDWR		0x80
> -#define PCH_CMASK_ARB		0x20
> -#define PCH_CMASK_CTRL		0x10
> -#define PCH_CMASK_MASK		0x40
> -#define PCH_CMASK_NEWDAT	0x04
> -#define PCH_CMASK_CLRINTPND	0x08
> -#define PCH_IF_MCONT_NEWDAT	0x8000
> -#define PCH_IF_MCONT_INTPND	0x2000
> -#define PCH_IF_MCONT_UMASK	0x1000
> -#define PCH_IF_MCONT_TXIE	0x0800
> -#define PCH_IF_MCONT_RXIE	0x0400
> -#define PCH_IF_MCONT_RMTEN	0x0200
> -#define PCH_IF_MCONT_TXRQXT	0x0100
> -#define PCH_IF_MCONT_EOB	0x0080
> -#define PCH_IF_MCONT_DLC	0x000f
> -#define PCH_IF_MCONT_MSGLOST	0x4000
> -#define PCH_MASK2_MDIR_MXTD	0xc000
> -#define PCH_ID2_DIR		0x2000
> -#define PCH_ID2_XTD		0x4000
> -#define PCH_ID_MSGVAL		0x8000
> -#define PCH_IF_CREQ_BUSY	0x8000
> +#define PCH_CMASK_NEWDAT	BIT(2)
> +#define PCH_CMASK_CLRINTPND	BIT(3)
> +#define PCH_CMASK_CTRL		BIT(4)
> +#define PCH_CMASK_ARB		BIT(5)
> +#define PCH_CMASK_MASK		BIT(6)
> +#define PCH_CMASK_RDWR		BIT(7)
> +#define PCH_IF_MCONT_NEWDAT	BIT(15)
> +#define PCH_IF_MCONT_MSGLOST	BIT(14)
> +#define PCH_IF_MCONT_INTPND	BIT(13)
> +#define PCH_IF_MCONT_UMASK	BIT(12)
> +#define PCH_IF_MCONT_TXIE	BIT(11)
> +#define PCH_IF_MCONT_RXIE	BIT(10)
> +#define PCH_IF_MCONT_RMTEN	BIT(9)
> +#define PCH_IF_MCONT_TXRQXT	BIT(8)
> +#define PCH_IF_MCONT_EOB	BIT(7)
> +#define PCH_IF_MCONT_DLC	(BIT(0) | BIT(1) | BIT(2) | BIT(3))
> +#define PCH_MASK2_MDIR_MXTD	(BIT(14) | BIT(15))
> +#define PCH_ID2_DIR		BIT(13)
> +#define PCH_ID2_XTD		BIT(14)
> +#define PCH_ID_MSGVAL		BIT(15)
> +#define PCH_IF_CREQ_BUSY	BIT(15)
>  
>  #define PCH_STATUS_INT		0x8000
>  #define PCH_REC			0x00007f00
>  #define PCH_TEC			0x000000ff
>  
> -#define PCH_RX_OK		0x00000010
> -#define PCH_TX_OK		0x00000008
> -#define PCH_BUS_OFF		0x00000080
> -#define PCH_EWARN		0x00000040
> -#define PCH_EPASSIV		0x00000020
> -#define PCH_LEC0		0x00000001
> -#define PCH_LEC1		0x00000002
> -#define PCH_LEC2		0x00000004
> +#define PCH_TX_OK		BIT(3)
> +#define PCH_RX_OK		BIT(4)
> +#define PCH_EPASSIV		BIT(5)
> +#define PCH_EWARN		BIT(6)
> +#define PCH_BUS_OFF		BIT(7)
> +#define PCH_LEC0		BIT(0)
> +#define PCH_LEC1		BIT(1)
> +#define PCH_LEC2		BIT(2)
>  #define PCH_LEC_ALL		(PCH_LEC0 | PCH_LEC1 | PCH_LEC2)
>  #define PCH_STUF_ERR		PCH_LEC0
>  #define PCH_FORM_ERR		PCH_LEC1


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 188 bytes --]

_______________________________________________
Socketcan-core mailing list
Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/socketcan-core

^ permalink raw reply

* Re: ping -I eth1 ....
From: Joakim Tjernlund @ 2010-11-17 14:03 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, Thomas Graf
In-Reply-To: <1289989412.2687.18.camel@edumazet-laptop>

Eric Dumazet <eric.dumazet@gmail.com> wrote on 2010/11/17 11:23:32:
>
> Le mercredi 17 novembre 2010 à 11:09 +0100, Joakim Tjernlund a écrit :
> > Eric Dumazet <eric.dumazet@gmail.com> wrote on 2010/11/17 10:51:07:
> > >
> > > Le mercredi 17 novembre 2010 à 10:29 +0100, Joakim Tjernlund a écrit :
> > > > Joakim Tjernlund/Transmode wrote on 2010/11/09 20:33:37:
> > > > >
> > > > > Joakim Tjernlund/Transmode wrote on 2010/11/06 10:42:46:
> > > > > > Thomas Graf <tgr@infradead.org> wrote on 2010/11/05 21:31:50:
> > > > > > >
> > > > > > > On Fri, Nov 05, 2010 at 04:54:18PM +0100, Joakim Tjernlund wrote:
> > > > > > > > Eric Dumazet <eric.dumazet@gmail.com> wrote on 2010/11/05 16:06:54:
> > > > > > > > >
> > > > > > > > > > Hopefully most of that is legacy or just plain wrong? Unless
> > > > > > > > > > someone can say why only test IFF_UP one should consider changing them.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > Most of the places are hot path.
> > > > > > > > >
> > > > > > > > > You dont want to replace one test by four tests.
> > > > > > > > >
> > > > > > > > > _This_ would be wrong :)
> > > > > > > >
> > > > > > > > Wrong is wrong, even if it is in the hot path :)
> > > > > > > > Perhaps it is time define and internal IFF_OPERATIONAL flag
> > > > > > > > which is the sum of IFF_UP, IFF_RUNNING etc.? Tht
> > > > > > > > way you still get one test in the hot path and can abstract
> > > > > > > > what defines an operational link.
> > > > > > >
> > > > > > > You definitely don't want to have your send() call fail simply because
> > > > > > > the carrier was off for a few msec or the routing daemon has put a link
> > > > > > > down temporarly. Also, the outgoing interface looked up at routing
> > > > > > > decision is not necessarly the interface used for sending in the end.
> > > > > > > The packet may get mangled and rerouted by netfilter or tc on the way.
> > > > > >
> > > > > > But do you handle the case when the link is non operational for a long time?
> > > > > >
> > > > > > >
> > > > > > > Personally I'm even ok with the current behaviour of sendto() while the
> > > > > > > socket is bound to an interface but if we choose to return an error
> > > > > > > if the interface is down we might as well do so based on the operational
> > > > > > > status.
> > > >
> > > > > > Perhaps there is a better way. This all started when pppd hung because
> > > > > > of ping -I <ppp interface>, then someone pulled the cable for the on the link.
> > > > > >
> > > > > > This is a strace where we have two ping -I,
> > > > > > ping -I p1-2-1-2-2 .. and ping -I p1-2-3-2-4 ..
> > > > > > Notice how pppd hangs for a long time in PPPIOCDETACH
> > > > > > As far as I can tell this is due to ping -I has claimed the ppp interfaces
> > > > > > and doesn't noticed that the link is down. Ideally ping should receive
> > > > > > a ENODEV as soon as pppd calls PPPIOCDETACH.
> > > > > >
> > > > > >    0.000908 write(0, "Connection terminated.\n", 23) = 23
> > > > > >      0.000481 gettimeofday({1288952770, 566048}, NULL) = 0
> > > > > >      0.001553 ioctl(7, PPPIOCDETACH
> > > > > > Message from syslogd@Brazil at Fri Nov  5 11:26:20 2010 ...
> > > > > > Brazil kernel: unregister_netdevice: waiting for p1-2-1-2-2 to become free. Usage count = 3
> > > > > > Message from syslogd@Brazil at Fri Nov  5 11:26:20 2010 ...
> > > > > > Brazil kernel: unregister_netdevice: waiting for p1-2-3-2-4 to become free. Usage count = 3
> > > > > > Message from syslogd@Brazil at Fri Nov  5 11:26:51 2010 ...
> > > > > > Brazil last message repeated 3 times
> > > > > > , 0xbfbc3398) = 0
> > > > > >     66.559216 connect(9, {sa_family=AF_PPPOX, sa_data="\0\0\0\0\0\0\0\252\273\314\335\356hd"}, 30) = 0
> > > > > >      0.000693 close(10)                 = 0
> > > > > >      0.000449 close(7)                  = 0
> > > > > >      0.009801 close(9)                  = 0
> > > > >
> > > > > Any comment on this last strace? It is expected that ping -I should
> > > > > hold pppd hostage?
> > > > >
> > > >
> > > > Ping?
> > > >
> > >
> > > I thought I posted a patch, is there something else ?
> >
> > yes, I wondered about the above strace and if it is expected that ping -I
> > should hold pppd hostage? Should not ping receive a ENODEV as soon as
> > pppd detaches an interface?
> >
> > >
> > > Could you please test with latest net-next-2.6 and following patch ?
> >
> > I tested the first patch you sent and that one worked well. I can try
> > again on 2.6.35( our boards takes a while to move forward)?
>
> Well, in this case, apply commit :
>
> 332dd96f7ac15e937088fe11f15cfe0210e8edd1
>
> (net/dst: dst_dev_event() called after other notifiers)
>
> http://git2.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=332dd96f7ac15e937088fe11f15cfe0210e8edd1

hmm, with (or without) this and/or your other patch I get:
  vconfig add eth0 1
  ifconfig eth0.1 up
  ping -I eth0.1
<in other session do>
  vconfig rem eth0.1

Now vconfig rem eth0.1 hangs and I get several:
localhost kernel: unregister_netdevice: waiting for eth0.1 to become free. Usage count = 3
After some time vconfig rem eth0.1 succeeds
hmm, last test I did is still stuck, vconfig rem eth0.1 still hangs after 5 minutes.

The ping -I dies right after vconfig rem eth0.1

kernel 2.6.35


^ permalink raw reply

* [PATCH net-2.6] ipv6: Expose reachable and retrans timer values as msecs
From: Thomas Graf @ 2010-11-17 14:12 UTC (permalink / raw)
  To: davem; +Cc: netdev, YOSHIFUJI Hideaki

Expose reachable and retrans timer values in msecs instead of jiffies.
Both timer values are already exposed as msecs in the neighbour table
netlink interface.

The creation timestamp format with increased precision is kept but
cleaned up.

Signed-off-by: Thomas Graf <tgraf@infradead.org>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Index: net-2.6/net/ipv6/addrconf.c
===================================================================
--- net-2.6.orig/net/ipv6/addrconf.c
+++ net-2.6/net/ipv6/addrconf.c
@@ -98,7 +98,11 @@
 #endif
 
 #define	INFINITY_LIFE_TIME	0xFFFFFFFF
-#define TIME_DELTA(a, b) ((unsigned long)((long)(a) - (long)(b)))
+
+static inline u32 cstamp_delta(unsigned long cstamp)
+{
+	return (cstamp - INITIAL_JIFFIES) * 100UL / HZ;
+}
 
 #define ADDRCONF_TIMER_FUZZ_MINUS	(HZ > 50 ? HZ/50 : 1)
 #define ADDRCONF_TIMER_FUZZ		(HZ / 4)
@@ -3444,10 +3448,8 @@ static int put_cacheinfo(struct sk_buff 
 {
 	struct ifa_cacheinfo ci;
 
-	ci.cstamp = (u32)(TIME_DELTA(cstamp, INITIAL_JIFFIES) / HZ * 100
-			+ TIME_DELTA(cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ);
-	ci.tstamp = (u32)(TIME_DELTA(tstamp, INITIAL_JIFFIES) / HZ * 100
-			+ TIME_DELTA(tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ);
+	ci.cstamp = cstamp_delta(cstamp);
+	ci.tstamp = cstamp_delta(tstamp);
 	ci.ifa_prefered = preferred;
 	ci.ifa_valid = valid;
 
@@ -3905,10 +3907,9 @@ static int inet6_fill_ifla6_attrs(struct
 	NLA_PUT_U32(skb, IFLA_INET6_FLAGS, idev->if_flags);
 
 	ci.max_reasm_len = IPV6_MAXPLEN;
-	ci.tstamp = (__u32)(TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) / HZ * 100
-		    + TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ);
-	ci.reachable_time = idev->nd_parms->reachable_time;
-	ci.retrans_time = idev->nd_parms->retrans_time;
+	ci.tstamp = cstamp_delta(idev->tstamp);
+	ci.reachable_time = jiffies_to_msecs(idev->nd_parms->reachable_time);
+	ci.retrans_time = jiffies_to_msecs(idev->nd_parms->retrans_time);
 	NLA_PUT(skb, IFLA_INET6_CACHEINFO, sizeof(ci), &ci);
 
 	nla = nla_reserve(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(s32));

^ permalink raw reply

* Re: [PATCH 3/3] SELinux: return -ECONNREFUSED from ip_postroute to signal fatal error
From: Eric Paris @ 2010-11-17 14:38 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: netdev, linux-kernel, selinux, netfilter-devel, equinox,
	eric.dumazet, davem, hzhong, jmorris, kuznet, paul.moore, pekkas,
	sds, yoshfuji
In-Reply-To: <4CE3BFC4.1010706@trash.net>

On Wed, 2010-11-17 at 12:43 +0100, Patrick McHardy wrote:
> On 16.11.2010 22:52, Eric Paris wrote:
> > The SELinux netfilter hooks just return NF_DROP if they drop a packet.  We
> > want to signal that a drop in this hook is a permanant fatal error and is not
> > transient.  If we do this the error will be passed back up the stack in some
> > places and applications will get a faster interaction that something went
> > wrong.
> 
> Looks good to me. I'd suggest to have these patches go through Dave's
> tree since I want to make use of the netfilter error propagation
> mechanism to return proper errno codes for netfilter re-routing
> failures.


I'd be happy if Dave pulled patches 1 and 2.  I can resend patch #3 once
I can cajole another of the SELinux maintainers to look at it (I believe
he most likely one is on vacation this week)

-Eric


^ permalink raw reply

* Re: [net-2.6 PATCH] ipv6: fix missing in6_ifa_put in addrconf
From: Anders Franzen @ 2010-11-17 15:20 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: John Fastabend, davem@davemloft.net, netdev@vger.kernel.org,
	shemminger@vyatta.com
In-Reply-To: <1289889454.3364.122.camel@edumazet-laptop>

Hi, I was hunting for a bug that a colleague discovered.
When we exit a network namespace, the ns was hanging with dangling
references to dev lo.

When I saw the patch below, I fetched the latest net-next from Daves
repository.

And the problem is gone. Was this really the fix, since it seems to me
that this is a fix to a recently added patch (dont remove address ....).

Did you fix anything else in the Ipv6 addrconf w.r.g dev_hold/dev_put?

netns still have problems with slab corruption during exit though:

 Nov 17 15:00:20 p04 user.err kernel: Slab corruption: size-4096
start=ffff88000612a000, len=4096
Nov 17 15:00:20 p04 user.err kernel: 020: 6b 6b 6b 6b 6b 6b
Nov 17 15:00:20 p04 user.info kernel:  6b 6b 00 00 00 00 00 00 00
Nov 17 15:00:20 p04 user.info kernel:  00

BR
  Anders


On Tue, 2010-11-16 at 07:37 +0100, Eric Dumazet wrote:
> Le lundi 15 novembre 2010 à 22:29 -0800, John Fastabend a écrit :
> > Fix ref count bug introduced by
> > 
> > commit 2de795707294972f6c34bae9de713e502c431296
> > Author: Lorenzo Colitti <lorenzo@google.com>
> > Date:   Wed Oct 27 18:16:49 2010 +0000
> > 
> > ipv6: addrconf: don't remove address state on ifdown if the address
> > is being kept
> > 
> > 
> > Fix logic so that addrconf_ifdown() decrements the inet6_ifaddr
> > refcnt correctly with in6_ifa_put().
> > 
> > Reported-by: Stephen Hemminger <shemminger@vyatta.com>
> > Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> > ---
> > 
> >  net/ipv6/addrconf.c |    6 +++---
> >  1 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> > index b41ce0f..aaa3ca4 100644
> > --- a/net/ipv6/addrconf.c
> > +++ b/net/ipv6/addrconf.c
> > @@ -2754,13 +2754,13 @@ static int addrconf_ifdown(struct net_device *dev, int how)
> >  			ifa->state = INET6_IFADDR_STATE_DEAD;
> >  			spin_unlock_bh(&ifa->state_lock);
> >  
> > -			if (state == INET6_IFADDR_STATE_DEAD) {
> > -				in6_ifa_put(ifa);
> > -			} else {
> > +			if (state != INET6_IFADDR_STATE_DEAD) {
> >  				__ipv6_ifa_notify(RTM_DELADDR, ifa);
> >  				atomic_notifier_call_chain(&inet6addr_chain,
> >  							   NETDEV_DOWN, ifa);
> >  			}
> > +
> > +			in6_ifa_put(ifa);
> >  			write_lock_bh(&idev->lock);
> >  		}
> >  	}
> > 
> 
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
> 
> Thanks again John
> 
> 
> --
> 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-2.6 PATCH] ipv6: fix missing in6_ifa_put in addrconf
From: Eric Dumazet @ 2010-11-17 15:38 UTC (permalink / raw)
  To: Anders Franzen
  Cc: John Fastabend, davem@davemloft.net, netdev@vger.kernel.org,
	shemminger@vyatta.com
In-Reply-To: <1290007231.2222.10.camel@seasc7941.dyn.rnd.as.sw.ericsson.se>

Le mercredi 17 novembre 2010 à 16:20 +0100, Anders Franzen a écrit :
> Hi, I was hunting for a bug that a colleague discovered.
> When we exit a network namespace, the ns was hanging with dangling
> references to dev lo.
> 
> When I saw the patch below, I fetched the latest net-next from Daves
> repository.
> 
> And the problem is gone. Was this really the fix, since it seems to me
> that this is a fix to a recently added patch (dont remove address ....).
> 
> Did you fix anything else in the Ipv6 addrconf w.r.g dev_hold/dev_put?
> 
> netns still have problems with slab corruption during exit though:
> 
>  Nov 17 15:00:20 p04 user.err kernel: Slab corruption: size-4096
> start=ffff88000612a000, len=4096
> Nov 17 15:00:20 p04 user.err kernel: 020: 6b 6b 6b 6b 6b 6b
> Nov 17 15:00:20 p04 user.info kernel:  6b 6b 00 00 00 00 00 00 00
> Nov 17 15:00:20 p04 user.info kernel:  00
> 
> BR
>   Anders
> 
> 

Hi Anders

Several patches of interest :


commit 9d82ca98f71fd686ef2f3017c5e3e6a4871b6e46
(ipv6: fix missing in6_ifa_put in addrconf)

commit 332dd96f7ac15e937088fe11f15cfe0210e8edd1
(net/dst: dst_dev_event() called after other notifiers)

commit ef885afbf8a37689afc1d9d545e2f3e7a8276c17
(net: use rcu_barrier() in rollback_registered_many)



^ permalink raw reply

* Re: [PATCH] 3c59x: fix build failure on !CONFIG_PCI
From: Randy Dunlap @ 2010-11-17 15:58 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: Steffen Klassert, netdev, linux-kernel
In-Reply-To: <1289960532.1663.24.camel@leonhard>

On 11/16/10 18:22, Namhyung Kim wrote:
> 2010-11-16 (화), 09:14 -0800, Randy Dunlap:
>> Hi,
>>
> 
> Hi, Randy
> 
> 
>> Interesting patch.  I have reported this build error and looked
>> into fixing it, but did not come up with this solution.
>>
>> Looking at it more:  if CONFIG_PCI is not enabled, DEVICE_PCI() is NULL.
>> That makes VORTEX_PCI() (with or without your patch) have a value of NULL.
>>
>> Is the line with the reported syntax error (3211) executed in
>> function acpi_set_WOL() ?  If so, let's assume that vp->enable_wol is true.
>> Then what happens on line 3211 (or 3213 after your patch)?
>>
>> 		if (VORTEX_PCI(vp)->current_state < PCI_D3hot)
>> 			return;
>>
>> or if I am really confuzed this morning, please tell me how it works.
>>
> 
> At first glance, I've noticed that the code above could make a NULL
> dereference so I added NULL check prior to the line.
> 
> But after reading more code I realized that other pci-functions called
> in acpi_set_WOL() would not work with NULL pci_dev pointer also. And I
> found all callers of the acpi_set_WOL() already checked NULL pointer
> before the call. Finally I could remove the NULL check and leave the
> code as is. That's how it works. :)

I see.  and concur.  Thanks for the explanation.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply

* Re: [PATCH 2.6.37-rc1] net-next: Add multiqueue support to vmxnet3 driver v3
From: Ben Hutchings @ 2010-11-17 17:23 UTC (permalink / raw)
  To: Shreyas Bhatewara
  Cc: David Miller, shemminger@vyatta.com, netdev@vger.kernel.org,
	pv-drivers@vmware.com, linux-kernel@vger.kernel.org
In-Reply-To: <alpine.LRH.2.00.1011161939500.25227@sbhatewara-dev1.eng.vmware.com>

On Tue, 2010-11-16 at 21:14 -0800, Shreyas Bhatewara wrote:
[...]
> Okay. I am resending the patch with no module params what-so-ever. The default
> is no-multiqueue though. Single queue code has matured and is optimized for
> performance. Multiqueue code has got relatively lesser performance tuning. Since
> there is no way to switch between the two modes as of now, it only makes sense
> to keep the best known as default. When configuration knobs are introduced 
> later, multiqueue can be made default.

But so far as I can see there is currently *no* way to enable multiqueue
without editing the code.  Perhaps there could be an experimental config
option that people can use to enable and test it now, before we sort out
the proper API?

[...]
> diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
> index 21314e0..6f3f905 100644
> --- a/drivers/net/vmxnet3/vmxnet3_drv.c
> +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
[...]
> @@ -176,16 +186,18 @@ vmxnet3_process_events(struct vmxnet3_adapter *adapter)
>  		VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
>  				       VMXNET3_CMD_GET_QUEUE_STATUS);
>  
> -		if (adapter->tqd_start->status.stopped) {
> -			printk(KERN_ERR "%s: tq error 0x%x\n",
> -			       adapter->netdev->name,
> -			       le32_to_cpu(adapter->tqd_start->status.error));
> -		}
> -		if (adapter->rqd_start->status.stopped) {
> -			printk(KERN_ERR "%s: rq error 0x%x\n",
> -			       adapter->netdev->name,
> -			       adapter->rqd_start->status.error);
> -		}
> +		for (i = 0; i < adapter->num_tx_queues; i++)
> +			if (adapter->tqd_start[i].status.stopped)
> +				dev_dbg(&adapter->netdev->dev,
> +					"%s: tq[%d] error 0x%x\n",
> +					adapter->netdev->name, i, le32_to_cpu(
> +					adapter->tqd_start[i].status.error));
> +		for (i = 0; i < adapter->num_rx_queues; i++)
> +			if (adapter->rqd_start[i].status.stopped)
> +				dev_dbg(&adapter->netdev->dev,
> +					"%s: rq[%d] error 0x%x\n",
> +					adapter->netdev->name, i,
> +					adapter->rqd_start[i].status.error);

Why are these being downgraded from 'err' to 'dbg' severity?

[...]
> @@ -1000,8 +1042,8 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
>  	if (le32_to_cpu(tq->shared->txNumDeferred) >=
>  					le32_to_cpu(tq->shared->txThreshold)) {
>  		tq->shared->txNumDeferred = 0;
> -		VMXNET3_WRITE_BAR0_REG(adapter, VMXNET3_REG_TXPROD,
> -				       tq->tx_ring.next2fill);
> +		VMXNET3_WRITE_BAR0_REG(adapter, (VMXNET3_REG_TXPROD +
> +				       tq->qid * 8), tq->tx_ring.next2fill);

This line-wrapping is strange and could be misleading.  I suggest you
put the whole of the expression 'VMXNET3_REG_TXPROD + tq->qid * 8' on
one line.

Similarly in vmxnet3_activate_dev().

>  	}
>  
>  	return NETDEV_TX_OK;
> @@ -1020,7 +1062,10 @@ vmxnet3_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
>  {
>  	struct vmxnet3_adapter *adapter = netdev_priv(netdev);
>  
> -	return vmxnet3_tq_xmit(skb, &adapter->tx_queue, adapter, netdev);
> +		BUG_ON(skb->queue_mapping > adapter->num_tx_queues);
> +		return vmxnet3_tq_xmit(skb,
> +				       &adapter->tx_queue[skb->queue_mapping],
> +				       adapter, netdev);

This is indented wrongly.

[...] 
>  static int
>  vmxnet3_request_irqs(struct vmxnet3_adapter *adapter)
>  {
> -	int err;
> +	struct vmxnet3_intr *intr = &adapter->intr;
> +	int err = 0, i;
> +	int vector = 0;
>  
>  #ifdef CONFIG_PCI_MSI
>  	if (adapter->intr.type == VMXNET3_IT_MSIX) {
> -		/* we only use 1 MSI-X vector */
> -		err = request_irq(adapter->intr.msix_entries[0].vector,
> -				  vmxnet3_intr, 0, adapter->netdev->name,
> -				  adapter->netdev);
> -	} else if (adapter->intr.type == VMXNET3_IT_MSI) {
> +		for (i = 0; i < adapter->num_tx_queues; i++) {
> +			sprintf(adapter->tx_queue[i].name, "%s:v%d-%s",
> +				adapter->netdev->name, vector, "Tx");

The naming convention for IRQs on a multiqueue device is
<devname>[-<type>]-<index> (and <type> is all lower-case).  So this
should be:

			sprintf(adapter->tx_queue[i].name, "%s-tx-%d",
				adapter->netdev->name, i);

Similarly for the RX and other-event interrupts.

[...] 
> @@ -2343,6 +2800,7 @@ vmxnet3_tx_timeout(struct net_device *netdev)
>  
>  	printk(KERN_ERR "%s: tx hang\n", adapter->netdev->name);
>  	schedule_work(&adapter->work);
> +	netif_wake_queue(adapter->netdev);

This hunk doesn't seem relevant to the description of the patch.

[...]
> @@ -2399,8 +2857,32 @@ vmxnet3_probe_device(struct pci_dev *pdev,
>  	struct net_device *netdev;
>  	struct vmxnet3_adapter *adapter;
>  	u8 mac[ETH_ALEN];
> +	int size;
> +	int num_tx_queues = enable_mq == 0 ? 1 : 0;
> +	int num_rx_queues = enable_mq == 0 ? 1 : 0;
> +
> +#ifdef VMXNET3_RSS
> +	if (num_rx_queues == 0)
> +		num_rx_queues = min(VMXNET3_DEVICE_MAX_RX_QUEUES,
> +				    (int)num_online_cpus());
> +	else
> +		num_rx_queues = min(VMXNET3_DEVICE_MAX_RX_QUEUES,
> +				    num_rx_queues);
> +#else
> +	num_rx_queues = 1;
> +#endif
> +
> +	if (num_tx_queues <= 0)
> +		num_tx_queues = min(VMXNET3_DEVICE_MAX_TX_QUEUES,
> +				    (int)num_online_cpus());
> +	else
> +		num_tx_queues = min(VMXNET3_DEVICE_MAX_TX_QUEUES,
> +				    num_tx_queues);

This is a bit opaque; the following would be clearer:

	int num_tx_queues, num_rx_queues;

ifdef VMXNET3_RSS
	if (enable_mq)
		num_rx_queues = min(VMXNET3_DEVICE_MAX_RX_QUEUES,
				    (int)num_online_cpus());
	else
#endif
		num_rx_queues = 1;

	if (enable_mq)
		num_tx_queues = min(VMXNET3_DEVICE_MAX_TX_QUEUES,
				    (int)num_online_cpus());
	else
		num_tx_queues = 1;

> +	netdev = alloc_etherdev_mq(sizeof(struct vmxnet3_adapter),
> +				   num_tx_queues);
> +	printk(KERN_INFO "# of Tx queues : %d, # of Rx queues : %d\n",
> +	       num_tx_queues, num_rx_queues);

If it's possible that num_tx_queues != num_rx_queues then you have to do
something a bit different here:

	netdev = alloc_etherdev_mq(sizeof(struct vmxnet3_adapter),
				   max(num_rx_queues, num_tx_queues));

[...]
> @@ -2482,7 +2994,18 @@ vmxnet3_probe_device(struct pci_dev *pdev,
>  
>  	INIT_WORK(&adapter->work, vmxnet3_reset_work);
>  
> -	netif_napi_add(netdev, &adapter->napi, vmxnet3_poll, 64);
> +	if (adapter->intr.type == VMXNET3_IT_MSIX) {
> +		int i;
> +		for (i = 0; i < adapter->num_rx_queues; i++) {
> +			netif_napi_add(adapter->netdev,
> +				       &adapter->rx_queue[i].napi,
> +				       vmxnet3_poll_rx_only, 64);
> +		}
> +	} else {
> +		netif_napi_add(adapter->netdev, &adapter->rx_queue[0].napi,
> +			       vmxnet3_poll, 64);
> +	}
> +

You need to call netif_set_real_num_{rx,tx}_queues() here (before
register_netdev()) if you have reduced the numbers of queues - e.g. if
there are not enough MSI-X vectors available.

>  	SET_NETDEV_DEV(netdev, &pdev->dev);
>  	err = register_netdev(netdev);
>  
[...]
> @@ -2522,6 +3048,19 @@ vmxnet3_remove_device(struct pci_dev *pdev)
>  {
>  	struct net_device *netdev = pci_get_drvdata(pdev);
>  	struct vmxnet3_adapter *adapter = netdev_priv(netdev);
> +	int size = 0;
> +	int num_rx_queues = enable_mq == 0 ? 1 : 0;
> +
> +#ifdef VMXNET3_RSS
> +	if (num_rx_queues <= 0)
> +		num_rx_queues = min(VMXNET3_DEVICE_MAX_RX_QUEUES,
> +				    (int)num_online_cpus());
> +	else
> +		num_rx_queues = min(VMXNET3_DEVICE_MAX_RX_QUEUES,
> +				    num_rx_queues);
> +#else
> +	num_rx_queues = 1;
> +#endif
>
>  	flush_scheduled_work();
>  
> @@ -2529,10 +3068,15 @@ vmxnet3_remove_device(struct pci_dev *pdev)
>  
>  	vmxnet3_free_intr_resources(adapter);
>  	vmxnet3_free_pci_resources(adapter);
> +#ifdef VMXNET3_RSS
> +	kfree(adapter->rss_conf);
> +#endif
>  	kfree(adapter->pm_conf);
> -	pci_free_consistent(adapter->pdev, sizeof(struct Vmxnet3_TxQueueDesc) +
> -			    sizeof(struct Vmxnet3_RxQueueDesc),
> -			    adapter->tqd_start, adapter->queue_desc_pa);
> +
> +	size = sizeof(struct Vmxnet3_TxQueueDesc) * adapter->num_tx_queues;
> +	size += sizeof(struct Vmxnet3_RxQueueDesc) * num_rx_queues;
> +	pci_free_consistent(adapter->pdev, size, adapter->tqd_start,
> +			    adapter->queue_desc_pa);
>  	pci_free_consistent(adapter->pdev, sizeof(struct Vmxnet3_DriverShared),
>  			    adapter->shared, adapter->shared_pa);
>  	free_netdev(netdev);

Maybe you should store the size of the hypervisor-shared state somewhere
rather than recalculating it here.

[...]
> @@ -2708,6 +3252,7 @@ vmxnet3_init_module(void)
>  {
>  	printk(KERN_INFO "%s - version %s\n", VMXNET3_DRIVER_DESC,
>  		VMXNET3_DRIVER_VERSION_REPORT);
> +	atomic_set(&devices_found, 0);

This hunk doesn't seem relevant to the description of the patch.

[...]
> diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
> index b79070b..9a80106 100644
> --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
> +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
[...]
> +static int
> +vmxnet3_set_rss_indir(struct net_device *netdev,
> +		      const struct ethtool_rxfh_indir *p)
> +{
> +	unsigned int i;
> +	struct vmxnet3_adapter *adapter = netdev_priv(netdev);
> +	struct UPT1_RSSConf *rssConf = adapter->rss_conf;
> +
> +	if (p->size != rssConf->indTableSize)
> +		return -EINVAL;
> +	for (i = 0; i < rssConf->indTableSize; i++) {
> +		if (p->ring_index[i] >= 0 && p->ring_index[i] <
> +		    adapter->num_rx_queues)
> +			rssConf->indTable[i] = p->ring_index[i];
> +		else
> +			rssConf->indTable[i] = i % adapter->num_rx_queues;
[...]

This should return -EINVAL if any of the queue indices are out of range.
ethtool gets the maximum valid queue index from your get_rxnfc()
implementation.

Ben. 

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply

* Re: [PATCH 2.6.37-rc1] net-next: Add multiqueue support to vmxnet3 driver v3
From: David Miller @ 2010-11-17 17:27 UTC (permalink / raw)
  To: bhutchings; +Cc: sbhatewara, shemminger, netdev, pv-drivers, linux-kernel
In-Reply-To: <1290014618.2588.50.camel@bwh-desktop>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 17 Nov 2010 17:23:38 +0000

> On Tue, 2010-11-16 at 21:14 -0800, Shreyas Bhatewara wrote:
> [...]
>> Okay. I am resending the patch with no module params what-so-ever. The default
>> is no-multiqueue though. Single queue code has matured and is optimized for
>> performance. Multiqueue code has got relatively lesser performance tuning. Since
>> there is no way to switch between the two modes as of now, it only makes sense
>> to keep the best known as default. When configuration knobs are introduced 
>> later, multiqueue can be made default.
> 
> But so far as I can see there is currently *no* way to enable multiqueue
> without editing the code.  Perhaps there could be an experimental config
> option that people can use to enable and test it now, before we sort out
> the proper API?

It should be turned on by default, otherwise don't add the code until
it's "ready."

We had slight performance regressions in the past when various drivers
added multiqueue support, but the aggregate performance increased for
multi-flow cases, and this was deemed a fine tradeoff.  I was hoping
you'd use similar logic.

Otherwise, send this stuff when it's ready, and no sooner.

^ permalink raw reply

* Re: [net-next pull-request] Intel Wired LAN Driver Updates
From: David Miller @ 2010-11-17 18:01 UTC (permalink / raw)
  To: Jeffrey.t.kirsher; +Cc: netdev
In-Reply-To: <1289969989.2815.10.camel@jtkirshe-MOBL1>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 16 Nov 2010 20:59:49 -0800

> Here is a batch of fixes/cleanups intended for 2.6.38.  In the mix is added
> support for x540 10GbE MAC.  A large part of the changes are ixgbe cleanup
> patches by Alex.
> 
> Please let me know if there are problems.

Pulled, thanks Jeff.

But in the future you'll need to still post the patches you're asking
me to merge to the list.  Usually folks do this by posting something
like a "Subject: [PATCH 0/N] Intel Wired Lan Driver Updates"
thread-leading posting which contains an overall description of the
changes, as well as the pull request.  This is followed-up with the
actual patches.

This way people can review the changes and reply to any issues they
have on-list with a simple reply to the patch in question.

Thanks.

^ permalink raw reply

* Re: [PATCH 04/10] drivers/net/qla3xxx.c: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:39 UTC (permalink / raw)
  To: joe; +Cc: trivial, ron.mercer, linux-driver, netdev, linux-kernel
In-Reply-To: <de6d97d7116c0889bf2b01e45e99a2b8d1b13410.1289855436.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Mon, 15 Nov 2010 13:12:27 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 01/10] drivers/isdn/i4l: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:39 UTC (permalink / raw)
  To: joe; +Cc: trivial, isdn, netdev, linux-kernel
In-Reply-To: <d653560dec1888cb09d6166a9be3a9b3eeb1cfc9.1289855436.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Mon, 15 Nov 2010 13:12:24 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 02/10] drivers/net/bonding: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:39 UTC (permalink / raw)
  To: joe; +Cc: trivial, fubar, bonding-devel, netdev, linux-kernel
In-Reply-To: <6cbd8cc45eab4a2f85017c5b7ea926781d977c05.1289855436.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Mon, 15 Nov 2010 13:12:25 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 06/10] drivers/net/usb: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:40 UTC (permalink / raw)
  To: joe; +Cc: trivial, petkan, gregkh, linux-usb, netdev, linux-kernel
In-Reply-To: <66a3d7996e4ce8a84610237e86adf4b15a48514a.1289855436.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Mon, 15 Nov 2010 13:12:29 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 03/10] drivers/net/pcmcia: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:39 UTC (permalink / raw)
  To: joe; +Cc: trivial, netdev, linux-kernel
In-Reply-To: <b738d463c9bce47f059e19b8dde5970e53cbf3e4.1289855436.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Mon, 15 Nov 2010 13:12:26 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 05/10] drivers/net/qlge: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:39 UTC (permalink / raw)
  To: joe; +Cc: trivial, ron.mercer, linux-driver, netdev, linux-kernel
In-Reply-To: <3a4c474a1f0fc81c0412abf9d99c0bd0365b9174.1289855436.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Mon, 15 Nov 2010 13:12:28 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 07/10] drivers/net/vxge: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:44 UTC (permalink / raw)
  To: joe
  Cc: trivial, ramkrishna.vepa, sivakumar.subramani, sreenivasa.honnur,
	jon.mason, netdev, linux-kernel
In-Reply-To: <5aee4bf89b5baa6e1d32c99be560893925ed2e19.1289855436.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Mon, 15 Nov 2010 13:12:30 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

VXGE folks, note that this means any patches you send to me need
to take Joe's changes into account.  If you diff against current
net-next-2.6 you'll be fine.

^ permalink raw reply

* Re: [PATCH 10/10] net/atm: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:45 UTC (permalink / raw)
  To: joe; +Cc: trivial, netdev, linux-kernel
In-Reply-To: <0953cd1e1042f41ae839f5b9e4adaffd555c71eb.1289855436.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Mon, 15 Nov 2010 13:12:33 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 08/10] drivers/net: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:45 UTC (permalink / raw)
  To: joe; +Cc: trivial, p_gortmaker, ysato, netdev, linux-kernel
In-Reply-To: <8b57be072e62f8f7d39d4ecd9ce5c999e4f8bbdc.1289855436.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Mon, 15 Nov 2010 13:12:31 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 06/10] drivers/net/usb: Remove unnecessary casts of netdev_priv
From: David Miller @ 2010-11-17 18:45 UTC (permalink / raw)
  To: petkan; +Cc: joe, trivial, petkan, gregkh, linux-usb, netdev, linux-kernel
In-Reply-To: <alpine.DEB.2.00.1011161958320.1392@gabi>

From: Petko Manolov <petkan@nucleusys.com>
Date: Tue, 16 Nov 2010 19:59:29 +0200 (EET)

> ACK! :-)

Please do not top post.

Also, please use a properly formed "Acked-by: " tag if you want
your ACK to actually show up in the commit log message.

Thanks.

^ permalink raw reply

* Re: [PATCH 3/3] SELinux: return -ECONNREFUSED from ip_postroute to signal fatal error
From: David Miller @ 2010-11-17 18:55 UTC (permalink / raw)
  To: eparis
  Cc: kaber, netdev, linux-kernel, selinux, netfilter-devel, equinox,
	eric.dumazet, hzhong, jmorris, kuznet, paul.moore, pekkas, sds,
	yoshfuji
In-Reply-To: <1290004739.14282.73.camel@localhost.localdomain>

From: Eric Paris <eparis@redhat.com>
Date: Wed, 17 Nov 2010 09:38:59 -0500

> On Wed, 2010-11-17 at 12:43 +0100, Patrick McHardy wrote:
>> On 16.11.2010 22:52, Eric Paris wrote:
>> > The SELinux netfilter hooks just return NF_DROP if they drop a packet.  We
>> > want to signal that a drop in this hook is a permanant fatal error and is not
>> > transient.  If we do this the error will be passed back up the stack in some
>> > places and applications will get a faster interaction that something went
>> > wrong.
>> 
>> Looks good to me. I'd suggest to have these patches go through Dave's
>> tree since I want to make use of the netfilter error propagation
>> mechanism to return proper errno codes for netfilter re-routing
>> failures.
> 
> 
> I'd be happy if Dave pulled patches 1 and 2.  I can resend patch #3 once
> I can cajole another of the SELinux maintainers to look at it (I believe
> he most likely one is on vacation this week)

I think it's best to pull this all into net-next-2.6 now, so that's what
I'm doing right now.

If there are problems we can apply changes on top.

Thanks.

^ permalink raw reply

* Re: [PATCH 1/3] netfilter: allow hooks to pass error code back up the stack
From: David Miller @ 2010-11-17 18:55 UTC (permalink / raw)
  To: eparis
  Cc: netdev, linux-kernel, selinux, netfilter-devel, equinox,
	eric.dumazet, hzhong, jmorris, kaber, kuznet, paul.moore, pekkas,
	sds, yoshfuji
In-Reply-To: <20101116215238.6727.39248.stgit@paris.rdu.redhat.com>

From: Eric Paris <eparis@redhat.com>
Date: Tue, 16 Nov 2010 16:52:38 -0500

> SELinux would like to pass certain fatal errors back up the stack.  This patch
> implements the generic netfilter support for this functionality.
> 
> Based-on-patch-by: Patrick McHardy <kaber@trash.net>
> Signed-off-by: Eric Paris <eparis@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/3] network: tcp_connect should return certain errors up the stack
From: David Miller @ 2010-11-17 18:56 UTC (permalink / raw)
  To: eparis
  Cc: netdev, linux-kernel, selinux, netfilter-devel, equinox,
	eric.dumazet, hzhong, jmorris, kaber, kuznet, paul.moore, pekkas,
	sds, yoshfuji
In-Reply-To: <20101116215249.6727.89763.stgit@paris.rdu.redhat.com>

From: Eric Paris <eparis@redhat.com>
Date: Tue, 16 Nov 2010 16:52:49 -0500

> The current tcp_connect code completely ignores errors from sending an skb.
> This makes sense in many situations (like -ENOBUFFS) but I want to be able to
> immediately fail connections if they are denied by the SELinux netfilter hook.
> Netfilter does not normally return ECONNREFUSED when it drops a packet so we
> respect that error code as a final and fatal error that can not be recovered.
> 
> Based-on-patch-by: Patrick McHardy <kaber@trash.net>
> Signed-off-by: Eric Paris <eparis@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH 3/3] SELinux: return -ECONNREFUSED from ip_postroute to signal fatal error
From: David Miller @ 2010-11-17 18:56 UTC (permalink / raw)
  To: eparis
  Cc: netdev, linux-kernel, selinux, netfilter-devel, equinox,
	eric.dumazet, hzhong, jmorris, kaber, kuznet, paul.moore, pekkas,
	sds, yoshfuji
In-Reply-To: <20101116215257.6727.12163.stgit@paris.rdu.redhat.com>

From: Eric Paris <eparis@redhat.com>
Date: Tue, 16 Nov 2010 16:52:57 -0500

> The SELinux netfilter hooks just return NF_DROP if they drop a packet.  We
> want to signal that a drop in this hook is a permanant fatal error and is not
> transient.  If we do this the error will be passed back up the stack in some
> places and applications will get a faster interaction that something went
> wrong.
> 
> Signed-off-by: Eric Paris <eparis@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH] drivers/isdn/hisax: Add printf format/argument verification and fix fallout
From: David Miller @ 2010-11-17 18:58 UTC (permalink / raw)
  To: joe; +Cc: linux-kernel, isdn, netdev
In-Reply-To: <f92d95e7dc0afca09c2d76880b76973e4eafb169.1289451201.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Wed, 10 Nov 2010 20:54:58 -0800

> Add __attribute__((format... to several functins
> Make formats and arguments match.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thanks.

^ permalink raw reply


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