RE: [PATCH v3 net-next] net: mvneta: implement .set_wol and .get_wol

2017-01-22 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Jingju Hou > Sent: Monday, January 23, 2017 12:11 PM > To: da...@davemloft.net > Cc: jszh...@marvell.com; thomas.petazz...@free-electrons.com; > netdev@vger.kernel.org; Jingju

RE: create drivers/net/mdio and move mdio drivers into it

2017-02-21 Thread YUAN Linyu
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Tuesday, February 21, 2017 6:31 AM > To: YUAN Linyu; David S . Miller; Andrew Lunn > Cc: netdev@vger.kernel.org; cug...@163.com > Subject: Re: create drivers/net/mdio and

RE: create drivers/net/mdio and move mdio drivers into it

2017-02-20 Thread YUAN Linyu
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Tuesday, February 21, 2017 6:31 AM > To: YUAN Linyu; David S . Miller; Andrew Lunn > Cc: netdev@vger.kernel.org; cug...@163.com > Subject: Re: create drivers/net/mdio and

RE: create drivers/net/mdio and move mdio drivers into it

2017-02-23 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Andrew Lunn > Sent: Thursday, February 23, 2017 5:30 PM > To: YUAN Linyu > Cc: Florian Fainelli; David S . Miller; netdev@vger.kernel.org; cug...@163.com >

create drivers/net/mdio and move mdio drivers into it

2017-02-19 Thread YUAN Linyu
Hi, I have an idea to create drivers/net/mdio and move mdio drivers(drivers/net/phy/mdio-* | drivers/net/ethernet/xxx/mdio-yyy | ) into it. Do you think it is acceptable ? Thanks

RE: create drivers/net/mdio and move mdio drivers into it

2017-02-19 Thread YUAN Linyu
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Monday, February 20, 2017 2:16 PM > To: YUAN Linyu; David S . Miller; Andrew Lunn > Cc: netdev@vger.kernel.org; cug...@163.com > Subject: Re: create drivers/net/mdio and

RE: create drivers/net/mdio and move mdio drivers into it

2017-02-19 Thread YUAN Linyu
hy-handle = <_phy2>; phy-connection-type = "rgmii"; }; mdio: mdio@fc000 { reg = ; }; > -Original Message- > From: Florian Fainelli [ma

RE: create drivers/net/mdio and move mdio drivers into it

2017-02-19 Thread YUAN Linyu
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Monday, February 20, 2017 1:42 PM > To: YUAN Linyu; David S . Miller; Andrew Lunn > Cc: netdev@vger.kernel.org; cug...@163.com > Subject: Re: create drivers/net/mdio and move mdio dri

RE: create drivers/net/mdio and move mdio drivers into it

2017-02-19 Thread YUAN Linyu
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Monday, February 20, 2017 1:42 PM > To: YUAN Linyu; David S . Miller; Andrew Lunn > Cc: netdev@vger.kernel.org; cug...@163.com > Subject: Re: create drivers/net/mdio and move mdio dri

RE: create drivers/net/mdio and move mdio drivers into it

2017-02-22 Thread YUAN Linyu
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Wednesday, February 22, 2017 6:21 PM > To: YUAN Linyu > Cc: Florian Fainelli; David S . Miller; netdev@vger.kernel.org; cug...@163.com > Subject: Re: create drivers/net/mdio and move mdio drivers i

Re: [PATH v2 net-next] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
hi, yes, my misunderstanding. it's error when use after dup. can we do a full size(SCM_MAX_FD) dup?   On 六, 2017-02-11 at 10:36 +0800, yuan linyu wrote: > From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> > > 'max' only used at three places in scm.c, > 1. in scm_f

Re: [PATCH] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
On 五, 2017-02-10 at 10:25 -0500, David Miller wrote: > From: yuan linyu <cug...@163.com> > Date: Fri, 10 Feb 2017 20:11:13 +0800 > > > From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> > >  > > SCM_MAX_FD can fully replace it. > >  > > Signed-

[PATH v2 net-next] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> 'max' only used at three places in scm.c, 1. in scm_fp_copy(), fpl->max = SCM_MAX_FD; 2. in scm_fp_copy(), if (fpl->count + num > fpl->max) 3. in scm_fp_dup(), new_fpl->max = new_fpl->count; at place 2, fpl->max can

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-02-10 Thread yuan linyu
On 四, 2017-01-19 at 02:01 +0100, Andrew Lunn wrote: > > > > I will add two ethtool command in kernel to read and write register in PHY.  > Write access will get NACKed by me. Read only please. some register need to write some value first then read. if read only, it will not achieve the goal. > >

[PATH v3 net-next] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> 'max' only used at three places in scm.c, 1. in scm_fp_copy(), fpl->max = SCM_MAX_FD; 2. in scm_fp_copy(), if (fpl->count + num > fpl->max) 3. in scm_fp_dup(), new_fpl->max = new_fpl->count; at place 3, the wors

[PATCH] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> SCM_MAX_FD can fully replace it. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- include/net/scm.h | 3 +-- net/core/scm.c| 20 +--- 2 files changed, 6 insertions(+), 17 deletions(-) diff --g

RE: [PATCH net] net: hns: Fix the device being used for dma mapping during TX

2017-02-09 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Salil Mehta > Sent: Thursday, February 09, 2017 5:24 PM > To: da...@davemloft.net > Cc: salil.me...@huawei.com; yisen.zhu...@huawei.com; > mehta.salil@gmail.com;

RE: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-18 Thread YUAN Linyu
> -Original Message- > From: Zefir Kurtisi [mailto:zefir.kurt...@neratec.com] > > ... on the other hand, having direct RW access to MDIO regs can ease your life > greatly during bring-up / debugging of PHYs. > > Attached is a patch we are using to track down PHY problems at register

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-16 Thread yuan linyu
On 日, 2017-01-15 at 18:21 +0100, Andrew Lunn wrote: > On Sun, Jan 15, 2017 at 09:51:03AM +0800, yuan linyu wrote: > >  > > I hope user/developer can read this attribute file "regs" to do > > a full check of all registers value, and they can write any register &

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-14 Thread yuan linyu
On 六, 2017-01-14 at 10:35 -0800, Florian Fainelli wrote: > On 01/14/2017 08:24 AM, Andrew Lunn wrote: > > > > On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: > > > > > > From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> > > > &g

RE: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-16 Thread YUAN Linyu
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, January 17, 2017 5:54 AM > To: f.faine...@gmail.com > Cc: cug...@163.com; and...@lunn.ch; netdev@vger.kernel.org; YUAN Linyu > Subject: Re: [PATCH] net: add regs attribute to p

[PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-11 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> 1. set interface address label to ioctl request device name is enough 2. when address pass inet_abc_len check, prefixlen less than 31 is always true Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> ---  net/ipv4/d

network packet kernel rate limit

2016-10-21 Thread YUAN Linyu
User space application require linux kernel to do rate limit to some type of Ethernet packet(ARP, ICMP, TCP, for example 1000 packet/s) when system run under Ethernet packet flooding test. Do you know if kernel already exist a feature to implement this requirement? Thanks

[PATCH v2] net: ioctl SIOCSIFADDR minor cleanup

2016-11-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> 1. set interface address label to ioctl request device name is enough 2. when address pass inet_abc_len check, prefixlen < 31 is always true Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv4/devinet.c | 8 +

RE: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-21 Thread YUAN Linyu
M > To: YUAN Linyu > Cc: David Miller; cug...@163.com; netdev@vger.kernel.org > Subject: Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup > > On Tue, Nov 15, 2016 at 7:57 PM, YUAN Linyu > <linyu.y...@alcatel-sbell.com.cn> wrote: > > No, this patch will not change dev

[PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-15 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> 1. set interface address label to ioctl request device name is enough 2. when address pass inet_abc_len check, prefixlen < 31 is always true Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv4/devinet.c | 8 +

RE: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-15 Thread YUAN Linyu
(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, November 16, 2016 11:31 AM > To: YUAN Linyu > Cc: cug...@163.com; netdev@vger.kernel.org > Subject: Re: [PATCH] net: ioctl SIOCSIF

RE: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-15 Thread YUAN Linyu
hi david, > -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of David Miller > Sent: Wednesday, November 16, 2016 11:01 AM > To: cug...@163.com > Cc: netdev@vger.kernel.org; YUAN Linyu > Subject: Re: [PATCH] n

[PATCH] net: add regs attribute to phy device for user diagnose

2017-01-13 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> if phy device have register(s) configuration problem, user can use this attribute to diagnose. this feature need phy driver maintainer implement. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- drivers/net/phy/phy_d

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-15 Thread yuan linyu
On 六, 2017-01-14 at 17:57 -0800, Florian Fainelli wrote: > Le 01/14/17 à 17:51, yuan linyu a écrit : > > > > I think mii-tool or ethtool can't do it currently. > Maybe they cannot right now but they can certainly be patched to support > that. sysfs is not an appropriate i

[PATCH] scm: remove use CMSG{_COMPAT}_ALIGN(sizeof(struct {compat_}cmsghdr))

2017-01-03 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> sizeof(struct cmsghdr) and sizeof(struct compat_cmsghdr) already aligned. remove use CMSG_ALIGN(sizeof(struct cmsghdr)) and CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)) keep code consistent. Signed-off-by: yuan linyu <linyu.y..

RE: [PATCH] scm: remove use CMSG{_COMPAT}_ALIGN(sizeof(struct {compat_}cmsghdr))

2017-01-04 Thread YUAN Linyu
Thanks > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, January 05, 2017 2:25 AM > To: cug...@163.com > Cc: netdev@vger.kernel.org; YUAN Linyu > Subject: Re: [PATCH] scm: remove use CMSG{_COMPAT}_ALIGN(sizeof(struct > {compat

[PATCH] net: fix accept4() flags not work

2017-01-08 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> user input flags store to newsock which should be used. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/socket.c b/net/socket.c i

[PATCH] scm: fix possible control message header alignment issue

2016-12-29 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> 1. put_cmsg{_compat}() may copy data to user when buffer free space less than control message header alignment size. 2. scm_detach_fds{_compat}() may calc wrong fdmax if control message header have greater alignment size. Sign

[PATCH v2] scm: fix possible control message header alignment issue

2016-12-29 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> 1. put_cmsg{_compat}() may copy data to user when buffer free space less than control message header alignment size. 2. scm_detach_fds{_compat}() may calc wrong fdmax if control message header have greater alignment size. Sign

RE: [PATCH v2] scm: fix possible control message header alignment issue

2017-01-02 Thread YUAN Linyu
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Saturday, December 31, 2016 4:21 AM > To: cug...@163.com > Cc: netdev@vger.kernel.org; YUAN Linyu > Subject: Re: [PATCH v2] scm: fix possible control message header alignment > issue

[PATCH] net: change init_inodecache() return void

2017-01-07 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> sock_init() call it but not check it's return value, so change it to void return and add an internal BUG_ON() check. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/socket.c | 6 ++ 1 file changed, 2 inse

[PATCH] net: avoid put_cmsg() possible copy longer data than input

2016-12-28 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> if CMSG_ALIGN(sizeof(struct cmsghdr)) > sizeof(struct cmsghdr), original (cmlen - sizeof(struct cmsghdr)) may greater than input len. --- include/linux/socket.h | 12 ++-- net/compat.c | 28 +++-

RE: [PATCH net-next v2] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-17 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Subash Abhinov Kasiviswanathan > Sent: Tuesday, April 18, 2017 7:25 AM > To: d...@cumulusnetworks.com; da...@davemloft.net; > netdev@vger.kernel.org; rshea...@brocade.com;

RE: [PATCH 1/2] dt-bindings: net: Add bindings for National Instruments XGE netdev

2017-07-13 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Moritz Fischer > Sent: Friday, July 14, 2017 5:22 AM > To: netdev@vger.kernel.org > Cc: devicet...@vger.kernel.org; linux-ker...@vger.kernel.org; > da...@davemloft.net;

[PATCH net-next] idsn: fix wrong skb_put() used

2017-06-21 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> in my commit b952f4dff2751252db073c27c0f8a16a416a2ddc, - *(u8 *)skb_put(skb_out, 1) = (u8)(accm >> 24); \ + skb_put(skb_out, (u8)(accm >> 24)); \ it should skb_put_u8() Fixes: b952f4dff275 ("net: manua

RE: [PATCH] net: fib: fix fib_new_table() logical issue

2017-06-21 Thread YUAN Linyu
Sorry, it's not dead loop, I realized it but I tried to send to mail to note it on my phone, it failed. > -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Thursday, June 22, 2017 6:54 AM > To: yuan linyu > Cc: Linux Kernel Network Deve

[PATCH] net: fib: fix fib_new_table() logical issue

2017-06-21 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> when CONFIG_IP_MULTIPLE_TABLES defined, if id == RT_TABLE_LOCAL and !net->ipv4.fib_has_custom_rules, fib_new_table() call itself to get RT_TABLE_MAIN table, but if RT_TABLE_MAIN table not exist at this point, this function will become

[PATCH v2 net-next] net: ipv6: fix code style error and warning of ndisc.c

2017-05-19 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 300 --- 1 file changed, 155 insertions(+), 145 deletions(-) diff --git a/net/ipv6/ndisc.c b/net/

[net-next] net: ipv6: fix code style error and warning of ndisc.c

2017-05-19 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 300 --- 1 file changed, 155 insertions(+), 145 deletions(-) diff --git a/net/ipv6/ndisc.c b/net/

[PATCH net-next v4] net: ipv6: fix code style error and warning of ndisc.c

2017-05-20 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 310 +-- 1 file changed, 163 insertions(+), 147 deletions(-) diff --git a/net/ipv6/ndisc.c b/net/

[PATCH net-next v3] net: ipv6: fix code style error and warning of ndisc.c

2017-05-20 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 310 +-- 1 file changed, 163 insertions(+), 147 deletions(-) diff --git a/net/ipv6/ndisc.c b/net/

[PATCH net-next v1 2/2] net: ndisc.c: minor code improvement

2017-05-26 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> on x86_64, text size decrease 64 bytes Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/net/ip

Re: [PATCH net-next 1/2] net: ndisc.c: fix coding style issue

2017-05-26 Thread yuan linyu
On 五, 2017-05-26 at 22:45 +0900, 吉藤英明 wrote: > Hi, > > 2017-05-26 22:23 GMT+09:00 yuan linyu <cug...@163.com>: > > > > From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> > > > > Signed-off-by: yuan linyu <linyu.y...@alcatel-s

[PATCH net-next 0/2] ndisc.c minor clean and improvement

2017-05-26 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> 1. fix part of checkpatch issue which I like to fix 2. __ndisc_fill_addr_option() clean yuan linyu (2): net: ndisc.c: fix coding style issue net: ndisc.c: minor code improvement net/ipv6/ndisc.c

[PATCH net-next v1 1/2] net: ndisc.c: fix coding style issue

2017-05-26 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 109 --- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/net/ipv6/ndisc.c b/net/

[PATCH net-next v1 0/2] ndisc.c minor clean and improvement

2017-05-26 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> 1. fix part of checkpatch issue which I like to fix 2. __ndisc_fill_addr_option() clean v1: correct space value yuan linyu (2): net: ndisc.c: fix coding style issue net: ndisc.c: minor code improvement net/ipv6/ndisc.c

[PATCH net-next 1/2] net: ndisc.c: fix coding style issue

2017-05-26 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 109 --- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/net/ipv6/ndisc.c b/net/

[PATCH net-next 2/2] net: ndisc.c: minor code improvement

2017-05-26 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> on x86_64, text size decrease 80 bytes Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/net/ip

Re: [PATCH net-next 1/2] net: ndisc.c: fix coding style issue

2017-05-26 Thread yuan linyu
On 六, 2017-05-27 at 02:25 +0900, 吉藤英明 wrote: > Hi, > > 2017-05-26 22:55 GMT+09:00 yuan linyu <cug...@163.com>: > > > > On 五, 2017-05-26 at 22:45 +0900, 吉藤英明 wrote: > > > > > > Hi, > > > > > > 2017-05-26 22:23 GMT+09:00 yuan lin

[PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-26 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d310dc4..414e929 100644 --

[PATCH net-next v6] net: ipv6: fix code style error and warning of ndisc.c

2017-05-20 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> CC: Joe Perches <j...@perches.com> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/ndisc.c | 324 +-- 1 file changed, 173 insertions(+), 151 deleti

[PATCH net-next v5] net: ipv6: fix code style error and warning of ndisc.c

2017-05-20 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d310dc4..5cf25bc 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -12,8 +12,7 @@ * 2 of the License, or (at your option) any later version. */ -/* - * C

RE: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-30 Thread YUAN Linyu
> -Original Message- > From: David Ahern [mailto:dsah...@gmail.com] > Sent: Tuesday, May 30, 2017 11:42 AM > To: Joe Perches; David Miller; cug...@163.com > Cc: netdev@vger.kernel.org; YUAN Linyu > Subject: Re: [PATCH net-next] net: ndisc.c: reduce size of > __n

RE: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-30 Thread YUAN Linyu
Hi joe, > -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Joe Perches > Sent: Tuesday, May 30, 2017 11:41 AM > To: David Miller; cug...@163.com > Cc: netdev@vger.kernel.org; dsah...@gmail.com; YUAN Linyu >

RE: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-30 Thread YUAN Linyu
> > -Original Message- > > From: David Ahern [mailto:dsah...@gmail.com] > > Sent: Tuesday, May 30, 2017 11:42 AM > > To: Joe Perches; David Miller; cug...@163.com > > Cc: netdev@vger.kernel.org; YUAN Linyu > > Subject: Re: [PATCH

RE: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-30 Thread YUAN Linyu
Ok, I will send v2 later > -Original Message- > From: David Ahern [mailto:dsah...@gmail.com] > Sent: Wednesday, May 31, 2017 8:40 AM > To: YUAN Linyu; David Ahern; Joe Perches; David Miller; cug...@163.com > Cc: netdev@vger.kernel.org > Subject: Re: [PATCH net-next] ne

RE: [PATCH net-next 2/2] bpf: Remove the capability check for cgroup skb eBPF program

2017-05-31 Thread YUAN Linyu
hi > -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Chenbo Feng > Sent: Thursday, June 01, 2017 2:07 AM > To: netdev@vger.kernel.org; David Miller > Cc: Lorenzo Colitti; Chenbo Feng > Subject: [PATCH net-next 2/2] bpf: Remove

RE: [RFC] networking: convert many more places to skb_put_zero()

2017-06-14 Thread YUAN Linyu
onvert many more places to skb_put_zero() > > From: Johannes Berg <johannes.b...@intel.com> > > There were many places that my previous spatch didn't find, > as pointed out by yuan linyu in various patches. > > The following spatch found many more and also remov

RE: [PATCH net-next 00/11] skb_put_zero() used to optimize code

2017-06-14 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Johannes Berg > Sent: Thursday, June 15, 2017 12:32 AM > To: cug...@163.com; netdev@vger.kernel.org > Cc: David S . Miller; YUAN Linyu > Subject: Re:

RE: [RFC] networking: convert many more places to skb_put_zero()

2017-06-15 Thread YUAN Linyu
> -Original Message- > From: Johannes Berg [mailto:johan...@sipsolutions.net] > Sent: Thursday, June 15, 2017 3:12 PM > To: YUAN Linyu; netdev@vger.kernel.org > Subject: Re: [RFC] networking: convert many more places to skb_put_zero() > > On Thu, 2017-06-15 at 07

RE: [RFC] networking: convert many more places to skb_put_zero()

2017-06-15 Thread YUAN Linyu
Ok, understand > -Original Message- > From: Johannes Berg [mailto:johan...@sipsolutions.net] > Sent: Thursday, June 15, 2017 3:45 PM > To: YUAN Linyu; netdev@vger.kernel.org > Subject: Re: [RFC] networking: convert many more places to skb_put_zero() > > On Thu, 2017

RE: [RFC v2] networking: convert many more places to skb_put_zero()

2017-06-15 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Johannes Berg > Sent: Thursday, June 15, 2017 5:28 PM > To: netdev@vger.kernel.org > Cc: Johannes Berg > Subject: [RFC v2] networking: convert many more places to skb_put_zero()

RE: [RFC] networking: convert many more places to skb_put_zero()

2017-06-15 Thread YUAN Linyu
> -Original Message- > From: Johannes Berg [mailto:johan...@sipsolutions.net] > Sent: Thursday, June 15, 2017 2:58 PM > To: YUAN Linyu; netdev@vger.kernel.org > Subject: Re: [RFC] networking: convert many more places to skb_put_zero() > > On Thu, 2017-06-15 at 00

[PATCH net-next 11/11] qrtr: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/qrtr/qrtr.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index c7a5d86..e96353d 100644 --- a/net

[PATCH net-next 01/11] ipv6: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv6/mcast.c | 3 +-- net/ipv6/ndisc.c | 13 ++--- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c i

[PATCH net-next 02/11] ipv4: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv4/ipconfig.c | 3 +-- net/ipv4/netfilter/nf_reject_ipv4.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/net/ipv4/ipco

[PATCH net-next 06/11] openvswitch: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/openvswitch/datapath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 9ddc9f8..d7

[PATCH net-next 09/11] sctp: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/sctp/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/output.c b/net/sctp/output.c index e2edf2e..c339c68 100644 --- a/net/s

Re: [PATCH net-next 00/11] skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
On 三, 2017-06-14 at 16:42 +0200, Johannes Berg wrote: > On Wed, 2017-06-14 at 22:30 +0800, yuan linyu wrote: > > > > From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> > > > > > > yuan linyu (11): > >   ipv6: skb_put_zero() used to optimize code >

[PATCH net-next 04/11] dsa: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/dsa/tag_trailer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c index 172f131..b09e562 100644 -

[PATCH net-next 10/11] atm: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/atm/signaling.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/atm/signaling.c b/net/atm/signaling.c index adb6e3d..380d496 100644 -

[PATCH net-next 00/11] skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> yuan linyu (11): ipv6: skb_put_zero() used to optimize code ipv4: skb_put_zero() used to optimize code ncsi: skb_put_zero() used to optimize code dsa: skb_put_zero() used to optimize code key: skb_put_zero() used to optimiz

[PATCH net-next 03/11] ncsi: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ncsi/ncsi-cmd.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi

[PATCH net-next 07/11] batman-adv: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/batman-adv/bat_v_elp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index b580

[PATCH net-next 05/11] key: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/key/af_key.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/net/key/af_key.c b/net/key/af_key.c index 512dc43..c6c7cbf 100644 -

[PATCH net-next 08/11] bridge: skb_put_zero() used to optimize code

2017-06-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/bridge/netfilter/nft_reject_bridge.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/bridge/netfilter/nft_reject_bridge.c b/net/brid

[PATCH net-next] net: raw: assign delivered after receive success

2017-06-19 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> it's not reasonable to assign delivered if packet match no RAW sock Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/ipv4/raw.c | 5 ++--- net/ipv6/raw.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-)

[PATCH net-next 3/3] net: manual clean code which call skb_put_[data:zero]

2017-06-18 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- drivers/isdn/hysdn/hycapi.c | 8 drivers/isdn/i4l/isdn_bsdcomp.c | 2 +- drivers/isdn/i4

[PATCH net-next 1/3] net: introduce __skb_put_[zero, data, u8]

2017-06-18 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> follow Johannes Berg, semantic patch file as below, @@ identifier p, p2; expression len; expression skb; type t, t2; @@ ( -p = __skb_put(skb, len); +p = __skb_put_zero(skb, len); | -p = (t)__skb_put(skb, len); +p = __skb_put_zero(sk

[PATCH net-next 2/3] net: replace more place to skb_put_[data:zero]

2017-06-18 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> spatch file, @@ expression skb, len, data; type t; @@ -memcpy((t *)skb_put(skb, len), data, len); +skb_put_data(skb, data, len); @@ identifier p; expression skb, len, data; type t; @@ -p = (t *)memset(skb_put(skb, len), data, le

[PATCH net-next 0/3] more skb_put_[data:zero] related work

2017-06-18 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> yuan linyu (3): net: introduce __skb_put_[zero, data, u8] net: replace more place to skb_put_[data:zero] net: manual clean code which call skb_put_[data:zero] drivers/crypto/chelsio/chcr_algo.c

[PATCH net-next] tun: delete original tun_get() and rename __tun_get() to tun_get()

2017-09-23 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> it seems no need to keep tun_get() and __tun_get() at same time. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- drivers/net/tun.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-)

[PATCH net-next v2 1/2] net: move memcpy_to[from]_msg() from skbuff.h to socket.h

2017-10-16 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> these two functions used by skb and other places, move to socket.h where struct msghdr defined. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- include/linux/skbuff.h | 10 -- include/linux/socket.h | 13

[PATCH net-next v2 2/2] net: add skb_memcpy_to[from]_msg() to optimize skb code

2017-10-16 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> add these two wrappers in skbuff.h which is better named than previous and only used for skb. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- drivers/isdn/mISDN/socket.c| 2 +- drivers/staging/irda/net/af

[PATCH net-next v2 0/2] net: add memcpy_to[from]_msg()

2017-10-16 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> v2: fix kbuild warning yuan linyu (2): net: move memcpy_to[from]_msg() from skbuff.h to socket.h net: add skb_memcpy_to[from]_msg() to optimize skb code drivers/isdn/mISDN/socket.c| 2 +- drivers/staging/irda/net/af_irda.

[PATCH net-next 1/2] net: move memcpy_to[from]_msg() from skbuff.h to socket.h

2017-10-13 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> these two functions used by skb and other places, move to socket.h where struct msghdr defined. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- include/linux/skbuff.h | 10 -- include/linux/socket.h | 12 +++

[PATCH net-next 2/2] net: add skb_memcpy_to[from]_msg() to optimize skb code

2017-10-13 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> add these two wrappers in skbuff.h which is better named than previous and only used for skb. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- drivers/isdn/mISDN/socket.c| 2 +- drivers/staging/irda/net/af

[PATCH net-next 0/2] net: add skb_memcpy_to[from]_msg()

2017-10-13 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> yuan linyu (2): net: move memcpy_to[from]_msg() from skbuff.h to socket.h net: add skb_memcpy_to[from]_msg() to optimize skb code drivers/isdn/mISDN/socket.c| 2 +- drivers/staging/irda/net/af_irda.c | 2 +- include

[PATCH net-next] net: tap: fix POLLOUT condition in tap_poll()

2017-12-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> from logical view, if sock_writeable(>sk) return false, original second condition will return false too, change it and make second condition can return true. Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- driver

[PATCH net-next v3] net: assign err to 0 at begin in do_setlink() function

2017-11-16 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> each netlink attribute have proper process when error happen, when exit one attribute process, it implies that no error, so err = 0; is useless. assign err = 0; at beginning if all attributes not set. v1 -> v2: fix review com

[PATCH net-next] net: assign err to 0 at begin in do_setlink() function

2017-11-14 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> each netlink attribute have proper process when error happen, when exit on attribute process, it implies that no error, so err = 0; is useless. assign err = 0; at beginning if all attributes not set. Signed-off-by: yuan linyu &l

[PATCH net-next] netlink: optimize err assignment

2017-11-19 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn> --- net/netlink/af_netlink.c | 54 +--- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/net/netlink/af_net

Re: [PATCH net-next v3] net: assign err to 0 at begin in do_setlink() function

2017-11-18 Thread yuan linyu
On 五, 2017-11-17 at 15:08 +0900, David Miller wrote: > From: yuan linyu <cug...@163.com> > Date: Thu, 16 Nov 2017 19:59:48 +0800 > > > From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> > >  > > each netlink attribute have proper process when error happ

[PATCH net-next] net: assign err to 0 at begin in do_setlink() function

2017-11-15 Thread yuan linyu
From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> each netlink attribute have proper process when error happen, when exit one attribute process, it implies that no error, so err = 0; is useless. assign err = 0; at beginning if all attributes not set. v1 -> v2: fix review com

  1   2   >