[patch net-next v3 03/11] devlink: Add support for reload

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky Add support for performing driver hot reload. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko --- include/net/devlink.h| 1 + include/uapi/linux/devlink.h | 5 + net/core/devlink.c | 47

[patch net-next v3 08/11] mlxsw: spectrum: Add support for getting kvdl occupancy

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky Add support for getting the kvdl occupancy through the resource interface. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 9 drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../

[patch net-next v3 02/11] devlink: Add support for resource abstraction

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky Add support for hardware resource abstraction over devlink. Each resource is identified via id, furthermore it contains information regarding its size and its related sub resources. Each resource can also provide its current occupancy. In some cases the sizes of some res

[patch net-next v3 10/11] mlxsw: core: Add support for reload

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky Add support for hot reload. First, all the driver/core resources are released but the PCI and devlink instances, then reset is performed through the PCI interface. Finally the driver performs initialization. In case of reload failure the driver is left in a partially ini

[patch net-next v3 06/11] mlxsw: spectrum: Register KVD resources with devlink

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky Register the KVD resources with devlink. The KVD is a memory resource which is subdivided into three partitions which are the linear, hash single and hash double. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.

[patch net-next v3 01/11] devlink: Add per devlink instance lock

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky This is a preparation before introducing resources and hot reload support. Currently there are two global lock where one protects all devlink access, and the second one protects devlink port access. This patch adds per devlink instance lock which protects the internal mem

[patch net-next v3 05/11] mlxsw: pci: Add support for performing bus reset

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky This is a preparation stage before introducing hot reload. During the reload process the ASIC should be resetted by accessing the PCI BAR due to unavailability of the mailbox/emad interfaces. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko --- drivers/net/

[patch net-next v3 07/11] mlxsw: spectrum_dpipe: Connect dpipe tables to resources

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky Connect current dpipe tables to resources. The tables are connected in the following fashion: 1. IPv4 host -> KVD hash single 2. IPv6 host -> KVD hash double 3. Adjacency -> KVD linear Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko --- .../net/ethernet/me

Re: [PATCH 1/2] sh_eth: gather all TSU init code in one place

2018-01-15 Thread Geert Uytterhoeven
On Sun, Jan 14, 2018 at 6:47 PM, Sergei Shtylyov wrote: > The sh_eth_cpu_data::chip_reset() method always resets using ARSTR and > this register is always located at the start of the TSU register region. > Therefore, we can only call this method if we know TSU is there and thus > simplify th

Re: [PATCH 2/2] sh_eth: get Ether port # only when needed

2018-01-15 Thread Geert Uytterhoeven
On Sun, Jan 14, 2018 at 6:47 PM, Sergei Shtylyov wrote: > The dual-port Ether configurations always have a shared TSU to e.g. pass > the packets between those ports. With the TSU init. code gathered under > the single *if*, we now can only get the port # from 'platform_device::id' > only when w

Re: [PATCH v3] nl80211: take RCU read lock when calling ieee80211_bss_get_ie()

2018-01-15 Thread Johannes Berg
On Mon, 2018-01-15 at 08:12 +0100, Dominik Brodowski wrote: > As ieee80211_bss_get_ie() derefences an RCU to return ssid_ie, both > the call to this function and any operation on this variable need > protection by the RCU read lock. > > Fixes: 44905265bc15 ("nl80211: don't expose wdev->ssid for mo

[PATCH] tools/bpftool: silence a static check warning

2018-01-15 Thread Dan Carpenter
There is a static checker warning that proglen has an upper bound but no lower bound. The allocation will just fail harmlessly so it's not a big deal. Signed-off-by: Dan Carpenter diff --git a/tools/bpf/bpf_jit_disasm.c b/tools/bpf/bpf_jit_disasm.c index 30044bc4f389..2d7bb5dc0b8c 100644 --- a/

Re: WARNING in wiphy_register

2018-01-15 Thread Johannes Berg
Hi syzbot maintainers, Thanks for the report. > hwsim_new_radio_nl+0x5b7/0x7c0 drivers/net/wireless/mac80211_hwsim.c:3152 > genl_family_rcv_msg+0x7b7/0xfb0 net/netlink/genetlink.c:599 > genl_rcv_msg+0xb2/0x140 net/netlink/genetlink.c:624 You're getting into the kernel via generic netlink r

Re: [PATCH 32/32] aio: implement io_pgetevents

2018-01-15 Thread Christoph Hellwig
On Fri, Jan 12, 2018 at 03:44:52PM -0500, Jeff Moyer wrote: > Christoph Hellwig writes: > > > This is the io_getevents equivalent of ppoll/pselect and allows to > > properly mix signals and aio completions (especially with IOCB_CMD_POLL) > > and atomically executes the following sequence: > > > >

Re: [PATCH 30/32] aio: add delayed cancel support

2018-01-15 Thread Christoph Hellwig
On Thu, Jan 11, 2018 at 10:27:05AM -0500, Jeff Moyer wrote: > Duh, good point. My main concern is that things like usb gadget will > have to deal with races between cancellation and completion on their > own. It would be nice if we had infrastructure for them to use. I'll > have a look through t

Re: WARNING in rfkill_alloc

2018-01-15 Thread Johannes Berg
Hi, > RIP: 0010:rfkill_alloc+0x2c0/0x380 net/rfkill/core.c:930 This seems pretty obvious - there's no name given. > wiphy_new_nm+0x159c/0x21d0 net/wireless/core.c:487 > ieee80211_alloc_hw_nm+0x4b4/0x2140 net/mac80211/main.c:531 which is strange, because we try to validate the name here. Ca

Re: hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf()

2018-01-15 Thread SF Markus Elfring
> These messages are not displayed anywhere else: > "unable to allocate receive buffer of size %u\n" > "unable to allocate send buffer of size %u\n", > > After set ret = -ENOMEM; and cleanup, we won't know which buffer allocation > failed without the error message. How do you think about to achi

Re: WARNING in wiphy_register

2018-01-15 Thread Dmitry Vyukov
On Mon, Jan 15, 2018 at 9:22 AM, Johannes Berg wrote: > Hi syzbot maintainers, > > Thanks for the report. > >> hwsim_new_radio_nl+0x5b7/0x7c0 drivers/net/wireless/mac80211_hwsim.c:3152 >> genl_family_rcv_msg+0x7b7/0xfb0 net/netlink/genetlink.c:599 >> genl_rcv_msg+0xb2/0x140 net/netlink/genet

[PATCH net] sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf

2018-01-15 Thread Xin Long
After commit cea0cc80a677 ("sctp: use the right sk after waking up from wait_buf sleep"), it may change to lock another sk if the asoc has been peeled off in sctp_wait_for_sndbuf. However, the asoc's new sk could be already closed elsewhere, as it's in the sendmsg context of the old sk that can't

[PATCH net] sctp: reinit stream if stream outcnt has been change by sinit in sendmsg

2018-01-15 Thread Xin Long
After introducing sctp_stream structure, sctp uses stream->outcnt as the out stream nums instead of c.sinit_num_ostreams. However when users use sinit in cmsg, it only updates c.sinit_num_ostreams in sctp_sendmsg. At that moment, stream->outcnt is still using previous value. If it's value is not u

[PATCH net] sctp: do not allow the v4 socket to bind a v4mapped v6 address

2018-01-15 Thread Xin Long
The check in sctp_sockaddr_af is not robust enough to forbid binding a v4mapped v6 addr on a v4 socket. The worse thing is that v4 socket's bind_verify would not convert this v4mapped v6 addr to a v4 addr. syzbot even reported a crash as the v4 socket bound a v6 addr. This patch is to fix it by d

Re: [PATCH v2] net: phy: Have __phy_modify return 0 on success

2018-01-15 Thread Niklas Cassel
Tested-by: Niklas Cassel On Fri, Jan 12, 2018 at 03:01:36PM +0100, Andrew Lunn wrote: > __phy_modify would return the old value of the register before it was > modified. Thus on success, it does not return 0, but a positive value. > Thus functions using phy_modify, which is a wrapper around > __p

Re: WARNING in rfkill_alloc

2018-01-15 Thread Dmitry Vyukov
On Mon, Jan 15, 2018 at 9:57 AM, Johannes Berg wrote: > Hi, > >> RIP: 0010:rfkill_alloc+0x2c0/0x380 net/rfkill/core.c:930 > > This seems pretty obvious - there's no name given. > >> wiphy_new_nm+0x159c/0x21d0 net/wireless/core.c:487 >> ieee80211_alloc_hw_nm+0x4b4/0x2140 net/mac80211/main.c:531

RE: [PATCH net-next] net: dpaa: change while() to if() in dpaa_fq_setup()

2018-01-15 Thread Madalin-cristian Bucur
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of yuan linyu > Sent: Saturday, January 13, 2018 11:25 AM > To: netdev@vger.kernel.org > Cc: David S . Miller ; yuan linyu > > Subject: Re: [PATCH net-next] net: dpaa: change while()

[nf-next 3/3] netfilter: Add support for IPv6 segment routing 'SEG6' target

2018-01-15 Thread Ahmed Abdelsalam
Service Function Chaining (SFC) is one of the main use-cases of IPv6 Segment Routing (SRv6)[1]. The Segment Routing Header (SRH) allows including a list of segments in the IPv6 packet. This segment list can be used to steer the packet though a set of Virtual Network Functions (VNFS) e.g., Firewall

[iptables 1/2] extensions: add support for 'SEG6' target

2018-01-15 Thread Ahmed Abdelsalam
This patch adds a new exetension to iptables to supprt IPv6 segment routing 'SEG6' target. Signed-off-by: Ahmed Abdelsalam --- extensions/libip6t_SEG6.c| 122 +++ include/linux/netfilter_ipv6/ip6t_SEG6.h | 17 + 2 files changed, 139 insertions(+)

[iptables 2/2] extensions: add some test cases for 'SEG6' target

2018-01-15 Thread Ahmed Abdelsalam
This patch adds some test cases for 'SEG6' target. Signed-off-by: Ahmed Abdelsalam --- extensions/libip6t_SEG6.t | 5 + 1 file changed, 5 insertions(+) create mode 100644 extensions/libip6t_SEG6.t diff --git a/extensions/libip6t_SEG6.t b/extensions/libip6t_SEG6.t new file mode 100644 index

[nf-next 2/3] netfilter: add an option to control iptables SEG6 target support

2018-01-15 Thread Ahmed Abdelsalam
This patch adds a new option CONFIG_IP6_NF_TARGET_SEG6 to enable/disable support of iptables SEG6 target. Signed-off-by: Ahmed Abdelsalam --- net/ipv6/netfilter/Kconfig | 12 net/ipv6/netfilter/Makefile | 1 + 2 files changed, 13 insertions(+) diff --git a/net/ipv6/netfilter/Kcon

[nf-next 1/3] netfilter: export SRH processing functions from seg6local

2018-01-15 Thread Ahmed Abdelsalam
Some functions of seg6local are very useful to process SRv6 encapsulated packets This patch exports some functions of seg6local that are useful and can be re-used at different parts of the kernel, including netfilter. The set of exported functions are: (1) seg6_get_srh() (2) seg6_advance_nextseg(

[PATCH net-next] mlxsw: spectrum: qdiscs: Make function mlxsw_sp_qdisc_prio_unoffload static

2018-01-15 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c:464:1: warning: symbol 'mlxsw_sp_qdisc_prio_unoffload' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 2 +- 1 file changed, 1 i

Re: [PATCH] tools/bpftool: silence a static check warning

2018-01-15 Thread Daniel Borkmann
Hi Dan, On 01/15/2018 09:15 AM, Dan Carpenter wrote: > There is a static checker warning that proglen has an upper bound but no > lower bound. The allocation will just fail harmlessly so it's not a big > deal. > > Signed-off-by: Dan Carpenter > > diff --git a/tools/bpf/bpf_jit_disasm.c b/tools

Re: [PATCH bpf] bpf: do not modify min/max bounds on scalars with constant values

2018-01-15 Thread Daniel Borkmann
On 01/15/2018 07:38 AM, Y Song wrote: > On Fri, Jan 12, 2018 at 11:23 AM, Daniel Borkmann > wrote: [...] >> >> I've been thinking to additionally reject arithmetic on ctx >> pointer in adjust_ptr_min_max_vals() right upfront as well >> since we reject actual access in such case later on anyway, >

RE: DPAA Ethernet problems with mainstream Linux kernels

2018-01-15 Thread Madalin-cristian Bucur
> -Original Message- > From: Jamie Krueger [mailto:ja...@bitbybitsoftwaregroup.com] > Sent: Friday, January 12, 2018 6:36 PM > To: Madalin-cristian Bucur ; linuxppc- > d...@lists.ozlabs.org > Cc: netdev@vger.kernel.org > Subject: Re: DPAA Ethernet problems with mainstream Linux kernels > >

pull-request: mac80211 2018-01-15

2018-01-15 Thread Johannes Berg
Hi Dave, I know this comes last minute, so if it doesn't make it then I guess we can live with that, but I got the earliest of the patches here on Wednesday last week, and that was the most uninteresting one - the others didn't come in until Saturday. Please pull and let me know if there's any pr

Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-15 Thread Pablo Neira Ayuso
On Sun, Jan 14, 2018 at 02:47:46PM +0200, Eyal Birger wrote: > On Fri, Jan 12, 2018 at 4:00 PM, Pablo Neira Ayuso > wrote: > > On Fri, Jan 12, 2018 at 03:56:21PM +0200, Eyal Birger wrote: > >> On Fri, Jan 12, 2018 at 3:41 PM, Pablo Neira Ayuso > >> wrote: > >> > On Fri, Jan 12, 2018 at 02:57:24

Re: [PATCH net-next] mlxsw: spectrum: qdiscs: Make function mlxsw_sp_qdisc_prio_unoffload static

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 11:43:03AM CET, weiyongj...@huawei.com wrote: >Fixes the following sparse warning: > >drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c:464:1: warning: > symbol 'mlxsw_sp_qdisc_prio_unoffload' was not declared. Should it be static? > >Signed-off-by: Wei Yongjun Acked-by: Ji

[PATCH] netlink: extack: avoid parenthesized string constant warning

2018-01-15 Thread Johannes Berg
From: Johannes Berg NL_SET_ERR_MSG() and NL_SET_ERR_MSG_ATTR() lead to the following warning in newer versions of gcc: warning: array initialized from parenthesized string constant Just remove the parentheses, they're not needed in this context since anyway since there can be no operator prece

Re: [RFT net-next v4 0/5] dwmac-meson8b: clock fixes for Meson8b

2018-01-15 Thread Jerome Brunet
On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: > Martin Blumenstingl (5): > net: stmmac: dwmac-meson8b: only configure the clocks in RGMII mode > net: stmmac: dwmac-meson8b: simplify generating the clock names > net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration

Re: [RFT net-next v4 1/5] net: stmmac: dwmac-meson8b: only configure the clocks in RGMII mode

2018-01-15 Thread Jerome Brunet
On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: > [...] > @@ -204,12 +200,24 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac > *dwmac) > > meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_TXDLY_MASK, > tx_dly_val << PR

Re: [RFT net-next v4 2/5] net: stmmac: dwmac-meson8b: simplify generating the clock names

2018-01-15 Thread Jerome Brunet
On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: > Instead of using a custom buffer, snprintf() and devm_kstrdup() we can > simplify this by using devm_kasprintf(). > No functional changes - this just makes the code shorter. CCF copies the name from the init_data to its own structures

Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-15 Thread Eyal Birger
On Mon, Jan 15, 2018 at 12:57 PM, Pablo Neira Ayuso wrote: > On Sun, Jan 14, 2018 at 02:47:46PM +0200, Eyal Birger wrote: >> On Fri, Jan 12, 2018 at 4:00 PM, Pablo Neira Ayuso >> wrote: >> > On Fri, Jan 12, 2018 at 03:56:21PM +0200, Eyal Birger wrote: >> >> On Fri, Jan 12, 2018 at 3:41 PM, Pablo

Re: [RFT net-next v4 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration

2018-01-15 Thread Jerome Brunet
On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: > Tests (using an oscilloscope and an Odroid-C1 board with a RTL8211F > RGMII PHY) have shown that the PRG_ETH0 register behaves as follows: > - bit 4 is a mux to choose between two parent clocks. according to the > public S805 datashe

Re: [RFT net-next v4 5/5] net: stmmac: dwmac-meson8b: propagate rate changes to the parent clock

2018-01-15 Thread Jerome Brunet
On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: > On Meson8b the only valid input clock is MPLL2. The bootloader > configures that to run at 52394Hz which cannot be divided evenly > down to 125MHz using the m250_div clock. Currently the common clock > framework chooses a m250_div

Re: WARNING in rfkill_alloc

2018-01-15 Thread Johannes Berg
On Mon, 2018-01-15 at 10:12 +0100, Dmitry Vyukov wrote: > However, there can be some surprising things, for example, executing > one ioctl/setsockopt with data meant for another one, or these > 0x are actually mean 0 (for involved reasons), I think those fff was actually what was

Re: [RFT net-next v4 2/5] net: stmmac: dwmac-meson8b: simplify generating the clock names

2018-01-15 Thread Martin Blumenstingl
Hi Jerome, On Mon, Jan 15, 2018 at 12:46 PM, Jerome Brunet wrote: > On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: >> Instead of using a custom buffer, snprintf() and devm_kstrdup() we can >> simplify this by using devm_kasprintf(). >> No functional changes - this just makes the co

Re: [RFT net-next v4 1/5] net: stmmac: dwmac-meson8b: only configure the clocks in RGMII mode

2018-01-15 Thread Martin Blumenstingl
Hi Jerome, On Mon, Jan 15, 2018 at 12:46 PM, Jerome Brunet wrote: > On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: >> > > [...] > >> @@ -204,12 +200,24 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac >> *dwmac) >> >> meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, P

Re: [RFT net-next v4 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration

2018-01-15 Thread Martin Blumenstingl
Hi Jerome, On Mon, Jan 15, 2018 at 12:49 PM, Jerome Brunet wrote: > On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: >> Tests (using an oscilloscope and an Odroid-C1 board with a RTL8211F >> RGMII PHY) have shown that the PRG_ETH0 register behaves as follows: >> - bit 4 is a mux to c

Re: WARNING in rfkill_alloc

2018-01-15 Thread Dmitry Vyukov
On Mon, Jan 15, 2018 at 1:01 PM, Johannes Berg wrote: > On Mon, 2018-01-15 at 10:12 +0100, Dmitry Vyukov wrote: > >> However, there can be some surprising things, for example, executing >> one ioctl/setsockopt with data meant for another one, or these >> 0x are actually mean 0 (for

[PATCHv2 5/5] ARM: dts: imx6q-b450v3: Add switch port configuration

2018-01-15 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors. The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the following information: root@b450v

[PATCHv2 3/5] ARM: dts: imx6q-b850v3: Add switch port configuration

2018-01-15 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors ("ID", "IX", "ePort 1", "ePort 2"). The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the

[PATCHv2 0/5] GEHC Bx50 Switch Support

2018-01-15 Thread Sebastian Reichel
Hi, This adds support for the internal switch found in GE Healthcare B450v3, B650v3 and B850v3. All devices use a GPIO bitbanged MDIO bus to communicate with the switch and a PCIe based network card for exchanging network data. The cpu network data link requires, that the switch's internal phy int

[PATCHv2 1/5] net: dsa: Support internal phy on 'cpu' port

2018-01-15 Thread Sebastian Reichel
This adds support for enabling the internal PHY for a 'cpu' port. It has been tested on GE B850v3, B650v3 and B450v3, which have a built-in MV88E6240 switch connected to a PCIe based network card. Without this patch the link does not come up and no traffic can be routed through the switch. The PH

[PATCHv2 4/5] ARM: dts: imx6q-b650v3: Add switch port configuration

2018-01-15 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors. The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the following information: root@b650v

[PATCHv2 2/5] ARM: dts: imx6q-bx50v3: Add internal switch

2018-01-15 Thread Sebastian Reichel
B850v3, B650v3 and B450v3 all have a GPIO bit banged MDIO bus to communicate with a Marvell switch. On all devices the switch is connected to a PCI based network card, which needs to be referenced by DT, so this also adds the common PCI root node. Signed-off-by: Sebastian Reichel --- arch/arm/bo

Re: linux-next: manual merge of the rdma tree with the net tree

2018-01-15 Thread Leon Romanovsky
On Mon, Jan 15, 2018 at 11:53:21AM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the rdma tree got a conflict in: > > drivers/infiniband/hw/mlx5/main.c > > between commits: > > 8978cc921fc7 ("{net,ib}/mlx5: Don't disable local loopback multicast > traffic when needed

Re: [PATCH 33/38] arm64: Implement thread_struct whitelist for hardened usercopy

2018-01-15 Thread Dave P Martin
On Thu, Jan 11, 2018 at 02:03:05AM +, Kees Cook wrote: > This whitelists the FPU register state portion of the thread_struct for > copying to userspace, instead of the default entire structure. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Christian Borntraeger > Cc: Ingo Molnar > Cc: Jam

Re: [RFC bpf-next] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info

2018-01-15 Thread Jiong Wang
On Fri, 12 Jan 2018 12:31:15 +0100, Daniel Borkmann wrote: What kind of string would sit in jited_arch_name for nfp? The name is purely to let libfd know which bfd backend to choose for the disassembler. Given you know the {ifindex, netns_dev, netns_ino} 3‑tuple, isn't it possible to infer th

Re: [PATCH net] sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf

2018-01-15 Thread Neil Horman
On Mon, Jan 15, 2018 at 05:01:36PM +0800, Xin Long wrote: > After commit cea0cc80a677 ("sctp: use the right sk after waking up from > wait_buf sleep"), it may change to lock another sk if the asoc has been > peeled off in sctp_wait_for_sndbuf. > > However, the asoc's new sk could be already closed

Re: [PATCH v6 02/36] openrisc: add ioremap_nocache declaration before include asm-generic/io.h and sync ioremap prototype with it.

2018-01-15 Thread Stafford Horne
On Mon, Jan 15, 2018 at 01:53:10PM +0800, Greentime Hu wrote: > From: Greentime Hu > > It will be built failed if commit id: d25ea659 is selected. This patch can > fix this > build error. Hello, As I mentioned last time, can you you change this to not mention the commit id? The ID will probabl

Re: pull-request: can-next 2017-12-01

2018-01-15 Thread Marc Kleine-Budde
Hello David, On 01/05/2018 12:08 PM, Marc Kleine-Budde wrote: > Hello David, > > this is a pull request of 7 patches for net-next/master. > > All patches are by me. Patch 6 is for the "can_raw" protocol and add > error checking to the bind() function. All other patches clean up the > coding sty

Re: [PATCH v6 02/36] openrisc: add ioremap_nocache declaration before include asm-generic/io.h and sync ioremap prototype with it.

2018-01-15 Thread Greentime Hu
2018-01-15 21:07 GMT+08:00 Stafford Horne : > On Mon, Jan 15, 2018 at 01:53:10PM +0800, Greentime Hu wrote: >> From: Greentime Hu >> >> It will be built failed if commit id: d25ea659 is selected. This patch can >> fix this >> build error. > > Hello, > > As I mentioned last time, can you you chang

Re: [RFT net-next v4 3/5] net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration

2018-01-15 Thread Jerome Brunet
On Mon, 2018-01-15 at 13:08 +0100, Martin Blumenstingl wrote: > can you share your thoughts how to do this? > I can devm_kzalloc the memory for struct clk_mux, clk_divider and > clk_fixed_factor in the function which registers these clocks. but I > cannot declare them on the stack, because the clk-

[PATCH net-next v6 1/2] net: add support for Cavium PTP coprocessor

2018-01-15 Thread Aleksey Makarov
From: Radoslaw Biernacki This patch adds support for the Precision Time Protocol Clocks and Timestamping hardware found on Cavium ThunderX processors. Signed-off-by: Radoslaw Biernacki Signed-off-by: Aleksey Makarov Acked-by: Philippe Ombredanne --- drivers/net/ethernet/cavium/Kconfig

[PATCH net-next v6 2/2] net: thunderx: add timestamping support

2018-01-15 Thread Aleksey Makarov
From: Sunil Goutham This adds timestamping support for both receive and transmit paths. On the receive side no filters are supported i.e either all pkts will get a timestamp appended infront of the packet or none. On the transmit side HW doesn't support timestamp insertion but only generates a se

[PATCH net-next v6 0/2] net: thunderx: add support for PTP clock

2018-01-15 Thread Aleksey Makarov
This series adds support for IEEE 1588 Precision Time Protocol to Cavium ethernet driver. The first patch adds support for the Precision Time Protocol Clocks and Timestamping coprocessor (PTP) found on Cavium processors. It registers a new PTP clock in the PTP core and provides functions to use th

[PATCH net-next v2 02/10] net: aquantia: Cleanup status flags accesses

2018-01-15 Thread Igor Russkikh
Usage of aq_obj_s structure is noop, here we remove it replacing access to flags filed directly. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h| 2 +- drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c | 6 +++--- drivers/net/ethernet/aquantia/

Re: [PATCH v7 1/8] can: dev: Add support for limiting configured bitrate

2018-01-15 Thread Marc Kleine-Budde
On 01/10/2018 11:55 AM, Faiz Abbas wrote: > From: Franklin S Cooper Jr > > Various CAN or CAN-FD IP may be able to run at a faster rate than > what the transceiver the CAN node is connected to. This can lead to > unexpected errors. However, CAN transceivers typically have fixed > limitations and

[PATCH net-next v2 00/10] Aquantia atlantic driver update 2018/01

2018-01-15 Thread Igor Russkikh
This patch is a set of cleanups and bugfixes in preparation to new Aquantia hardware support. Standard ARRAY_SIZE is now used through all the code, some unused abstraction structures removed and cleaned up, duplicate declarations removed. Also two large declaration styling fixes: - Hardware regis

[PATCH net-next v2 06/10] net: aquantia: Simplify dependencies between pci modules

2018-01-15 Thread Igor Russkikh
Eliminate useless passing of net_device_ops and ethtools_ops through deep chain of calls. Move all pci related code into aq_pci_func module. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 97 -- drivers/net/ethernet/aquantia/atlantic/aq_

[PATCH net-next v2 01/10] net: aquantia: Eliminate AQ_DIMOF, replace with ARRAY_SIZE

2018-01-15 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_utils.h| 2 -- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c| 2 +- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c

[PATCH net-next v2 10/10] net: aquantia: Fix internal stats calculation on rx

2018-01-15 Thread Igor Russkikh
skb len should be fetched before gro_receive - otherwise we may get wrong or even outdated skb data. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq

[PATCH net-next v2 03/10] net: aquantia: Cleanup hardware access modules

2018-01-15 Thread Igor Russkikh
Use direct aq_hw_s *self reference where possible Eliminate useless abstraction PHAL, duplicated structures definitions, Simplify nic config structure creation and management. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 22 +++-- drivers/net/ethernet

[PATCH net-next v2 07/10] net: aquantia: Eliminate aq_nic structure abstraction

2018-01-15 Thread Igor Russkikh
aq_nic_s was hidden in aq_nic_internal.h, that made it difficult to access nic fields and structures from other modules. This change moves aq_nic_s struct into aq_nic.h and thus makes it available to other driver modules, mainly pci module and hw related module. Signed-off-by: Igor Russkikh ---

[PATCH net-next v2 05/10] net: aquantia: Add const qualifiers for hardware ops tables

2018-01-15 Thread Igor Russkikh
Hardware operations and capabilities tables are constants and never changed. Declare these as constants. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 3 ++- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 6 +++--- drivers/net/eth

[PATCH net-next v2 04/10] net: aquantia: Remove duplicate hardware descriptors declarations

2018-01-15 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- .../aquantia/atlantic/hw_atl/hw_atl_a0_internal.h | 31 -- .../aquantia/atlantic/hw_atl/hw_atl_b0_internal.h | 31 -- .../aquantia/atlantic/hw_atl/hw_atl_utils.h| 31 ++ 3 files changed, 31 inse

[PATCH net-next v2 09/10] net: aquantia: Prepend hw access functions declarations with prefix

2018-01-15 Thread Igor Russkikh
Internal functions for registers and HW access were not prefixed. This introduce noise in global kernel symbols. Here we add explicit prefix 'hw_atl' to all the HW access layer functions. Alignment and styling were fixed as well. Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/hw

Re: [PATCH v7 4/8] can: m_can: Move allocation of net device to probe

2018-01-15 Thread Marc Kleine-Budde
On 01/10/2018 11:55 AM, Faiz Abbas wrote: > With the version no longer required to allocate the net device, it can > be moved to probe and the alloc_m_can_dev() function can be simplified. > > Therefore, move the allocation of net device to probe and change > alloc_m_can_dev() to setup_m_can_dev()

Re: [PATCH v7 5/8] can: m_can: Add PM Support

2018-01-15 Thread Marc Kleine-Budde
On 01/10/2018 11:55 AM, Faiz Abbas wrote: > From: Franklin S Cooper Jr > > Add support for CONFIG_PM which is the new way to handle managing clocks. > > Move the clock management to pm_runtime_resume() and pm_runtime_suspend() > callbacks for the driver. > > CONFIG_PM is required by OMAP based

Re: [RFC bpf-next] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info

2018-01-15 Thread Daniel Borkmann
On 01/15/2018 01:27 PM, Jiong Wang wrote: >> On Fri, 12 Jan 2018 12:31:15 +0100, Daniel Borkmann wrote: [...] >>> Given we know when ifindex is 0, then its always host JITed and the >>> current approach with bfd_openr() works fine, and if ifindex is non-0 >>> it is /always/ device offloaded to the

Re: [PATCH net] sctp: reinit stream if stream outcnt has been change by sinit in sendmsg

2018-01-15 Thread Neil Horman
On Mon, Jan 15, 2018 at 05:01:19PM +0800, Xin Long wrote: > After introducing sctp_stream structure, sctp uses stream->outcnt as the > out stream nums instead of c.sinit_num_ostreams. > > However when users use sinit in cmsg, it only updates c.sinit_num_ostreams > in sctp_sendmsg. At that moment,

KASAN poisoning for skb linear data

2018-01-15 Thread Dmitry Vyukov
Hi, As far as I understand pskb_may_pull() plays important role in packet parsing for all protocols. And we did custom fragmentation of packets emitted via tun (IFF_NAPI_FRAGS). However, it seems that it does not give any results (bugs found), and I think the reason for this is that linear data is

Re: [RFT net-next v4 2/5] net: stmmac: dwmac-meson8b: simplify generating the clock names

2018-01-15 Thread Jerome Brunet
On Mon, 2018-01-15 at 13:02 +0100, Martin Blumenstingl wrote: > > Here you'd allocate memory for each string which will remain until the > > driver > > unload. It's not much, but still, it is wasted memory. > > good catch, thank you! > maybe I should drop this patch for now and clean up the clock

Re: [PATCH v7 0/8] Add MCAN Support for Dra76 platform

2018-01-15 Thread Marc Kleine-Budde
On 01/10/2018 11:55 AM, Faiz Abbas wrote: > This patch series adds support for M_CAN on the TI Dra76 > platform. Device tree patches will be sent separately. > A bunch of patches were sent before by > Franklin Cooper . I have clubbed the > series together and rebased to the latest kernel. I've add

Re: [PATCH net] ibmvnic: Fix pending MAC address changes

2018-01-15 Thread John Allen
On 01/10/2018 07:39 PM, Thomas Falcon wrote: > Due to architecture limitations, the IBM VNIC client driver is unable > to perform MAC address changes unless the device has "logged in" to > its backing device. Currently, pending MAC changes are handled before > login, resulting in an error and failu

RE: [PATCH v2] bnx2x: disable GSO where gso_size is too big for hardware

2018-01-15 Thread Chopra, Manish
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Daniel Axtens > Sent: Friday, January 12, 2018 5:29 AM > To: netdev@vger.kernel.org > Cc: Daniel Axtens ; Thomas Falcon > ; Mintz, Yuval > Subject: [PATCH v2] bnx2x: disable GSO w

Re: KASAN: slab-out-of-bounds Write in array_map_update_elem

2018-01-15 Thread Dmitry Vyukov
On Mon, Jan 15, 2018 at 3:58 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 4147d50978df60f34d444c647dde9e5b34a4315e > git://git.cmpxchg.org/linux-mmots.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. > C reproducer is

Re: KASAN: use-after-free Write in array_map_update_elem

2018-01-15 Thread Dmitry Vyukov
On Mon, Jan 15, 2018 at 3:58 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 8418f88764046d0e8ca6a3c04a69a0e57189aa1e > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is

Re: [PATCH 3/4] tsi108_eth: use dma API properly

2018-01-15 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 10:09:20PM +0200, Andy Shevchenko wrote: > > + struct platform_device *pdev; > > Do you really need platform_defice reference? > > Perhaps > > struct device *hdev; // hardware device > > > data->hdev = &pdev->dev; > > Another idea > > dev->dev.parent = &pdev->de

Did you get my last email

2018-01-15 Thread Peter Deng
Hello there, I sent you an email a few days with a proposal that I think you will be interested in because it is of mutual benefit. Did you receive the email? I am not if you got it because I did not receive a reply from you and my mailbox has been acting up lately. Could you please reply me dir

Re: [PATCHv2 1/5] net: dsa: Support internal phy on 'cpu' port

2018-01-15 Thread Andrew Lunn
On Mon, Jan 15, 2018 at 01:15:04PM +0100, Sebastian Reichel wrote: > This adds support for enabling the internal PHY for a 'cpu' port. > It has been tested on GE B850v3, B650v3 and B450v3, which have a > built-in MV88E6240 switch connected to a PCIe based network card. > Without this patch the lin

[PATCH net-next 2/2] netfilter: nf_defrag: move NF_CONNTRACK bits into #ifdef

2018-01-15 Thread Arnd Bergmann
We cannot access the skb->_nfct field when CONFIG_NF_CONNTRACK is disabled: net/ipv4/netfilter/nf_defrag_ipv4.c: In function 'ipv4_conntrack_defrag': net/ipv4/netfilter/nf_defrag_ipv4.c:83:9: error: 'struct sk_buff' has no member named '_nfct' net/ipv6/netfilter/nf_defrag_ipv6_hooks.c: In functio

[PATCH net-next 1/2] netfilter: nf_defrag: mark xt_table structures 'const' again

2018-01-15 Thread Arnd Bergmann
As a side-effect of adding the module option, we now get a section mismatch warning: WARNING: net/ipv4/netfilter/iptable_raw.o(.data+0x1c): Section mismatch in reference from the variable packet_raw to the function .init.text:iptable_raw_table_init() The variable packet_raw references the functi

RE: DPAA Ethernet traffice troubles with Linux kernel

2018-01-15 Thread Madalin-cristian Bucur
> -Original Message- > From: Linuxppc-dev [mailto:linuxppc-dev- > bounces+madalin.bucur=nxp@lists.ozlabs.org] On Behalf Of mad skateman > Sent: Wednesday, January 10, 2018 10:39 PM > To: linuxppc-...@lists.ozlabs.org > Subject: DPAA Ethernet traffice troubles with Linux kernel > > Hi l

Re: [patch iproute2 v10 0/2] tc: Add batchsize feature to batch mode

2018-01-15 Thread David Ahern
On 1/11/18 10:13 PM, Chris Mi wrote: > Currently in tc batch mode, only one command is read from the batch > file and sent to kernel to process. With this patchset, at most 128 > commands can be accumulated before sending to kernel. > > We introduced a new function in patch 1 to support for sendin

[net-next 1/1] tipc: fix race condition at topology server receive

2018-01-15 Thread Jon Maloy
We have identified a race condition during reception of socket events and messages in the topology server. - The function tipc_close_conn() is releasing the corresponding struct tipc_subscriber instance without considering that there may still be items in the receive work queue. When those are

Re: [patch net-next v8 08/14] net: sched: add rt netlink message type for block get

2018-01-15 Thread David Ahern
On 1/12/18 8:46 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Add simple block get operation which primary purpose is to check the > block existence by block index. > > Signed-off-by: Jiri Pirko > --- > v6->v7: > - new patch > --- > include/uapi/linux/rtnetlink.h | 6 > net/sched/cls_api.

Re: DPAA Ethernet traffice troubles with Linux kernel

2018-01-15 Thread Joakim Tjernlund
On Thu, 1970-01-01 at 00:00 +, Madalin-cristian Bucur wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > > -Original Message- > > From: Linuxppc-dev

Re: [patch net-next v8 08/14] net: sched: add rt netlink message type for block get

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 05:56:31PM CET, dsah...@gmail.com wrote: >On 1/12/18 8:46 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Add simple block get operation which primary purpose is to check the >> block existence by block index. >> >> Signed-off-by: Jiri Pirko >> --- >> v6->v7: >> - new patch

Re: [patch net-next v8 08/14] net: sched: add rt netlink message type for block get

2018-01-15 Thread David Ahern
On 1/15/18 10:03 AM, Jiri Pirko wrote: > Mon, Jan 15, 2018 at 05:56:31PM CET, dsah...@gmail.com wrote: >> On 1/12/18 8:46 AM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Add simple block get operation which primary purpose is to check the >>> block existence by block index. >>> >>> Signed-off-b

[PATCH net-next v5 4/4] net: stmmac: dwmac-meson8b: propagate rate changes to the parent clock

2018-01-15 Thread Martin Blumenstingl
On Meson8b the only valid input clock is MPLL2. The bootloader configures that to run at 52394Hz which cannot be divided evenly down to 125MHz using the m250_div clock. Currently the common clock framework chooses a m250_div of 2 - with the internal fixed "divide by 10" this results in a RGMII

  1   2   3   4   >