[PATCH 00/11] Convert the posix_clock_operations and k_clock structure to ready for 2038

2015-04-19 Thread Baolin Wang
This patch series changes the 32-bit time type (timespec/itimerspec) to the 64-bit one (timespec64/itimerspec64), since 32-bit time types will break in the year 2038. This patch series introduces new methods with timespec64/itimerspec64 type, and removes the old ones with timespec/itimerspec type

[PATCH 05/11] time/posix-timers:Convert to the 64bit methods for k_clock callback functions

2015-04-19 Thread Baolin Wang
This patch converts the timepsec type to timespec64 type, and converts the itimerspec type to itimerspec64 type for the k_clock callback functions. This patch also converts the timespec type to timespec64 type for timekeeping_clocktai() function which is used only in the posix-timers.c file. Sig

[PATCH 08/11] time/posix-clock:Convert to the 64bit methods for k_clock and posix_clock_operations structure

2015-04-19 Thread Baolin Wang
This patch converts the posix clock operations over to the new methods with timespec64/itimerspec64 type to making them ready for 2038, and it is based on the ptp patch series. And also changes to the 64bit methods for k_clock structure, that converts the timespec/itimerspec type to timespec64/iti

[PATCH 01/11] linux/time64.h:Introduce the 'struct itimerspec64' for 64bit

2015-04-19 Thread Baolin Wang
This patch introduces the 'struct itimerspec64' for 64bit to replace itimerspec, and also introduces the conversion methods: itimerspec64_to_itimerspec() and itimerspec_to_itimerspec64(), that makes itimerspec to ready for 2038 year. Signed-off-by: Baolin Wang --- include/linux/time64.h | 13 +

[PATCH 04/11] posix timers:Introduce the 64bit methods with timespec64 type for k_clock structure

2015-04-19 Thread Baolin Wang
This patch introduces the new methods with timespec64 type for k_clcok structure, converts the timepsec type to timespec64 type in k_clock structure and converts the itimerspec type to itimerspec64 type to ready for 2038 issue. And also introduces the 64bit methods with timespec64 type for the fr

[PATCH 09/11] cputime:Introduce the cputime_to_timespec64/timespec64_to_cputime function

2015-04-19 Thread Baolin Wang
This patch introduces some functions for converting cputime to timespec64 and back, that repalce the timespec type with timespec64 type, as well as for arch/s390 and arch/powerpc architecture. And these new methods will replace the old cputime_to_timespec/timespec_to_cputime function to ready f

[PATCH 11/11] k_clock:Remove the 32bit methods with timespec type

2015-04-19 Thread Baolin Wang
All of the k_clock users have been converted to the new methods. This patch removes the older methods with timepsec/itimerspec type. As a result, the k_clock structure is ready for the year 2038. Signed-off-by: Baolin Wang --- include/linux/posix-timers.h |9 -- kernel/time/posix-timer

[PATCH 03/11] time/hrtimer:Introduce hrtimer_get_res64() with timespec64 type for getting the timer resolution

2015-04-19 Thread Baolin Wang
This patch introduces hrtimer_get_res64() function to get the timer resolution with timespec64 type, and moves the hrtimer_get_res() function into include/linux/hrtimer.h as a 'static inline' helper that just calls hrtimer_get_res64. It is ready for 2038 year when getting the timer resolution by

[PATCH 10/11] time/posix-cpu-timers:Convert to the 64bit methods for k_clock structure

2015-04-19 Thread Baolin Wang
This patch changes to the new methods of k_clock structure with timespec64 type, converts the timespec/itimerspec type to timespec64/itimerspec64 type for the callback function in posix-cpu-timers.c file. Signed-off-by: Baolin Wang --- kernel/time/posix-cpu-timers.c | 83 +-

[PATCH 06/11] char/mmtimer:Convert to the 64bit methods for k_clock callback function

2015-04-19 Thread Baolin Wang
This patch converts to the 64bit methods for k_clock callback function, that converts the timespec type to timespec64 type and converts the itimerspec type to itimerspec64 type. Signed-off-by: Baolin Wang --- drivers/char/mmtimer.c | 36 +--- 1 file changed, 17

[PATCH 02/11] timekeeping:Introduce the current_kernel_time64() function with timespec64 type

2015-04-19 Thread Baolin Wang
This patch adds current_kernel_time64() function with timespec64 type, and makes current_kernel_time() 'static inline' and moves it to timekeeping.h file. It is convenient for user to get the current kernel time with timespec64 type, and delete the current_kernel_time() function easily in timekeep

[PATCH 07/11] time/alarmtimer:Convert to the new methods for k_clock structure

2015-04-19 Thread Baolin Wang
This patch changes to the new methods with timespec64/itimerspec64 type of k_clock structure, and converts the timespec/itimerspec type to timespec64/itimerspec64 typein alarmtimer.c file. Signed-off-by: Baolin Wang --- kernel/time/alarmtimer.c | 43 ++-

[PATCH iproute2] tc util: Fix possible buffer overflow when print class id

2015-04-19 Thread Vadim Kochan
From: Vadim Kochan Use correct handle buffer length. Signed-off-by: Vadim Kochan --- tc/tc_util.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tc/tc_util.c b/tc/tc_util.c index 1d3153d..dc2b70f 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -128,30

Re: [PATCH] neighbour.c: Avoid GC directly after state change

2015-04-19 Thread YOSHIFUJI Hideaki
Hi, Ulf Samuelsson wrote: >> From RFC2461: >> >> | REACHABLE Roughly speaking, the neighbor is known to have been >> | reachable recently (within tens of seconds ago). >> : >> | STALE The neighbor is no longer known to be reachable but >> | unti

Re: [PATCH v2 2/2] checkpatch: suggest using eth_zero_addr() and eth_broadcast_addr()

2015-04-19 Thread Joe Perches
On Mon, 2015-04-20 at 00:16 +0200, Mateusz Kulikowski wrote: > Suggest using eth_zero_addr() or eth_broadcast_addr() instead of memset(). Hi again Mateusz > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -5042,6 +5042,22 @@ sub process { >"Prefer et

Re: [PATCH v3] Renesas Ethernet AVB driver

2015-04-19 Thread Lino Sanfilippo
Hi, On 20.04.2015 00:10, Sergei Shtylyov wrote: > >> I recall a thread in which the use of bitfields for structs that are >> shared with the hardware was considered a bad idea (because the compiler >> is free to reorder the fields). Shift operations are probably a better >> choice here. > >

[PATCH v2 1/2] checkpatch: suggest using ether_addr_equal*()

2015-04-19 Thread Mateusz Kulikowski
Check if memcmp() is used to compare ethernet addresses and suggest using ether_addr_equal() or ether_addr_equal_unaligned() Signed-off-by: Mateusz Kulikowski --- scripts/checkpatch.pl | 7 +++ 1 file changed, 7 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index

[PATCH v2 0/2] checkpatch: new ethernet address manipulation checks

2015-04-19 Thread Mateusz Kulikowski
Changes in v2 (applied review comments): - Fixed indentation in both patches - Detect memset(foo, 0x00, ETH_ALEN) - Detect memset(foo, 255, ETH_ALEN) - Rephrased 2/2 commit message Patch Notes from v1: Add 3 new warnings to checkpatch: 1) PREFER_ETHER_ADDR_EQUAL Replace memcmp(foo, bar, ETH_ALEN)

[PATCH v2 2/2] checkpatch: suggest using eth_zero_addr() and eth_broadcast_addr()

2015-04-19 Thread Mateusz Kulikowski
Suggest using eth_zero_addr() or eth_broadcast_addr() instead of memset(). Signed-off-by: Mateusz Kulikowski --- scripts/checkpatch.pl | 16 1 file changed, 16 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b9ea436..aee6d43 100755 --- a/scripts/c

Re: [PATCH v3] Renesas Ethernet AVB driver

2015-04-19 Thread Sergei Shtylyov
Hello. On 04/14/2015 03:49 AM, Lino Sanfilippo wrote: +struct ravb_desc { +#ifdef __LITTLE_ENDIAN + u32 ds: 12; /* Descriptor size */ + u32 cc: 12; /* Content control */ + u32 die: 4; /* Descriptor interrupt enable */ + /* 0: disable, other: e

Re: [PATCH 2/2] checkpatch: suggest using eth_zero_addr() and eth_broadcast_addr()

2015-04-19 Thread Mateusz Kulikowski
Hi Joe, On 19.04.2015 22:20, Joe Perches wrote: (...) >> +# check for memset(foo, 0xFF, ETH_ALEN) that could be eth_broadcast_addr >> +if ($^V && $^V ge 5.10.0 && >> +$line =~ >> /^\+(?:.*?)\bmemset\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\,\s*ETH_ALEN\s*\)/s) { > > Plea

[PATCH] etherdevice: Add ether_addr_copy_unaligned

2015-04-19 Thread Mateusz Kulikowski
Some drivers require copying unaligned ethernet addresses. Using memcpy() causes checkpatch warnings and may cause regressions (someone will "fix" alignment of packed structure) Signed-off-by: Mateusz Kulikowski --- include/linux/etherdevice.h | 16 1 file changed, 16 insertions

Re: [PATCH 1/2] checkpatch: suggest using ether_addr_equal*()

2015-04-19 Thread Joe Perches
On Sun, 2015-04-19 at 21:04 +0200, Mateusz Kulikowski wrote: > Check if memcmp() is used to compare ethernet addresses and suggest using > ether_addr_equal() or ether_addr_equal_unaligned() Hi again Mateusz. This is OK with me. If you ever submit that ether_addr_copy_unaligned patch, please upda

Re: [PATCH 2/2] checkpatch: suggest using eth_zero_addr() and eth_broadcast_addr()

2015-04-19 Thread Joe Perches
On Sun, 2015-04-19 at 21:04 +0200, Mateusz Kulikowski wrote: > Suggest using eth_zero_addr() or eth_broadcast_addr() if memset is used > instead. Hi Mateusz, this is OK but here are some notes: > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -5042,6 +5042,22 @@ sub process {

[PATCH 0/2] checkpatch: new ethernet address manipulation checks

2015-04-19 Thread Mateusz Kulikowski
Add 3 new warnings to checkpatch: 1) PREFER_ETHER_ADDR_EQUAL Replace memcmp(foo, bar, ETH_ALEN) with ether_addr_equal*() 2) PREFER_ETH_ZERO_ADDR Replace memset(foo, 0, ETH_ALEN) with eth_zero_addr() 3) PREFER_ETH_BROADCAST_ADDR Replace memset(foo, 0xFF, ETH_ALEN) with eth_broadcast_addr() Mateusz

[PATCH 2/2] checkpatch: suggest using eth_zero_addr() and eth_broadcast_addr()

2015-04-19 Thread Mateusz Kulikowski
Suggest using eth_zero_addr() or eth_broadcast_addr() if memset is used instead. Signed-off-by: Mateusz Kulikowski --- scripts/checkpatch.pl | 16 1 file changed, 16 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3a1a01e..1fc0819 100755 --- a/scr

[PATCH 1/2] checkpatch: suggest using ether_addr_equal*()

2015-04-19 Thread Mateusz Kulikowski
Check if memcmp() is used to compare ethernet addresses and suggest using ether_addr_equal() or ether_addr_equal_unaligned() Signed-off-by: Mateusz Kulikowski --- scripts/checkpatch.pl | 7 +++ 1 file changed, 7 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index

RE: [PATCH] bnx2x: Alloc 4k fragment for each rx ring buffer element

2015-04-19 Thread Ariel Elior
Hi Gabriel, Thanks for pointing out this shortcoming. However, I don't think that the solution you suggested would work as is. @@ -628,21 +644,30 @@ static int bnx2x_fill_frag_skb(struct bnx2x *bp, struct bnx2x_fastpath *fp, bnx2x_fp_qstats(bp, fp)->rx_skb_alloc_failed++;

[RFC PATCH v3 02/10] slab: add SLIB (Library memory allocator) for arch/lib

2015-04-19 Thread Hajime Tazaki
add SLIB allocator for arch/lib (CONFIG_LIB) to wrap kmalloc and co. This will bring user's own allocator of libos: malloc(3) etc. Signed-off-by: Hajime Tazaki --- include/linux/slab.h | 6 +- include/linux/slib_def.h | 21 + init/Kconfig | 8 ++ mm/Makefile

[RFC PATCH v3 03/10] lib: public headers and API implementations for userspace programs

2015-04-19 Thread Hajime Tazaki
userspace programs which uses libos access via a public API, lib_init(), with passed arguments struct SimImported and struct SimExported. Signed-off-by: Hajime Tazaki Signed-off-by: Ryo Nakamura --- arch/lib/include/sim-assert.h | 23 +++ arch/lib/include/sim-init.h | 134 ++ arc

[RFC PATCH v3 01/10] sysctl: make some functions unstatic to access by arch/lib

2015-04-19 Thread Hajime Tazaki
libos (arch/lib) emulates a sysctl-like interface by a function call of userspace by enumerating sysctl tree from sysctl_table_root. It requires to be publicly accessible to this symbol and related functions. Signed-off-by: Hajime Tazaki --- fs/proc/proc_sysctl.c | 36 +++

[RFC PATCH v3 06/10] lib: sysctl handling (kernel glue code)

2015-04-19 Thread Hajime Tazaki
This interacts with fs/proc_fs.c for sysctl-like interface registed via lib_init() API. Signed-off-by: Hajime Tazaki --- arch/lib/sysctl.c | 270 ++ 1 file changed, 270 insertions(+) create mode 100644 arch/lib/sysctl.c diff --git a/arch/lib/

[RFC PATCH v3 08/10] lib: auxially files for auto-generated asm-generic files of libos

2015-04-19 Thread Hajime Tazaki
these files works as stubs in order to transparently run the other kernel part (e.g., net/) on libos environment. Signed-off-by: Hajime Tazaki --- arch/lib/include/asm/Kbuild | 57 +++ arch/lib/include/asm/atomic.h | 50 ++

[RFC PATCH v3 04/10] lib: time handling (kernel glue code)

2015-04-19 Thread Hajime Tazaki
timer related (internal) functions such as add_timer(), do_gettimeofday() of kernel are trivially reimplemented for libos. these eventually call the functions registered by lib_init() API. Signed-off-by: Hajime Tazaki --- arch/lib/hrtimer.c | 122 +++ arch/lib/tasklet

[RFC PATCH v3 00/10] an introduction of library operating system for Linux (LibOS)

2015-04-19 Thread Hajime Tazaki
changes from v2: - Patch 02/11 ("slab: add private memory allocator header for arch/lib") * add new allocator named SLIB (Library Allocator): Patch 04/11 is integrated to 02 (commented by Christoph Lameter) - Overall * rewrite commit log messages changes from v1: - Patch 01/11 ("sysctl: make som

[RFC PATCH v3 05/10] lib: context and scheduling functions (kernel glue code) for libos

2015-04-19 Thread Hajime Tazaki
contexnt primitives of kernel such as soft interupts, scheduling, tasklet are implemented for libos. these functions eventually call the functions registered by lib_init() API as well. Signed-off-by: Hajime Tazaki --- arch/lib/sched.c | 406 +++

[RFC PATCH v3 07/10] lib: other kernel glue layer code

2015-04-19 Thread Hajime Tazaki
These files are used to provide the same function calls so that other network stack code keeps untouched. Signed-off-by: Hajime Tazaki Signed-off-by: Christoph Paasch --- arch/lib/capability.c | 47 + arch/lib/filemap.c| 32 ++ arch/lib/fs.c | 70 + arch/l

[RFC PATCH v3 10/10] lib: tools used for test scripts

2015-04-19 Thread Hajime Tazaki
These auxiliary files are used for testing and debugging of net/ code with libos. a simple test is implemented with make test ARCH=lib. Signed-off-by: Hajime Tazaki --- tools/testing/libos/.gitignore | 6 + tools/testing/libos/Makefile | 38 +++ tools/testing/l

[RFC PATCH v3 09/10] lib: libos build scripts and documentation

2015-04-19 Thread Hajime Tazaki
document and build scripts for libos architecture. Signed-off-by: Hajime Tazaki Signed-off-by: Ryo Nakamura --- Documentation/virtual/libos-howto.txt | 144 MAINTAINERS | 9 + arch/lib/.gitignore | 8 + arch/lib/Kconfig

Re: [PATCH ethtool] Fix formatting of RX flow hash indirection table when size % 8 != 0

2015-04-19 Thread Amir Vadai
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 4/5/2015 5:14 AM, Ben Hutchings wrote: > We only print a new-line after every 8 entries, but we need one at > the end of the table even if the table size is not a multiple of > 8. > > Reported-by: Amir Vadai Signed-off-by: Ben > Hutchings --- T

Re: [PATCH v3] Renesas Ethernet AVB driver

2015-04-19 Thread Richard Cochran
On Tue, Apr 14, 2015 at 01:07:38AM +0300, Sergei Shtylyov wrote: > +static int ravb_wait(struct net_device *ndev, u16 reg, u32 mask, u32 value) > +{ > + int i; > + > + for (i = 0; i < 1; i++) { > + if ((ravb_read(ndev, reg) & mask) == value) > + return 0

Re: [PATCH net-next] ip: Add color output option

2015-04-19 Thread Daniel Borkmann
On 04/18/2015 12:22 PM, Mathias Nyman wrote: ... I don't understand what you mean by "-c is neither taken in ip nor in tc or ss". That just means we could in future consider to consistently add support for -c flag in those tools, too. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCHSET] printk, netconsole: implement reliable netconsole

2015-04-19 Thread Rob Landley
On Thu, Apr 16, 2015 at 6:03 PM, Tejun Heo wrote: > In a lot of configurations, netconsole is a useful way to collect > system logs; however, all netconsole does is simply emitting UDP > packets for the raw messages and there's no way for the receiver to > find out whether the packets were lost an