Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-12-06 Thread achiad shochat
On 5 December 2017 at 21:20, Michael S. Tsirkin wrote: > On Tue, Dec 05, 2017 at 11:59:17AM +0200, achiad shochat wrote: >> Then we'll have a single solution for both netvsc and virtio (and any >> other PV device). >> And we could handle the VF DMA dirt issue agnostically. > > For the record, I wo

Re: [PATCH net-next] virtio_net: Disable interrupts if napi_complete_done rescheduled napi

2017-12-06 Thread Jason Wang
On 2017年12月07日 13:09, Michael S. Tsirkin wrote: On Thu, Dec 07, 2017 at 01:15:15PM +0900, Toshiaki Makita wrote: Since commit 39e6c8208d7b ("net: solve a NAPI race") napi has been able to be rescheduled within napi_complete_done() even in non-busypoll case, but virtnet_poll() always enabled in

[PATCH net-next 3/3] net: dsa: mediatek: update MAINTAINERS entry with MediaTek switch driver

2017-12-06 Thread sean.wang
From: Sean Wang I work for MediaTek and maintain SoC targeting to home gateway and also will keep extending and testing the function from MediaTek switch. Signed-off-by: Sean Wang --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c0edf30

[PATCH net-next 1/3] net: dsa: mediatek: add VLAN support for MT7530

2017-12-06 Thread sean.wang
From: Sean Wang MT7530 can treat each port as either VLAN-unware port or VLAN-ware port through the implementation of port matrix mode or port security mode on the ingress port, respectively. On one hand, Each port has been acting as the VLAN-unware one whenever the device is created in the initi

[PATCH net-next 0/3] add VLAN support to DSA MT7530

2017-12-06 Thread sean.wang
From: Sean Wang The patchset extends DSA MT7530 to VLAN support through filling required callbacks in patch 1 and merging the special tag with VLAN tag in patch 2 for allowing that the hardware can handle these packets with VID from the CPU port. Sean Wang (3): net: dsa: mediatek: add VLAN sup

[PATCH net-next 2/3] net: dsa: mediatek: combine MediaTek tag with VLAN tag

2017-12-06 Thread sean.wang
From: Sean Wang In order to let MT7530 switch can recognize well those packets having both special tag and VLAN tag, the information about the special tag should be carried on the existing VLAN tag. Signed-off-by: Sean Wang --- net/dsa/tag_mtk.c | 38 +- 1 f

Re: [PATCH net-next] netdevsim: check return value of debugfs_create_dir

2017-12-06 Thread Jakub Kicinski
On Thu, 7 Dec 2017 13:10:39 +0900, Prashant Bhole wrote: > > From: Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > > > > On Thu, 7 Dec 2017 10:02:13 +0900, Prashant Bhole wrote: > > > - Handled debugfs_create_dir failure in nsim_init() > > > - Fixed return value of nsim_module_init() whe

Re: [Intel-wired-lan] [next-queue 03/10] ixgbe: add ipsec engine start and stop routines

2017-12-06 Thread Shannon Nelson
On 12/5/2017 8:22 AM, Alexander Duyck wrote: On Mon, Dec 4, 2017 at 9:35 PM, Shannon Nelson wrote: Add in the code for running and stopping the hardware ipsec encryption/decryption engine. It is good to keep the engine off when not in use in order to save on the power draw. Signed-off-by: Sha

Re: [Intel-wired-lan] [next-queue 10/10] ixgbe: register ipsec offload with the xfrm subsystem

2017-12-06 Thread Shannon Nelson
On 12/5/2017 12:11 PM, Alexander Duyck wrote: On Mon, Dec 4, 2017 at 9:35 PM, Shannon Nelson wrote: With all the support code in place we can now link in the ipsec offload operations and set the ESP feature flag for the XFRM subsystem to see. Signed-off-by: Shannon Nelson --- drivers/net/et

Re: [Intel-wired-lan] [next-queue 09/10] ixgbe: ipsec offload stats

2017-12-06 Thread Shannon Nelson
On 12/5/2017 11:53 AM, Alexander Duyck wrote: On Mon, Dec 4, 2017 at 9:35 PM, Shannon Nelson wrote: Add a simple statistic to count the ipsec offloads. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.

Re: [Intel-wired-lan] [next-queue 08/10] ixgbe: process the Tx ipsec offload

2017-12-06 Thread Shannon Nelson
On 12/5/2017 10:13 AM, Alexander Duyck wrote: On Mon, Dec 4, 2017 at 9:35 PM, Shannon Nelson wrote: If the skb has a security association referenced in the skb, then set up the Tx descriptor with the ipsec offload bits. While we're here, we fix an oddly named field in the context descriptor st

Re: [Intel-wired-lan] [next-queue 07/10] ixgbe: process the Rx ipsec offload

2017-12-06 Thread Shannon Nelson
On 12/5/2017 9:40 AM, Alexander Duyck wrote: On Mon, Dec 4, 2017 at 9:35 PM, Shannon Nelson wrote: If the chip sees and decrypts an ipsec offload, set up the skb sp pointer with the ralated SA info. Since the chip is rude enough to keep to itself the table index it used for the decryption, we

Re: [Intel-wired-lan] [next-queue 06/10] ixgbe: restore offloaded SAs after a reset

2017-12-06 Thread Shannon Nelson
On 12/5/2017 9:30 AM, Alexander Duyck wrote: On Mon, Dec 4, 2017 at 9:35 PM, Shannon Nelson wrote: On a chip reset most of the table contents are lost, so must be restored. This scans the driver's ipsec tables and restores both the filled and empty table slots to their pre-reset values. Signe

Re: [Intel-wired-lan] [next-queue 05/10] ixgbe: implement ipsec add and remove of offloaded SA

2017-12-06 Thread Shannon Nelson
On 12/5/2017 9:26 AM, Alexander Duyck wrote: On Mon, Dec 4, 2017 at 9:35 PM, Shannon Nelson wrote: Add the functions for setting up and removing offloaded SAs (Security Associations) with the x540 hardware. We set up the callback structure but we don't yet set the hardware feature bit to be su

Re: [Intel-wired-lan] [next-queue 02/10] ixgbe: add ipsec register access routines

2017-12-06 Thread Shannon Nelson
Thanks, Alex, for your detailed comments, I do appreciate the time and thought you put into them. Responses below... sln On 12/5/2017 8:56 AM, Alexander Duyck wrote: On Mon, Dec 4, 2017 at 9:35 PM, Shannon Nelson wrote: Add a few routines to make access to the ipsec registers just a little

Re: [Intel-wired-lan] [next-queue 04/10] ixgbe: add ipsec data structures

2017-12-06 Thread Shannon Nelson
On 12/5/2017 9:03 AM, Alexander Duyck wrote: On Mon, Dec 4, 2017 at 9:35 PM, Shannon Nelson wrote: Set up the data structures to be used by the ipsec offload. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 5 drivers/net/ethernet/intel/ixgbe/ixgbe_

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-12-06 Thread Sergey Senozhatsky
On (12/07/17 16:17), Tobin C. Harding wrote: [..] > > hm, indeed. and !CONFIG_KALLSYMS config turns %pS/%ps > > into special_hex_number(). > > But totally misses this :( > > "" would be better returned when !CONFIG_KALLSYMS, right? I guess I'll take back my comment. I assume there are tons of e

Re: [PATCH net-next 1/6] net: sched: sch_api: handle generic qdisc errors

2017-12-06 Thread David Ahern
On 12/6/17 9:08 AM, Alexander Aring wrote: > diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c > index a48ca41b7ecf..7b52a16d2fea 100644 > --- a/net/sched/sch_api.c > +++ b/net/sched/sch_api.c > @@ -449,7 +449,8 @@ static const struct nla_policy stab_policy[TCA_STAB_MAX + > 1] = { > [TC

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-12-06 Thread Tobin C. Harding
On Wed, Dec 06, 2017 at 05:45:37PM +0900, Sergey Senozhatsky wrote: > On (12/06/17 09:32), Geert Uytterhoeven wrote: > [..] > > >> show_fault_oops(struct pt_regs *regs, unsigned long error_code, > > >> unsigned long address) > > >> ... > > >> printk(KERN_CONT " at %p\n", (vo

Re: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-12-06 Thread Tobin C. Harding
On Wed, Dec 06, 2017 at 09:32:14AM +0100, Geert Uytterhoeven wrote: > Hi Linus, > > On Wed, Dec 6, 2017 at 2:59 AM, Linus Torvalds > wrote: > > On Tue, Dec 5, 2017 at 5:36 PM, Sergey Senozhatsky > > wrote: > >> I see some %p-s being used in _supposedly_ important output, > >> like arch/x86/mm/fa

Re: [PATCH net-next] virtio_net: Disable interrupts if napi_complete_done rescheduled napi

2017-12-06 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 01:15:15PM +0900, Toshiaki Makita wrote: > Since commit 39e6c8208d7b ("net: solve a NAPI race") napi has been able > to be rescheduled within napi_complete_done() even in non-busypoll case, > but virtnet_poll() always enabled interrupts before complete, and when > napi was r

[PATCH net-next] virtio_net: Disable interrupts if napi_complete_done rescheduled napi

2017-12-06 Thread Toshiaki Makita
Since commit 39e6c8208d7b ("net: solve a NAPI race") napi has been able to be rescheduled within napi_complete_done() even in non-busypoll case, but virtnet_poll() always enabled interrupts before complete, and when napi was rescheduled within napi_complete_done() it did not disable interrupts. Thi

[PATCH net-next 1/1] forcedeth: remove unnecessary variable

2017-12-06 Thread Zhu Yanjun
Since both tx_ring and first_tx are the head of tx ring, it not necessary to use two variables. So first_tx is removed. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 21 +++-- 1 file changed, 11 insertions(

RE: [PATCH net-next] netdevsim: check return value of debugfs_create_dir

2017-12-06 Thread Prashant Bhole
> From: Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > > On Thu, 7 Dec 2017 10:02:13 +0900, Prashant Bhole wrote: > > - Handled debugfs_create_dir failure in nsim_init() > > - Fixed return value of nsim_module_init() when debugfs_create_dir > > fails > > > > Signed-off-by: Prashant Bhole

[PATCH v2 net] netlink: Relax attr validation for fixed length types

2017-12-06 Thread David Ahern
Commit 28033ae4e0f5 ("net: netlink: Update attr validation to require exact length for some types") requires attributes using types NLA_U* and NLA_S* to have an exact length. This change is exposing bugs in various userspace commands that are sending attributes with an invalid length (e.g., attribu

RE: [PATCH 2/2] net: fec: optimize IRQ handler

2017-12-06 Thread Andy Duan
From: Lucas Stach Sent: Thursday, December 07, 2017 1:25 AM >fep->work_rx and fep->work_tx are both non-zero, as long as the NAPI >softirq hasn't finished its work. So if the current IRQ does not signal any RX >or >TX completion, but some unrelated event, the path to schedule the NAPI >context i

Re: [PATCH net-next] netdevsim: check return value of debugfs_create_dir

2017-12-06 Thread Jakub Kicinski
On Thu, 7 Dec 2017 10:02:13 +0900, Prashant Bhole wrote: > - Handled debugfs_create_dir failure in nsim_init() > - Fixed return value of nsim_module_init() when debugfs_create_dir fails > > Signed-off-by: Prashant Bhole Why? Failing to expose the state via DebugFS is not fatal to the driver.

Re: [PATCH net v2] adding missing rcu_read_unlock in ipxip6_rcv

2017-12-06 Thread Alexei Starovoitov
On Wed, Dec 06, 2017 at 05:15:43PM -0800, Nikita V. Shirokov wrote: > commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") > introduced new exit point in ipxip6_rcv. however rcu_read_unlock is > missing there. this diff is fixing this > > v1->v2: > instead of doing rcu_read_un

Re: [PATCH net 1/2] bpf/verifier: fix bounds calculation on BPF_RSH

2017-12-06 Thread Alexei Starovoitov
On Tue, Dec 05, 2017 at 11:44:14AM -0800, Alexei Starovoitov wrote: > On Tue, Dec 05, 2017 at 07:15:18PM +, Edward Cree wrote: > > Incorrect signed bounds were being computed, although this had no effect > > since the propagation in __reg_deduce_bounds() happened to overwrite them. > > > > Fi

[PATCH net v2] adding missing rcu_read_unlock in ipxip6_rcv

2017-12-06 Thread Nikita V. Shirokov
commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") introduced new exit point in ipxip6_rcv. however rcu_read_unlock is missing there. this diff is fixing this v1->v2: instead of doing rcu_read_unlock in place, we are going to "drop" section (to prevent skb leakage) Signed-

[PATCH net-next] netdevsim: check return value of debugfs_create_dir

2017-12-06 Thread Prashant Bhole
- Handled debugfs_create_dir failure in nsim_init() - Fixed return value of nsim_module_init() when debugfs_create_dir fails Signed-off-by: Prashant Bhole --- drivers/net/netdevsim/netdev.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/net/netdev

Re: [PATCH net] adding missing rcu_read_unlock in ipxip6_rcv

2017-12-06 Thread Nikita Shirokov
On 12/6/17, 12:50 PM, "David Miller" wrote: From: "Nikita V. Shirokov" Date: Wed, 6 Dec 2017 10:19:33 -0800 > commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") > introduced new exit point in ipxip6_rcv. however rcu_read_unlock is > missing there

Re: [PATCH net-next] bridge: ebtables: Avoid resetting limit rule state

2017-12-06 Thread Pablo Neira Ayuso
Hi Linus, On Mon, Dec 04, 2017 at 05:53:35AM +0100, Linus Lüssing wrote: > Hi Pablo, > > Thanks for your reply! > > On Tue, Nov 28, 2017 at 12:30:08AM +0100, Pablo Neira Ayuso wrote: > > [...] > > > diff --git a/net/bridge/netfilter/ebt_limit.c > > > b/net/bridge/netfilter/ebt_limit.c > > > ind

[PATCH net 1/2] net: dsa: mv88e6xxx: Fix interrupt masking on removal

2017-12-06 Thread Andrew Lunn
When removing the interrupt handling code, we should mask the generation of interrupts. The code however unmasked all interrupts. This can then cause a new interrupt. We then get into a deadlock where the interrupt thread is waiting to run, and the code continues, trying to remove the interrupt han

[PATCH net 2/2] net: dsa: mv88e6xxx: Unregister MDIO bus on error path

2017-12-06 Thread Andrew Lunn
The MDIO busses need to be unregistered before they are freed, otherwise BUG() is called. Add a call to the unregister code if the registration fails, since we can have multiple busses, of which some may correctly register before one fails. This requires moving the code around a little. Fixes: a3c

[PATCH net 0/2] mv88e6xxx error patch fixes

2017-12-06 Thread Andrew Lunn
While trying to bring up a new PHY on a board, i exercised the error paths a bit, and discovered some bugs. The unwind for interrupt handling deadlocks, and the MDIO code hits a BUG() when a registered MDIO device is freed without first being unregistered. Andrew Lunn (2): net: dsa: mv88e6xxx: F

linux-next: manual merge of the vfs tree with the bpf tree

2017-12-06 Thread Stephen Rothwell
Hi Al, Today's linux-next merge of the vfs tree got conflicts in: arch/alpha/include/uapi/asm/Kbuild arch/mn10300/include/uapi/asm/Kbuild arch/score/include/uapi/asm/Kbuild between commit: c895f6f703ad ("bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type") from the bpf

Re: [PATCHv2 2/2] userns: control capabilities of some user namespaces

2017-12-06 Thread Serge E. Hallyn
Quoting Mahesh Bandewar (महेश बंडेवार) (mahe...@google.com): > On Wed, Nov 29, 2017 at 9:57 AM, Serge E. Hallyn wrote: > > Quoting Mahesh Bandewar (महेश बंडेवार) (mahe...@google.com): > >> On Tue, Nov 28, 2017 at 3:04 PM, Serge E. Hallyn wrote: > >> > Quoting Mahesh Bandewar (महेश बंडेवार) (mahe.

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-06 Thread Linus Torvalds
On Wed, Dec 6, 2017 at 3:21 PM, Kees Cook wrote: > On Wed, Dec 6, 2017 at 2:31 AM, David Laight wrote: >> >> I can also image issues where you want to know whether 2 pointers point >> into the same structure (like an skb). > > This is already retained due to the hashing. i.e. the same pointer > v

Re: [PATCH v3 net-next 0/1] net: dsa: microchip: Add Microchip KSZ8795 DSA driver

2017-12-06 Thread Andrew Lunn
On Tue, Dec 05, 2017 at 05:47:30PM -0800, tristram...@microchip.com wrote: > From: Tristram Ha > > This patch requires the previous patches for Microchip KSZ9477 DSA driver. Please don't submit so many patch sets, which all depend on the previous one. Wait until they get accepted. I'm not going

Re: [PATCH v3 net-next] net: dsa: Modify tag_ksz.c so that tail tag code can be used by other KSZ switch drivers

2017-12-06 Thread Andrew Lunn
On Tue, Dec 05, 2017 at 05:47:14PM -0800, tristram...@microchip.com wrote: > +static int ksz9477_get_tag(u8 *tag, int *port) > +{ > + *port = tag[0] & 7; > + return KSZ_EGRESS_TAG_LEN; > +} > + > +static void ksz9477_set_tag(void *ptr, u8 *addr, int p) > +{ > + u16 *tag = (u16 *)ptr; >

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-06 Thread Kees Cook
On Wed, Dec 6, 2017 at 2:31 AM, David Laight wrote: > From: David Miller >> Sent: 05 December 2017 20:31 > ... >> > Would it make sense to keep the 3 lowest bits of the address? >> > >> > Currently printed pointers no longer have any correlation with the actual >> > alignment in memory of the obje

Re: [PATCH v3 net-next] net: dsa: microchip: Add MIB counter reading support

2017-12-06 Thread Andrew Lunn
> + for (i = 0; i < dev->mib_port_cnt; i++) { > + p = &dev->ports[i]; > + if (!p->on) > + continue; > + mib = &p->mib; > + mutex_lock(&mib->cnt_mutex); > + > + /* read only dropped counters when link is not up */ >

[PATCH] net: ethernet: arc: fix error handling in emac_rockchip_probe

2017-12-06 Thread Branislav Radocaj
If clk_set_rate() fails, we should disable clk before return. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Branislav Radocaj --- drivers/net/ethernet/arc/emac_rockchip.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethern

[PATCH net-next v3] net: dsa: Allow compiling out legacy support

2017-12-06 Thread Florian Fainelli
Introduce a configuration option: CONFIG_NET_DSA_LEGACY allowing to compile out support for the old platform device and Device Tree binding registration. Support for these configurations is scheduled to be removed in 4.17. Signed-off-by: Florian Fainelli --- Changes in v3: - rebase against latest

[Patch net-next 1/2] netlink: make netlink tap per netns

2017-12-06 Thread Cong Wang
nlmon device is not supposed to capture netlink events from other netns, so instead of filtering events, we can simply make netlink tap itself per netns. Cc: Daniel Borkmann Cc: Kevin Cernekee Signed-off-by: Cong Wang --- net/netlink/af_netlink.c | 66 +++---

[Patch net-next 2/2] netlink: convert netlink tap spinlock to mutex

2017-12-06 Thread Cong Wang
Both netlink_add_tap() and netlink_remove_tap() are called in process context, no need to bother spinlock. Note, in fact, currently we always hold RTNL when calling these two functions, so we don't need any other lock at all, but keeping this lock doesn't harm anything. Cc: Daniel Borkmann Signe

[Patch net-next 0/2] netlink: improve netlink tap code

2017-12-06 Thread Cong Wang
Cong Wang (2): netlink: make netlink tap per netns netlink: convert netlink tap spinlock to mutex net/netlink/af_netlink.c | 66 +++- 1 file changed, 49 insertions(+), 17 deletions(-) -- 2.13.0

RE: OUMM: Email Reminder to Voluntarily Update Disability and Veteran Status

2017-12-06 Thread Cristal Tiscareno
From: Cristal Tiscareno Sent: Wednesday, December 06, 2017 2:29 PM Subject: OUMM: Email Reminder to Voluntarily Update Disability and Veteran Status TO: All Employees To comply with federal data collection requirements related to laws regulating anti-discrimi

Re: Waiting for the PHY to complete auto-negotiation

2017-12-06 Thread Florian Fainelli
On 12/06/2017 11:25 AM, Mason wrote: > On 06/12/2017 20:07, Andrew Lunn wrote: > >> By chip, you mean the Ethernet controller? Not the whole SoC? > > Doh! Yes. Let me rephrase. > > When we detect link down, we put the ethernet HW block in reset, > and repeat initialization when the link comes

Re: [PATCH v2 net-next 7/8] net: dsa: microchip: Prepare PHY for proper advertisement

2017-12-06 Thread Florian Fainelli
On 12/06/2017 01:55 PM, tristram...@microchip.com wrote: >>> +static void ksz9477_phy_setup(struct ksz_device *dev, int port, >>> + struct phy_device *phy) >>> +{ >>> + if (port < dev->phy_port_cnt) { >>> + /* SUPPORTED_Asym_Pause and SUPPORTED_Pause can be >>

Re: [PATCH bpf-next 0/2] Few BPF doc updates

2017-12-06 Thread Alexei Starovoitov
On Wed, Dec 06, 2017 at 01:12:39AM +0100, Daniel Borkmann wrote: > Two changes, i) add BPF trees into maintainers file, and ii) add > a BPF doc around the development process, similarly as we have > with netdev FAQ, but just describing BPF specifics. Thanks! > > Daniel Borkmann (2): > bpf, doc:

[PATCH v5] perf_event_open.2: add type kprobe and uprobe

2017-12-06 Thread Song Liu
Two new types kprobe and uprobe are being added to perf_event_open, which allow creating kprobe or uprobe with perf_event_open. This patch adds information about these types. Signed-off-by: Song Liu --- man2/perf_event_open.2 | 50 ++ 1 file change

[PATCH v5 0/6] enable creating [k,u]probe with perf_event_open

2017-12-06 Thread Song Liu
Changes PATCH v4 to PATCH v5: Remove PERF_PROBE_CONFIG_IS_RETPROBE from uapi, use PMU_FORMAT_ATTR instead. Changes PATCH v3 to PATCH v4: Remove uapi define MAX_PROBE_FUNC_NAME_LEN, use KSYM_NAME_LEN instead. Add flag PERF_PROBE_CONFIG_IS_RETPROBE for config field of [k,u]probe. Optimize

[PATCH v5 3/6] perf: implement pmu perf_kprobe

2017-12-06 Thread Song Liu
A new pmu, perf_kprobe is added. Based attr from perf_event_open(), perf_kprobe creates a kprobe (or kretprobe) for the perf_event. This kprobe is private to this perf_event, and thus not added to global lists, and not available in tracefs. Two functions, create_local_trace_kprobe() and destroy_lo

[PATCH v5] bcc: Try use new API to create [k,u]probe with perf_event_open

2017-12-06 Thread Song Liu
New kernel API allows creating [k,u]probe with perf_event_open. This patch tries to use the new API. If the new API doesn't work, we fall back to old API. bpf_detach_probe() looks up the event being removed. If the event is not found, we skip the clean up procedure. Signed-off-by: Song Liu ---

[PATCH v5 2/6] perf: copy new perf_event.h to tools/include/uapi

2017-12-06 Thread Song Liu
perf_event.h is updated in previous patch, this patch applies same changes to the tools/ version. This is part is put in a separate patch in case the two files are back ported separately. Signed-off-by: Song Liu Reviewed-by: Yonghong Song Reviewed-by: Josef Bacik Acked-by: Alexei Starovoitov -

[PATCH v5 6/6] bpf: add new test test_many_kprobe

2017-12-06 Thread Song Liu
The test compares old text based kprobe API with perf_kprobe. Here is a sample output of this test: Creating 1000 kprobes with text-based API takes 6.979683 seconds Cleaning 1000 kprobes with text-based API takes 84.897687 seconds Creating 1000 kprobes with perf_kprobe (function name) takes 5.077

[PATCH v5 1/6] perf: prepare perf_event.h for new types perf_kprobe and perf_uprobe

2017-12-06 Thread Song Liu
Two new perf types, perf_kprobe and perf_uprobe, will be added to allow creating [k,u]probe with perf_event_open. These [k,u]probe are associated with the file decriptor created by perf_event_open, thus are easy to clean when the file descriptor is destroyed. kprobe_func and uprobe_path are added

[PATCH v5 5/6] bpf: add option for bpf_load.c to use perf_kprobe

2017-12-06 Thread Song Liu
Function load_and_attach() is updated to be able to create kprobes with either old text based API, or the new perf_event_open API. A global flag use_perf_kprobe is added to select between the two APIs. Signed-off-by: Song Liu Reviewed-by: Josef Bacik --- samples/bpf/bpf_load.c | 61 +++

[PATCH v5 4/6] perf: implement pmu perf_uprobe

2017-12-06 Thread Song Liu
This patch adds perf_uprobe support with similar pattern as previous patch (for kprobe). Two functions, create_local_trace_uprobe() and destroy_local_trace_uprobe(), are created so a uprobe can be created and attached to the file descriptor created by perf_event_open(). Signed-off-by: Song Liu R

Re: [PATCH net-next 0/6] net: sched: sch: introduce extack support

2017-12-06 Thread David Miller
From: Alexander Aring Date: Wed, 6 Dec 2017 17:34:08 -0500 > Hi, > > On Wed, Dec 6, 2017 at 3:40 PM, David Miller wrote: >> From: Alexander Aring >> Date: Wed, 6 Dec 2017 11:08:39 -0500 >> >>> this patch series basically add support for extack in common qdisc handling. >>> Additional it adds

Re: [PATCH net-next 0/6] net: sched: sch: introduce extack support

2017-12-06 Thread Alexander Aring
Hi, On Wed, Dec 6, 2017 at 3:40 PM, David Miller wrote: > From: Alexander Aring > Date: Wed, 6 Dec 2017 11:08:39 -0500 > >> this patch series basically add support for extack in common qdisc handling. >> Additional it adds extack pointer to common qdisc callback handling this >> offers per qdis

[PATCH net-next] bnxt_en: Don't print "Link speed -1 no longer supported" messages.

2017-12-06 Thread Michael Chan
On some dual port NICs, the 2 ports have to be configured with compatible link speeds. Under some conditions, a port's configured speed may no longer be supported. The firmware will send a message to the driver when this happens. Improve this logic that prints out the warning by only printing it

[PATCH net-next v3 1/2] bpf/tracing: allow user space to query prog array on the same tp

2017-12-06 Thread Yonghong Song
Commit e87c6bc3852b ("bpf: permit multiple bpf attachments for a single perf event") added support to attach multiple bpf programs to a single perf event. Although this provides flexibility, users may want to know what other bpf programs attached to the same tp interface. Besides getting visibility

[PATCH net-next v3 2/2] bpf/tracing: add a bpf test for new ioctl query interface

2017-12-06 Thread Yonghong Song
Added a subtest in test_progs. The tracepoint is sched/sched_switch. Multiple bpf programs are attached to this tracepoint and the query interface is exercised. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov --- tools/include/uapi/linux/perf_event.h | 22 + tools/testing

[PATCH net-next v3 0/2] bpf/tracing: allow user space to query prog array on the same tp

2017-12-06 Thread Yonghong Song
Commit e87c6bc3852b ("bpf: permit multiple bpf attachments for a single perf event") added support to attach multiple bpf programs to a single perf event. Given a perf event (kprobe, uprobe, or kernel tracepoint), the perf ioctl interface is used to query bpf programs attached to the same trace eve

RE: [PATCH v2 net-next 7/8] net: dsa: microchip: Prepare PHY for proper advertisement

2017-12-06 Thread Tristram.Ha
> > +static void ksz9477_phy_setup(struct ksz_device *dev, int port, > > + struct phy_device *phy) > > +{ > > + if (port < dev->phy_port_cnt) { > > + /* SUPPORTED_Asym_Pause and SUPPORTED_Pause can be > removed to > > +* disable flow control when rate

Re: [PATCH 1/3] net: dst: add and use dst_flags_t

2017-12-06 Thread David Miller
A proper patch series must have a header posting. The header posting must explain what the patch series is doing, how the patches in the series are related and therefore why they belong together as a group, how it is doing what it is doing, and why it is doing it that way. Thank you.

Re: [PATCH net-next] net: ethernet: ti: cpdma: correct error handling for chan create

2017-12-06 Thread David Miller
From: Ivan Khoronzhuk Date: Wed, 6 Dec 2017 16:54:09 +0200 > @@ -3065,10 +3065,16 @@ static int cpsw_probe(struct platform_device *pdev) > } > > cpsw->txv[0].ch = cpdma_chan_create(cpsw->dma, 0, cpsw_tx_handler, 0); > + if (WARN_ON(IS_ERR(cpsw->txv[0].ch))) { > + de

Re: [PATCH net-next] net: ethernet: ti: cpdma: rate is not changed - correct case

2017-12-06 Thread David Miller
From: Ivan Khoronzhuk Date: Wed, 6 Dec 2017 16:41:18 +0200 > If rate is the same as set it's correct case. > > Signed-off-by: Ivan Khoronzhuk > --- > Based on net-next/master > > drivers/net/ethernet/ti/davinci_cpdma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a

[PATCH 3/3] net: dst: make dst->obsolete 8-bit

2017-12-06 Thread Alexey Dobriyan
All values are small integers. Space savings on x86_64: add/remove: 0/0 grow/shrink: 1/34 up/down: 1/-60 (-59) Function old new delta dst_alloc124 125 +1 xfrm_negative_advice

[PATCH 2/3] net: dst: switch to 8-bit dst->flags

2017-12-06 Thread Alexey Dobriyan
None of the flags is 16-bit currently. Space savings on x86_64: add/remove: 0/0 grow/shrink: 2/16 up/down: 7/-29 (-22) Function old new delta netdev_frame_hook464 470 +6 gre_fill_metadat

[PATCH 1/3] net: dst: add and use dst_flags_t

2017-12-06 Thread Alexey Dobriyan
Typedef dst->flags for checking with sparse. Signed-off-by: Alexey Dobriyan --- drivers/net/vrf.c | 2 +- include/net/dst.h | 23 --- include/net/ip6_route.h | 2 +- net/core/dst.c | 4 ++-- net/ipv6/route.c| 4 ++-- 5 files changed, 18 insert

Re: add "net: fec: Allow reception of frames bigger than 1522 bytes" to stable

2017-12-06 Thread David Miller
From: Uwe Kleine-König Date: Wed, 6 Dec 2017 22:24:50 +0100 > Hello, > > on an 4.9.x kernel using the freescale/fec driver "behind" a switch I > had problems with packet reception. > > Commit fbbeefdd2104 ("net: fec: Allow reception of frames bigger than > 1522 bytes") fixed it for me and so I

add "net: fec: Allow reception of frames bigger than 1522 bytes" to stable

2017-12-06 Thread Uwe Kleine-König
Hello, on an 4.9.x kernel using the freescale/fec driver "behind" a switch I had problems with packet reception. Commit fbbeefdd2104 ("net: fec: Allow reception of frames bigger than 1522 bytes") fixed it for me and so I suggest to queue that one for stable. It can be cherry-picked to 4.9.x witho

Re: [PATCH net-next 2/4] bnxt_en: Use NETIF_F_GRO_HW.

2017-12-06 Thread Michael Chan
On Tue, Dec 5, 2017 at 10:10 AM, Marcelo Ricardo Leitner wrote: > On Mon, Dec 04, 2017 at 04:07:15PM -0800, Michael Chan wrote: >> As already pointed out, GRO_HW is a subset of GRO. Packets that >> cannot be aggregated in hardware (due to hardware resource limitations >> or protocol types that it

Re: [PATCH V2] netlink: Add netns check on taps

2017-12-06 Thread David Miller
From: Kevin Cernekee Date: Wed, 6 Dec 2017 12:12:27 -0800 > Currently, a nlmon link inside a child namespace can observe systemwide > netlink activity. Filter the traffic so that nlmon can only sniff > netlink messages from its own netns. > > Test case: > > vpnns -- bash -c "ip link add n

Re: [PATCH] usbnet: fix alignment for frames with no ethernet header

2017-12-06 Thread David Miller
From: Bjørn Mork Date: Wed, 6 Dec 2017 20:21:24 +0100 > The qmi_wwan minidriver support a 'raw-ip' mode where frames are > received without any ethernet header. This causes alignment issues > because the skbs allocated by usbnet are "IP aligned". > > Fix by allowing minidrivers to disable the a

Re: [PATCH net] tcp: use current time in tcp_rcv_space_adjust()

2017-12-06 Thread David Miller
From: Eric Dumazet Date: Wed, 06 Dec 2017 11:08:19 -0800 > From: Eric Dumazet > > When I switched rcv_rtt_est to high resolution timestamps, I forgot > that tp->tcp_mstamp needed to be refreshed in tcp_rcv_space_adjust() > > Using an old timestamp leads to autotuning lags. > > Fixes: 645f4c6f

Re: pull-request: bpf 2017-12-06

2017-12-06 Thread David Miller
From: Daniel Borkmann Date: Wed, 6 Dec 2017 19:56:25 +0100 > Hi David, > > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Fixing broken uapi for BPF tracing programs for s390 and arm64 >architectures due to pt_regs being in-kernel onl

Re: [PATCH v4 6/6] bpf: add new test test_many_kprobe

2017-12-06 Thread Philippe Ombredanne
Song, On Tue, Dec 5, 2017 at 2:27 AM, Song Liu wrote: > The test compares old text based kprobe API with perf_kprobe. > > Here is a sample output of this test: > > Creating 1000 kprobes with text-based API takes 6.979683 seconds > Cleaning 1000 kprobes with text-based API takes 84.897687 seconds

Re: [PATCH] netlink: Add netns check on taps

2017-12-06 Thread Daniel Borkmann
On 12/06/2017 08:40 PM, David Miller wrote: > From: Kevin Cernekee > Date: Tue, 5 Dec 2017 14:46:22 -0800 > >> Currently, a nlmon link inside a child namespace can observe systemwide >> netlink activity. Filter the traffic so that in a non-init netns, >> nlmon can only sniff netlink messages fr

Re: [PATCH net] adding missing rcu_read_unlock in ipxip6_rcv

2017-12-06 Thread David Miller
From: "Nikita V. Shirokov" Date: Wed, 6 Dec 2017 10:19:33 -0800 > commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") > introduced new exit point in ipxip6_rcv. however rcu_read_unlock is > missing there. this diff is fixing this > > Signed-off-by: Nikita V. Shirokov ...

Re: [PATCH 1/2] net: fec: don't ack masked interrupt events

2017-12-06 Thread David Miller
From: Lucas Stach Date: Wed, 6 Dec 2017 18:24:58 +0100 > The FEC doesn't have a real interrupt status register, that takes > into account the mask status of the IRQ. The driver reads the raw > interrupt event register, which also reports events for masked > IRQs. > > The driver needs to apply t

Re: [PATCH 13/45] drivers: net: dsa: remove duplicate includes

2017-12-06 Thread David Miller
From: Pravin Shedge Date: Wed, 6 Dec 2017 22:28:40 +0530 > These duplicate includes have been found with scripts/checkincludes.pl but > they have been removed manually to avoid removing false positives. > > Signed-off-by: Pravin Shedge Applied.

Re: [PATCH] net: ethernet: arc: fix error handling in emac_rockchip_probe

2017-12-06 Thread David Miller
From: Branislav Radocaj Date: Wed, 6 Dec 2017 18:24:33 +0100 > If clk_set_rate() fails, we should disable clk > before return. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Branislav Radocaj Please eliminate this indentation of your com

Re: [PATCH net] rds: Fix NULL pointer dereference in __rds_rdma_map

2017-12-06 Thread David Miller
From: Håkon Bugge Date: Wed, 6 Dec 2017 17:18:28 +0100 > This is a fix for syzkaller719569, where memory registration was > attempted without any underlying transport being loaded. > > Analysis of the case reveals that it is the setsockopt() RDS_GET_MR > (2) and RDS_GET_MR_FOR_DEST (7) that are

Re: [PATCH net-next 0/6] net: sched: sch: introduce extack support

2017-12-06 Thread David Miller
From: Alexander Aring Date: Wed, 6 Dec 2017 11:08:39 -0500 > this patch series basically add support for extack in common qdisc handling. > Additional it adds extack pointer to common qdisc callback handling this > offers per qdisc implementation to setting the extack message for each > failure

Re: [PATCH] net_sched: use macvlan real dev trans_start in dev_trans_start()

2017-12-06 Thread David Miller
From: Chris Dion Date: Wed, 6 Dec 2017 10:50:28 -0500 > Macvlan devices are similar to vlans and do not update their > own trans_start. In order for arp monitoring to work for a bond device > when the slaves are macvlans, obtain its real device. > > Signed-off-by: Chris Dion Looks good, appli

Re: [PATCH v4 net-next] net/tcp: trace all TCP/IP state transition with tcp_set_state tracepoint

2017-12-06 Thread David Miller
From: Yafang Shao Date: Wed, 6 Dec 2017 15:01:29 + > v3->v4: Do not trace DCCP socket This is not sufficient. Your test will match SCTP stream sockets.

Re: [PATCH net-next] ipvlan: Eliminate duplicated codes with existing function

2017-12-06 Thread David Miller
From: gfree.w...@vip.163.com Date: Wed, 6 Dec 2017 19:04:26 +0800 > From: Gao Feng > > The recv flow of ipvlan l2 mode performs as same as l3 mode for > non-multicast packet, so use the existing func ipvlan_handle_mode_l3 > instead of these duplicated statements in non-multicast case. > > Sign

[PATCH V2] netlink: Add netns check on taps

2017-12-06 Thread Kevin Cernekee
Currently, a nlmon link inside a child namespace can observe systemwide netlink activity. Filter the traffic so that nlmon can only sniff netlink messages from its own netns. Test case: vpnns -- bash -c "ip link add nlmon0 type nlmon; \ ip link set nlmon0 up; \

Re: [PATCH V2] selinux: Add SCTP support

2017-12-06 Thread David Miller
From: Richard Haines Date: Wed, 6 Dec 2017 10:17:36 + > The SELinux SCTP implementation is explained in: > Documentation/security/SELinux-sctp.rst > > Signed-off-by: Richard Haines No general objections from the networking side, so: Acked-by: David S. Miller from me. But if I were you

Re: [patch net-next] mlxsw: spectrum: handle NETIF_F_HW_TC changes correctly

2017-12-06 Thread David Miller
From: Jiri Pirko Date: Wed, 6 Dec 2017 09:41:12 +0100 > From: Jiri Pirko > > Currently, whenever the NETIF_F_HW_TC feature changes, we silently > always allow it, but we actually do not disable the flows in HW > on disable. That breaks user's expectations. So just forbid > the feature disable

Re: [PATCH] xen-netback: Fix logging message with spurious period after newline

2017-12-06 Thread David Miller
From: Joe Perches Date: Tue, 5 Dec 2017 22:40:25 -0800 > Using a period after a newline causes bad output. > > Signed-off-by: Joe Perches Applied.

Re: [PATCH net-next] tun: avoid unnecessary READ_ONCE in tun_net_xmit

2017-12-06 Thread David Miller
From: Willem de Bruijn Date: Tue, 5 Dec 2017 22:11:17 -0500 > From: Willem de Bruijn > > The statement no longer serves a purpose. > > Commit fa35864e0bb7 ("tuntap: Fix for a race in accessing numqueues") > added the ACCESS_ONCE to avoid a race condition with skb_queue_len. > > Commit 436acc

Re: [PATCH/RFC v2] leds: trigger: Introduce a NETDEV trigger

2017-12-06 Thread Ben Whitten
Hi Jacek, On 5 December 2017 at 20:38, Jacek Anaszewski wrote: > Hi Ben, > > On 12/05/2017 12:19 PM, Ben Whitten wrote: >> From: Ben Whitten >> >> The patch was converted to led_blink_oneshot, in doing so we find that the >> behaviour has changed. As I dont want to break 'userspace' led behaviou

Re: [PATCH] ARM64: dts: meson-axg: add ethernet mac controller

2017-12-06 Thread Kevin Hilman
Yixun Lan writes: > Add DT info for the stmmac ethernet MAC which found in > the Amlogic's Meson-AXG SoC, also describe the ethernet > pinctrl & clock information here. > > This is tested in the S400 dev board which use a RTL8211F PHY, > and the pins connect to the 'eth_rgmii_y_pins' group. > > S

Re: [PATCH net-next] rds: debug: fix null check on static array

2017-12-06 Thread David Miller
From: Prashant Bhole Date: Wed, 6 Dec 2017 10:47:04 +0900 > t_name cannot be NULL since it is an array field of a struct. > Replacing null check on static array with string length check using > strnlen() > > Signed-off-by: Prashant Bhole Applied, thank you.

  1   2   3   >