[PATCH][net-next] ipv6: drop container_of when convert dst to rt6_info

2018-09-29 Thread Li RongQing
we can save container_of computation and return dst directly, since dst is always first member of struct rt6_info Add a BUILD_BUG_ON() to catch any change that could break this assertion. Signed-off-by: Li RongQing --- include/net/ip6_route.h | 4 +++- net/ipv6/route.c| 6 +++--- 2

[PATCH][net-next] net: drop container_of in dst_cache_get_ip4

2018-09-29 Thread Li RongQing
we can save container_of computation and return dst directly, since dst is always first member of struct rtable, and any breaking will be caught by BUILD_BUG_ON in route.h include/net/route.h:BUILD_BUG_ON(offsetof(struct rtable, dst) != 0); Signed-off-by: Li RongQing ---

[PATCH iproute2 net-next] ipneigh: update man page and help for router

2018-09-29 Thread Roopa Prabhu
From: Roopa Prabhu While at it also add missing text for proxy in the man page. Signed-off-by: Roopa Prabhu --- ip/ipneigh.c| 1 + man/man8/ip-neighbour.8 | 11 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ip/ipneigh.c b/ip/ipneigh.c index

[PATCH net-next] tls: Add support for inplace records encryption

2018-09-29 Thread Vakul Garg
Presently, for non-zero copy case, separate pages are allocated for storing plaintext and encrypted text of records. These pages are stored in sg_plaintext_data and sg_encrypted_data scatterlists inside record structure. Further, sg_plaintext_data & sg_encrypted_data are passed to cryptoapis for

Re: [PATCH] Documentation: Add HOWTO Korean translation into BPF and XDP Reference Guide.

2018-09-29 Thread Chang-an Song
Hello Daniel, Jon Thank you very much for review. >That is a bit of a problem, since Apache v2 is not compatible with GPLv2. >If the license of the document cannot be changed, I don't think we can >accept it into the kernel tree. Thank you for sharing information, Jon. I will check the rst file

Re: [PATCH v3 net-next 4/9] bnxt_en: Use ignore_ari devlink parameter

2018-09-29 Thread Or Gerlitz
On Fri, Sep 28, 2018 at 9:30 AM Vasundhara Volam wrote: > This patch adds support for ignore_ari generic permanent mode > devlink parameter. This parameter is disabled by default. It can be > enabled using devlink param commands. > > ignore_ari - If enabled, device ignores ARI(Alternate Routing

[PATCH v2 net-next 4/8] net: phy: Add helper to convert MII ADV register to a linkmode

2018-09-29 Thread Andrew Lunn
The phy_mii_ioctl can be used to write a value into the MII_ADVERTISE register in the PHY. Since this changes the state of the PHY, we need to make the same change to phydev->advertising. Add a helper which can convert the register value to a linkmode. Signed-off-by: Andrew Lunn Reviewed-by:

[PATCH v2 net-next 5/8] net: phy: Add helper for advertise to lcl value

2018-09-29 Thread Andrew Lunn
Add a helper to convert the local advertising to an LCL capabilities, which is then used to resolve pause flow control settings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Maxime Chevallier --- drivers/net/dsa/mt7530.c | 6 +-

[PATCH v2 net-next 6/8] net: phy: Add limkmode equivalents to some of the MII ethtool helpers

2018-09-29 Thread Andrew Lunn
Add helpers which take a linkmode rather than a u32 ethtool for advertising settings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Maxime Chevallier --- include/linux/mii.h | 50 + 1 file changed, 50 insertions(+) diff

[PATCH v2 net-next 3/8] net: phy: Add phydev_info()

2018-09-29 Thread Andrew Lunn
Add phydev_info() and make use of it within the phy drivers and core code. Signed-off-by: Andrew Lunn --- drivers/net/phy/dp83640.c| 11 ++- drivers/net/phy/phy_device.c | 4 ++-- include/linux/phy.h | 3 +++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git

[PATCH v2 net-next 8/8] net: phy: Replace phy driver features u32 with link_mode bitmap

2018-09-29 Thread Andrew Lunn
This is one step in allowing phylib to make use of link_mode bitmaps, instead of u32 for supported and advertised features. Convert the phy drivers to use bitmaps to indicates the features they support. Build bitmap equivalents of the u32 values at runtime, and have the drivers point to the

[PATCH v2 net-next 7/8] net: ethernet: xgbe: expand PHY_GBIT_FEAUTRES

2018-09-29 Thread Andrew Lunn
The macro PHY_GBIT_FEAUTRES needs to change into a bitmap in order to support link_modes. Remove its use from xgde by replacing it with its definition. Probably, the current behavior is wrong. It probably should be ANDing not assigning. Signed-off-by: Andrew Lunn --- v2 Remove unneeded () ---

[PATCH v2 net-next 1/8] net: phy: Move linkmode helpers to somewhere public

2018-09-29 Thread Andrew Lunn
phylink has some useful helpers to working with linkmode bitmaps. Move them to there own header so other code can use them. Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli Reviewed-by: Maxime Chevallier --- v2: It was suggested to make include/linux/ethernet-phy and move some of the

[PATCH v2 net-next 2/8] net: phy: Add phydev_warn()

2018-09-29 Thread Andrew Lunn
Not all new style LINK_MODE bits can be converted into old style SUPPORTED bits. We need to warn when such a conversion is attempted. Add a helper for this. Convert all pr_warn() calls to phydev_warn() where possible. Signed-off-by: Andrew Lunn Reviewed-by: Maxime Chevallier --- v2: Make use

[PATCH v2 net-next 0/8] Continue towards using linkmode in phylib

2018-09-29 Thread Andrew Lunn
These patches contain some further cleanup and helpers, and the first real patch towards using linkmode bitmaps in phylink. The macro magic in the RFC version has been replaced with run time initialisation. Andrew Lunn (8): net: phy: Move linkmode helpers to somewhere public net: phy: Add

[PATCH net-next] MAINTAINERS: Fix wrong include file path

2018-09-29 Thread Andrew Lunn
Fix the patch for the mv88e6xxx.h header file in MAINTAINERS Reported-by: Joe Perches Signed-off-by: Andrew Lunn --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 15565de091af..12d1da4a9653 100644 --- a/MAINTAINERS +++

Re: [PATCH] r8169: Disable clk during suspend / resume

2018-09-29 Thread David Miller
From: Hans de Goede Date: Wed, 26 Sep 2018 22:12:39 +0200 > Disable the clk during suspend to save power. Note that tp->clk may be > NULL, the clk core functions handle this without problems. > > Reviewed-by: Andy Shevchenko > Tested-by: Carlo Caione > Signed-off-by: Hans de Goede Applied.

Re: [PATCH] netlink: fix typo in nla_parse_nested() comment

2018-09-29 Thread David Miller
From: Johannes Berg Date: Wed, 26 Sep 2018 22:19:42 +0200 > From: Johannes Berg > > Fix a simple typo: attribuets -> attributes > > Signed-off-by: Johannes Berg Applied.

Re: [PATCH net 1/1] qlcnic: fix Tx descriptor corruption on 82xx devices

2018-09-29 Thread David Miller
From: Shahed Shaikh Date: Wed, 26 Sep 2018 12:41:10 -0700 > In regular NIC transmission flow, driver always configures MAC using > Tx queue zero descriptor as a part of MAC learning flow. > But with multi Tx queue supported NIC, regular transmission can occur on > any non-zero Tx queue and from

Re: [PATCH] [PATCH net-next] openvswitch: Use correct reply values in datapath and vport ops

2018-09-29 Thread David Miller
From: Yifeng Sun Date: Wed, 26 Sep 2018 11:40:14 -0700 > This patch fixes the bug that all datapath and vport ops are returning > wrong values (OVS_FLOW_CMD_NEW or OVS_DP_CMD_NEW) in their replies. > > Signed-off-by: Yifeng Sun Applied.

Re: [PATCH net-next] tls: Remove redundant vars from tls record structure

2018-09-29 Thread David Miller
From: Vakul Garg Date: Wed, 26 Sep 2018 16:22:08 +0530 > Structure 'tls_rec' contains sg_aead_in and sg_aead_out which point > to a aad_space and then chain scatterlists sg_plaintext_data, > sg_encrypted_data respectively. Rather than using chained scatterlists > for plaintext and encrypted data

Re: pull-request: ieee802154 for net 2018-09-28

2018-09-29 Thread David Miller
From: Stefan Schmidt Date: Fri, 28 Sep 2018 12:20:42 +0200 > An update from ieee802154 for your *net* tree. > > Some cleanup patches throughout the drivers from the Huawei tag team > Yue Haibing and Zhong Jiang. > Xue is replacing some magic numbers with defines in his mcr20a driver. Applied,

Re: [PATCH net-next v2] tcp: up initial rmem to 128KB and SYN rwin to around 64KB

2018-09-29 Thread David Miller
From: Yuchung Cheng Date: Fri, 28 Sep 2018 13:09:02 -0700 > Previously TCP initial receive buffer is ~87KB by default and > the initial receive window is ~29KB (20 MSS). This patch changes > the two numbers to 128KB and ~64KB (rounding down to the multiples > of MSS) respectively. The patch also

[PATCH iproute2-next 03/11] libnetlink: Convert GETADDRLABEL dumps to use rtnl_addrlbldump_req

2018-09-29 Thread David Ahern
From: David Ahern Add rtnl_addrlbldump_req for address label dumps using the proper ifaddrlblmsg as the header. Convert existing RTM_GETADDRALBEL dumps to use it. Signed-off-by: David Ahern --- include/libnetlink.h | 2 ++ ip/ipaddrlabel.c | 4 ++-- lib/libnetlink.c | 17

[PATCH iproute2-next 02/11] libnetlink: Convert GETROUTE dumps to use rtnl_routedump_req

2018-09-29 Thread David Ahern
From: David Ahern Add rtnl_routedump_req for route dumps using the proper rtmsg as the header. Convert existing RTM_GETROUTE dumps to use it. Signed-off-by: David Ahern --- include/libnetlink.h | 2 ++ ip/ipmroute.c| 2 +- ip/iproute.c | 4 ++-- lib/libnetlink.c | 16

[PATCH iproute2-next 05/11] libnetlink: Convert GETNETCONF dumps to use rtnl_netconfdump_req

2018-09-29 Thread David Ahern
From: David Ahern Add rtnl_netconfdump_req for netconf dumps using the proper netconfmsg as the header. Convert existing RTM_GETNETCONF dumps to use it. Signed-off-by: David Ahern --- include/libnetlink.h | 2 ++ ip/ipnetconf.c | 3 +-- lib/libnetlink.c | 16 3

[PATCH iproute2-next 04/11] libnetlink: Convert GETMDB dumps to use rtnl_mdbdump_req

2018-09-29 Thread David Ahern
From: David Ahern Add rtnl_mdbdump_req for mdb dumps using the proper br_port_msg as the header. Convert existing RTM_GETMDB dumps to use it. Signed-off-by: David Ahern --- bridge/mdb.c | 2 +- include/libnetlink.h | 2 ++ lib/libnetlink.c | 17 + 3 files

[PATCH iproute2-next 08/11] libnetlink: Convert GETNEIGHTBL dumps to use rtnl_neightbldump_req

2018-09-29 Thread David Ahern
From: David Ahern Add rtnl_neightbldump_req for neighbor table dumps using the proper ndtmsg as the header. Convert existing RTM_GETNEIGHTBL dumps to use it. Signed-off-by: David Ahern --- include/libnetlink.h | 2 ++ ip/ipntable.c| 2 +- lib/libnetlink.c | 16

[PATCH iproute2-next 07/11] libnetlink: Convert GETNEIGH dumps to use rtnl_neighdump_req

2018-09-29 Thread David Ahern
From: David Ahern Add rtnl_neighdump_req for neighbor dumps using the proper ndmsg as the header. Convert existing rtnl_wilddump_request for RTM_GETNEIGH to use it. Signed-off-by: David Ahern --- include/libnetlink.h | 2 ++ lib/libnetlink.c | 16 misc/arpd.c |

[PATCH iproute2-next 06/11] libnetlink: Convert GETRULE dumps to use rtnl_ruledump_req

2018-09-29 Thread David Ahern
From: David Ahern Add rtnl_ruledump_req for fib fule dumps using the proper fib_rule_hdr as the header. Convert existing RTM_GETRULE dumps to use it. Signed-off-by: David Ahern --- include/libnetlink.h | 2 ++ ip/iprule.c | 2 +- lib/libnetlink.c | 17 + 3 files

[PATCH iproute2-next 01/11] libnetlink: Convert GETADDR dumps to use rtnl_addrdump_req

2018-09-29 Thread David Ahern
From: David Ahern Add rtnl_addrdump_req for address dumps using the proper ifaddrmsg as the header. Convert existing RTM_GETADDR dumps to use it. Signed-off-by: David Ahern --- include/libnetlink.h | 4 ip/ipaddress.c | 6 +++--- lib/libnetlink.c | 16 3

[PATCH iproute2-next 10/11] libnetlink: Rename rtnl_wilddump_* to rtnl_linkdump_*

2018-09-29 Thread David Ahern
From: David Ahern Rename rtnl_wilddump_req_filter to rtnl_linkdump_req_filter, rtnl_wilddump_request to rtnl_linkdump_request and rtnl_wilddump_req_filter_fn to rtnl_linkdump_req_filter_fn. In all cases drop the type argument which at this point is only RTM_GETLINK and hardcode in the

[PATCH iproute2-next 09/11] libnetlink: Convert GETNSID dumps to use rtnl_nsiddump_req

2018-09-29 Thread David Ahern
From: David Ahern Add rtnl_nsiddump_req for namespace id dumps using the proper rtgenmsg as the header. Convert existing RTM_GETNSID dumps to use it. Signed-off-by: David Ahern --- include/libnetlink.h | 2 ++ ip/ipnetns.c | 2 +- lib/libnetlink.c | 16 3 files

[PATCH iproute2-next 11/11] libnetlink: Rename rtnl_wilddump_stats_req_filter to rtnl_statsdump_req_filter

2018-09-29 Thread David Ahern
From: David Ahern rtnl_wilddump_stats_req_filter only takes RTM_GETSTATS as the type argument so rename to rtnl_statsdump_req_filter for consistency with other request functions and hardcode the type argument. Signed-off-by: David Ahern --- bridge/vlan.c| 8 ++--

[PATCH iproute2-next 00/11] Fix dump requests to use proper header for type

2018-09-29 Thread David Ahern
From: David Ahern iproute2 currently uses ifinfomsg as the header for all dumps using the wilddump headers. This is wrong as each message type actually has its own header type. While the kernel has traditionally let it go as it for the most part only uses the family entry, the use of kernel side

[PATCH] net/packet: fix packet drop as of virtio gso

2018-09-29 Thread Jianfeng Tan
When we use raw socket as the vhost backend, a packet from virito with gso offloading information, cannot be sent out in later validaton at xmit path, as we did not set correct skb->protocol which is further used for looking up the gso function. To fix this, we set this field according to virito

[PATCHv2 net-next] geneve: allow to clear ttl inherit

2018-09-29 Thread Hangbin Liu
As Michal remaind, we should allow to clear ttl inherit. Then we will have three states: 1. set the flag, and do ttl inherit. 2. do not set the flag, use configured ttl value, or default ttl (0) if not set. 3. disable ttl inherit, use previous configured ttl value, or default ttl (0). Fixes:

Re: [PATCH net-next] geneve: fix ttl inherit type

2018-09-29 Thread Hangbin Liu
On Sat, Sep 29, 2018 at 01:46:19AM +0200, Michal Kubecek wrote: > Is it desirable to switch to a flag? If I read geneve_changelink() and > geneve_nl2info() correctly, it allows you to set the ttl_inherit flag > for an existing device but doesn't allow you to clear it. With NLA_U8, > you could

Re: [PATCH iproute2 net-next] ipneigh: support setting of NTF_ROUTER on neigh entries

2018-09-29 Thread Roopa Prabhu
On Fri, Sep 28, 2018 at 9:57 AM David Ahern wrote: > > On 9/25/18 3:15 PM, Roopa Prabhu wrote: > > From: Roopa Prabhu > > > > Signed-off-by: Roopa Prabhu > > --- > > ip/ipneigh.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > applied to iproute2-next. > > And then I noticed you did not

RE: [PATCH] hv_netvsc: remove ndo_poll_controller

2018-09-29 Thread Haiyang Zhang
> -Original Message- > From: Stephen Hemminger > Sent: Saturday, September 29, 2018 8:53 AM > To: netdev@vger.kernel.org > Cc: Stephen Hemminger ; Haiyang Zhang > ; Eric Dumazet > Subject: [PATCH] hv_netvsc: remove ndo_poll_controller > > Similar to other patches from ERic. > > As

Re: [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt

2018-09-29 Thread Jiri Pirko
Fri, Sep 28, 2018 at 08:28:23AM CEST, vasundhara-v.vo...@broadcom.com wrote: >This patch adds a new file to add information about configuration >parameters that are supported by bnxt_en driver via devlink. > >Cc: "David S. Miller" >Cc: Jonathan Corbet >Cc: linux-...@vger.kernel.org >Cc: Jiri

Re: [PATCH] hv_netvsc: remove ndo_poll_controller

2018-09-29 Thread Stephen Hemminger
On Sat, 29 Sep 2018 14:52:56 +0200 Stephen Hemminger wrote: > Similar to other patches from ERic. > > As diagnosed by Song Liu, ndo_poll_controller() can > be very dangerous on loaded hosts, since the cpu > calling ndo_poll_controller() might steal all NAPI > contexts (for all RX/TX queues of

[PATCH] hv_netvsc: remove ndo_poll_controller

2018-09-29 Thread Stephen Hemminger
Similar to other patches from ERic. As diagnosed by Song Liu, ndo_poll_controller() can be very dangerous on loaded hosts, since the cpu calling ndo_poll_controller() might steal all NAPI contexts (for all RX/TX queues of the NIC). This capture can last for unlimited amount of time, since one cpu

[net-next, PATCH 0/2, v3] net: socionext: XDP support

2018-09-29 Thread Ilias Apalodimas
This patch series adds AF_XDP support socionext netsec driver In addition the new dma allocation scheme offers a 10% boost on Rx pps rate using 64b packets - patch [1/2]: Use a different allocation scheme for Rx DMA buffers to prepare the driver for AF_XDP support - patch [2/2]: Add XDP

[net-next, PATCH 2/2, v3] net: socionext: add XDP support

2018-09-29 Thread Ilias Apalodimas
Add basic XDP support. The interface only supports 1 Tx queue for now so locking is introduced on the Tx queue if XDP is enabled to make sure .ndo_start_xmit and .ndo_xdp_xmit won't corrupt Tx ring Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 345

[net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-09-29 Thread Ilias Apalodimas
Current driver dynamically allocates an skb and maps it as DMA rx buffer. A following patch introduces XDP functionality, so we need a different allocation scheme. Buffers are allocated dynamically and mapped into hardware. During the Rx operation the driver uses build_skb() to produce the

[PATCH] net: dsa: lantiq: Fix path in MAINTAINERS file

2018-09-29 Thread Hauke Mehrtens
The MAINTAINERS file contained the wrong file name of the driver. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Reported-by: Joe Perches Signed-off-by: Hauke Mehrtens --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS

Re: [PATCH net-next] geneve: fix ttl inherit type

2018-09-29 Thread Hangbin Liu
Hi David Ahern, On Fri, Sep 28, 2018 at 11:59:37AM -0600, David Ahern wrote: > On 9/27/18 7:09 PM, Hangbin Liu wrote: > > Phil pointed out that there is a mismatch between vxlan and geneve ttl > > inherit. We should define it as a flag and use nla_put_flag to export this > > opiton. > > > >

Re: [PATCH net-next] geneve: fix ttl inherit type

2018-09-29 Thread Hangbin Liu
On Sat, Sep 29, 2018 at 01:46:19AM +0200, Michal Kubecek wrote: > On Fri, Sep 28, 2018 at 09:09:58AM +0800, Hangbin Liu wrote: > > Phil pointed out that there is a mismatch between vxlan and geneve ttl > > inherit. We should define it as a flag and use nla_put_flag to export this > > opiton. > >

Re: [PATCH net] vxlan: use nla_put_flag for ttl inherit

2018-09-29 Thread Hangbin Liu
On Fri, Sep 28, 2018 at 11:56:10AM -0600, David Ahern wrote: > On 9/28/18 6:38 AM, Hangbin Liu wrote: > > On Fri, Sep 28, 2018 at 12:37:00PM +0200, Phil Sutter wrote: > >> On Fri, Sep 28, 2018 at 09:08:26AM +0800, Hangbin Liu wrote: > >>> Phil pointed out that there is a mismatch between vxlan and

Re: [PATCH net 0/2] s390/qeth: fixes 2019-09-26

2018-09-29 Thread David Miller
From: Julian Wiedmann Date: Fri, 28 Sep 2018 11:05:22 +0200 > On 26.09.2018 19:39, David Miller wrote: >> From: Julian Wiedmann >> Date: Wed, 26 Sep 2018 18:07:08 +0200 >> >>> please apply two qeth patches for -net. The first is a trivial cleanup >>> required for patch #2 by Jean, which fixes