Re: simplify configfs attributes

2015-09-26 Thread Christoph Hellwig
On Sat, Sep 26, 2015 at 04:49:06PM -0700, Nicholas A. Bellinger wrote: > That said, it would probably make sense to merge via target-pending.git > and get this series into linux-next ASAP. Sounds good to me! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a mess

Re: [PATCH net-next 0/4] ila: Use NF_INET_PRE_ROUTING nfhook

2015-09-26 Thread David Miller
From: Tom Herbert Date: Thu, 24 Sep 2015 09:30:20 -0700 > This patch set addresses the issue for ILA by adding a fast locator > lookup that occurs before early demux. This is done by using a hook > at NF_INET_PRE_ROUTING. For the backend we implement an rhashtable > that contains identifier to lo

Re: [PATCH 16/19] r8169: fix handling rtl_readphy result

2015-09-26 Thread David Miller
From: Andrzej Hajda Date: Thu, 24 Sep 2015 16:00:24 +0200 > The function can return negative value. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 > >

Re: [PATCH 07/19] net: hisilicon: fix handling platform_get_irq result

2015-09-26 Thread David Miller
From: Andrzej Hajda Date: Thu, 24 Sep 2015 16:00:15 +0200 > The function can return negative value. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 > >

Re: [PATCH net-next 0/2] vxlan: support both IPv4 and IPv6 sockets

2015-09-26 Thread David Miller
From: Jiri Benc Date: Thu, 24 Sep 2015 13:50:00 +0200 > Note: this needs net merged into net-next in order to apply. > > It's currently not easy enough to work with metadata based vxlan tunnels. In > particular, it's necessary to create separate network interfaces for IPv4 > and IPv6 tunneling.

Re: [PATCH v2 RFC] 8139cp: Fix GSO MSS handling

2015-09-26 Thread David Miller
From: David Woodhouse Date: Thu, 24 Sep 2015 11:38:22 +0100 > When fixing the TSO support I noticed we just mask ->gso_size with the > MSSMask value and don't care about the consequences. > > Provide a .ndo_features_check() method which drops the NETIF_F_TSO > feature for any skb which would exc

Re: [PATCH] netpoll: Drop budget parameter from NAPI polling call hierarchy

2015-09-26 Thread David Miller
From: Alexander Duyck Date: Tue, 22 Sep 2015 14:56:08 -0700 > Rather than carry around a value of budget that is 0 or less we can instead > just loop through and pass 0 to each napi->poll call. If any driver > returns a value for work done that is non-zero then we can report that > driver and co

Re: [PATCH] net/mlx4: Handle return codes in mlx4_qp_attach_common

2015-09-26 Thread Or Gerlitz
On Fri, Sep 25, 2015 at 5:39 PM, Robb Manes wrote: > Both new_steering_entry() and existing_steering_entry() return values > based on their success or failure, but currently they fall through > silently. This can make troubleshooting difficult, as we were unable > to tell which one of these two f

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-09-26 Thread Eric Dumazet
On Sat, 2015-09-26 at 19:02 -0700, Tolga Ceylan wrote: > By keeping hiscore/matches as is, I'm trying to keep the hashing consistent. > Otherwise, this would behave similar to removing a listener which > drops connections. Right, this problem will soon disappear when listener rewrite is complete.

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-09-26 Thread Tolga Ceylan
On Sat, Sep 26, 2015 at 6:44 PM, Aaron Conole wrote: > Greetings. > > Tolga Ceylan writes: >> +#define SO_REUSEPORT_LISTEN_OFF 51 >> + > For all of these, I think the space should be tab. > >> unsigned char skc_reuseport:1; >>+ unsigned char skc_reuseport_listen_off:1;

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-09-26 Thread Aaron Conole
Greetings. Tolga Ceylan writes: > +#define SO_REUSEPORT_LISTEN_OFF 51 > + For all of these, I think the space should be tab. > unsigned char skc_reuseport:1; >+ unsigned char skc_reuseport_listen_off:1; > unsigned char skc_ipv6only:1; The spacing here i

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-09-26 Thread Tolga Ceylan
On Sat, Sep 26, 2015 at 6:04 PM, Eric Dumazet wrote: > > What about listen(fd, 0) ? > > Not sure we need to add a new socket option. > > It makes sense to extend reuseport logic to ignore listeners with a 0 > backlog (if not already done, I did not check) > > Just checked this and no listen(fd, 0

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-09-26 Thread Eric Dumazet
On Sat, 2015-09-26 at 17:30 -0700, Tolga Ceylan wrote: > For applications using SO_REUSEPORT listeners, there is > no clean way to switch traffic on/off or add/remove > listeners without dropping pending connections. With this > patch, applications can turn off queueing of new connections > for a s

[PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-09-26 Thread Tolga Ceylan
For applications using SO_REUSEPORT listeners, there is no clean way to switch traffic on/off or add/remove listeners without dropping pending connections. With this patch, applications can turn off queueing of new connections for a specific listener socket which enables implementation of zero down

Re: simplify configfs attributes

2015-09-26 Thread Nicholas A. Bellinger
On Fri, 2015-09-25 at 06:49 -0700, Christoph Hellwig wrote: > This series consolidates the code to implement configfs attributes > by providing the ->show and ->store method in common code and using > container_of in the methods to access the containing structure. > > This reduces source and binar

Re: [PATCH 01/23] configfs: add show and store methods to struct configfs_attribute

2015-09-26 Thread Nicholas A. Bellinger
On Fri, 2015-09-25 at 06:49 -0700, Christoph Hellwig wrote: > Add methods to struct configfs_attribute to directly show and store > attributes without adding boilerplate code to every user. In addition > to the methods this also adds 3 helper macros to define read/write, > read-only and write-only

Re: [PATCH 19/23] target: use per-attribute show and store methods

2015-09-26 Thread Nicholas A. Bellinger
On Fri, 2015-09-25 at 06:49 -0700, Christoph Hellwig wrote: > This also allows to remove the target-specific old configfs macros, and > gets rid of the target_core_fabric_configfs.h header which only had one > function declaration left that could be moved to a better place. > > Signed-off-by: Chri

[PATCH v4 1/2] [net] af_unix: Convert the unix_sk macro to an inline function for type safety

2015-09-26 Thread Aaron Conole
As suggested by Eric Dumazet this change replaces the #define with a static inline function to enjoy complaints by the compiler when misusing the API. Signed-off-by: Aaron Conole --- include/net/af_unix.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/net/af_u

[PATCH v4 2/2] [net] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag

2015-09-26 Thread Aaron Conole
AF_UNIX sockets now return multiple skbs from recv() when MSG_PEEK flag is set. This is referenced in kernel bugzilla #12323 @ https://bugzilla.kernel.org/show_bug.cgi?id=12323 As described both in the BZ and lkml thread @ http://lkml.org/lkml/2008/1/8/444 calling recv() with MSG_PEEK on an AF_UN

[PATCH v4 0/2] [net] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag

2015-09-26 Thread Aaron Conole
This patch set implements a bugfix for kernel.org bugzilla #12323, allowing MSG_PEEK to return all queued data on the unix domain socket, not just the data contained in a single SKB. This is the v3 version of this patch, which includes a suggested modification by Eric Dumazet to convert the unix_

[PATCH V5 1/2] ACPI / EC: Fix broken 64bit big-endian users of 'global_lock'

2015-09-26 Thread Viresh Kumar
global_lock is defined as an unsigned long and accessing only its lower 32 bits from sysfs is incorrect, as we need to consider other 32 bits for big endian 64-bit systems. There are no such platforms yet, but the code needs to be robust for such a case. Fix that by changing type of 'global_lock'

[PATCH V5 2/2] debugfs: Pass bool pointer to debugfs_create_bool()

2015-09-26 Thread Viresh Kumar
Its a bit odd that debugfs_create_bool() takes 'u32 *' as an argument, when all it needs is a boolean pointer. It would be better to update this API to make it accept 'bool *' instead, as that will make it more consistent and often more convenient. Over that bool takes just a byte. That required

Re: netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Tejun Heo
Hello, On Sun, Sep 27, 2015 at 04:10:41AM +0800, Herbert Xu wrote: > Well guess what the bug that you have discovered supposedly due to > a missing barrier in netlink_connect has nothing to do with the > barrier. Instead it is caused by a logical error elsewhere that > would have gone unnoticed o

Re: netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Herbert Xu
On Sat, Sep 26, 2015 at 04:05:18PM -0400, Tejun Heo wrote: > > Frankly, I don't understand what you've been trying to achieve. > You're actively disregarding best practices (like terminating > synchronization where it starts) and reach the target state by doing a > browian motion in the solution s

Re: netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Tejun Heo
Hello, On Sun, Sep 27, 2015 at 03:55:48AM +0800, Herbert Xu wrote: > Well I disagree. When I say that it returns to user-space I really > mean that the next time we use portid via the same call path that > triggered the connect we must be checking nlk->bound anyway. > > Good luck finding more bu

Re: netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Herbert Xu
On Sat, Sep 26, 2015 at 03:52:45PM -0400, Tejun Heo wrote: > > Ah, yeah, you're right. We need to check that there because it may > contain a garbage value. I still think it'd better to use > netlink_bound() test in connect() too tho. Well I disagree. When I say that it returns to user-space I

Re: netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Tejun Heo
Hello, On Sun, Sep 27, 2015 at 03:49:16AM +0800, Herbert Xu wrote: > If the autobind is not complete then netlink_getname must return > zero rather than some garbage portid that belongs to somebody > else's socket. That's what we did before any of this lockless > code was introduced. > > If you

Re: [PATCH V4 1/2] ACPI / EC: Fix broken 64bit big-endian users of 'global_lock'

2015-09-26 Thread James Bottomley
On Fri, 2015-09-25 at 22:58 +0200, Rafael J. Wysocki wrote: > On Friday, September 25, 2015 01:25:49 PM Viresh Kumar wrote: > > On 25 September 2015 at 13:33, Rafael J. Wysocki wrote: > > > You're going to change that into bool in the next patch, right? > > > > Yeah. > > > > > So what if bool is

Re: netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Herbert Xu
On Sat, Sep 26, 2015 at 03:45:54PM -0400, Tejun Heo wrote: > Hello, Herbert. > > On Sun, Sep 27, 2015 at 03:41:10AM +0800, Herbert Xu wrote: > > Thread 1Thread 2 > > sendmsg getsockname > > netlink_autobindnetlink_getname > > > >

Re: netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Tejun Heo
Hello, Herbert. On Sun, Sep 27, 2015 at 03:41:10AM +0800, Herbert Xu wrote: > Thread 1 Thread 2 > sendmsg getsockname > netlink_autobindnetlink_getname > > Thread 2 should not have to do anything special to guarantee that >

[no subject]

2015-09-26 Thread Микола Дрючатий
unsubscribe netdev -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Herbert Xu
On Sat, Sep 26, 2015 at 02:09:03PM -0400, Tejun Heo wrote: > > > @@ -1628,7 +1632,7 @@ static int netlink_getname(struct socket *sock, > > struct sockaddr *addr, > > nladdr->nl_pid = nlk->dst_portid; > > nladdr->nl_groups = netlink_group_mask(nlk->dst_group); > > } else

Re: [PATCH V4 1/2] ACPI / EC: Fix broken 64bit big-endian users of 'global_lock'

2015-09-26 Thread Arnd Bergmann
On Saturday 26 September 2015 11:40:00 Viresh Kumar wrote: > On 25 September 2015 at 15:19, Rafael J. Wysocki wrote: > > So if you allow something like debugfs to update your structure, how > > do you make sure there is the proper locking? > > Not really sure at all.. Isn't there some debugfs loc

[PATCH v3 3/3] net: irda: pxaficp_ir: dmaengine conversion

2015-09-26 Thread Robert Jarzmik
Convert pxaficp_ir to dmaengine. As pxa architecture is shifting from raw DMA registers access to pxa_dma dmaengine driver, convert this driver to dmaengine. Signed-off-by: Robert Jarzmik Tested-by: Petr Cvek --- Since v1: removed mach/dma.h include, which is the goal --- drivers/net/irda/pxafi

[PATCH v3 2/3] net: irda: pxaficp_ir: convert to readl and writel

2015-09-26 Thread Robert Jarzmik
Convert the pxa IRDA driver to readl and writel primitives, and remove another set of direct registers access. This leaves only the DMA registers access, which will be dealt with dmaengine conversion. Signed-off-by: Robert Jarzmik Tested-by: Petr Cvek --- Since v1: modified __REG macro to cope w

[PATCH v3 1/3] net: irda: pxaficp_ir: use sched_clock() for time management

2015-09-26 Thread Robert Jarzmik
Instead of using directly the OS timer through direct register access, use the standard sched_clock(), which will end up in OSCR reading anyway. This is a first step for direct access register removal and machine specific code removal from this driver. This commit changes the behavior, as previou

Re: [PATCH V4 1/2] ACPI / EC: Fix broken 64bit big-endian users of 'global_lock'

2015-09-26 Thread Viresh Kumar
On 25 September 2015 at 15:19, Rafael J. Wysocki wrote: > So if you allow something like debugfs to update your structure, how > do you make sure there is the proper locking? Not really sure at all.. Isn't there some debugfs locking that will jump in, to avoid updation of fields to the same devic

Re: netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Tejun Heo
Hello, Herbert. On Sat, Sep 26, 2015 at 09:16:21PM +0800, Herbert Xu wrote: > You misunderstood what I wrote. I was not basing this on whether > user-space transitions contained a barrier, but on the fact that > the next syscall must recheck nlk->bound before using nlk->portid. But that isn't wh

Re: Forcing the output interface using ip6_route_output doesn't work

2015-09-26 Thread Wolfgang Nothdurft
Am 25.09.2015 um 23:13 schrieb David Ahern: On 9/25/15 7:56 AM, Wolfgang Nothdurft wrote: It seems that the ip6_route_output(net, sk, fl6) kernel function ignores the fl6.flowi6_oif parameter for the routing decision. It is considered, but a mismatch is not considered fatal. I think the attac

Re: [PATCH 2/2] Convert smsc911x to use ACPI as well as DT

2015-09-26 Thread David Woodhouse
On Fri, 2015-09-25 at 16:28 +0100, Catalin Marinas wrote: > > This only works as long as they target an existing driver with prior DT > support (usually with reviewed bindings). If they have a new driver and > only ACPI in mind, I'm pretty sure we'll end up with new insane things. > That's why we

Re: [PATCH net-next 01/11] net: Introduce L3 Master device abstraction

2015-09-26 Thread Nikolay Aleksandrov
<<>> > + * l3mdev_master_ifindex - get index of L3 master device > + * @dev: targeted interface > + */ > + > +int l3mdev_master_ifindex_rcu(struct net_device *dev) > +{ > + int ifindex = 0; > + > + if (!dev) > + return 0; > + > + if (netif_is_l3_master(dev)) { > +

netlink: Add netlink_bound helper and use it in netlink_getname

2015-09-26 Thread Herbert Xu
On Fri, Sep 25, 2015 at 11:01:13AM -0400, Tejun Heo wrote: > > I'm not even sure we guarantee memory barrier on kernel/user > crossings. In practice, we probably have enough barriers (e.g. some > syscall traps imply barrier) but I can't think of a reason why we'd > guarantee the existence of barr