Re: [RFC] switchdev: clarify ndo_get_phys_port_name() formats

2017-07-25 Thread Jiri Pirko
Tue, Jul 25, 2017 at 07:13:44AM CEST, jakub.kicin...@netronome.com wrote: >We are still in position where we can suggest uniform naming >convention for ndo_get_phys_port_name(). switchdev.txt file >already contained a suggestion of how to name external ports. >Since the use of switchdev for

Re: [PATCH v2 1/3] ptp: introduce ptp auxiliary worker

2017-07-25 Thread Richard Cochran
On Wed, Jul 26, 2017 at 06:24:39AM +0200, Richard Cochran wrote: > Thanks for coding this up. I'd like to get some broader review. On > the next round, please include lkml, John Stultz, and Thomas Gleixner. I just noticed that you already have lkml. Thanks, Richard

Re: [PATCH v3] net: ethernet: nb8800: Handle all 4 RGMII modes identically

2017-07-25 Thread David Miller
From: Marc Gonzalez Date: Tue, 25 Jul 2017 14:35:03 +0200 > Before commit bf8f6952a233 ("Add blurb about RGMII") it was unclear > whose responsibility it was to insert the required clock skew, and > in hindsight, some PHY drivers got it wrong. The solution forward

Re: [PATCH net 1/1] Revert "netvsc: optimize calculation of number of slots"

2017-07-25 Thread David Miller
From: Stephen Hemminger Date: Mon, 24 Jul 2017 21:03:19 -0700 > The logic for computing page buffer scatter does not take into > account the impact of compound pages. Therefore the optimization > to compute number of slots was incorrect and could cause stack >

Re: [PATCH v2 1/3] ptp: introduce ptp auxiliary worker

2017-07-25 Thread Richard Cochran
Thanks for coding this up. I'd like to get some broader review. On the next round, please include lkml, John Stultz, and Thomas Gleixner. On Tue, Jul 25, 2017 at 03:24:18PM -0500, Grygorii Strashko wrote: > @@ -217,6 +231,19 @@ struct ptp_clock *ptp_clock_register(struct > ptp_clock_info

Re: [PATCH net-next] virtio-net: mark PM functions as __maybe_unused

2017-07-25 Thread David Miller
From: Arnd Bergmann Date: Tue, 25 Jul 2017 17:35:50 +0200 > After removing the reset function, the freeze and restore functions > are now unused when CONFIG_PM_SLEEP is disabled: > > drivers/net/virtio_net.c:1881:12: error: 'virtnet_restore_up' defined but not > used

Re: [PATCH] ftgmac100: return error in ftgmac100_alloc_rx_buf

2017-07-25 Thread David Miller
From: Joel Stanley Date: Tue, 25 Jul 2017 10:19:01 +0930 > The error paths set err, but it's not returned. > > I wondered if we should fix all of the callers to check the returned > value, but Ben explains why the code is this way: > >> Most call sites ignore it on purpose.

Re: [PATCH v2 net-next 2/2] liquidio: cleanup: removed cryptic and misleading macro

2017-07-25 Thread David Miller
From: Felix Manlunas Date: Mon, 24 Jul 2017 17:17:27 -0700 > From: Rick Farrington > > Signed-off-by: Rick Farrington > Signed-off-by: Felix Manlunas > --- >

Re: [PATCH net-next] virtio-net: mark PM functions as __maybe_unused

2017-07-25 Thread Jason Wang
On 2017年07月25日 23:35, Arnd Bergmann wrote: After removing the reset function, the freeze and restore functions are now unused when CONFIG_PM_SLEEP is disabled: drivers/net/virtio_net.c:1881:12: error: 'virtnet_restore_up' defined but not used [-Werror=unused-function] static int

Re: [PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set

2017-07-25 Thread Jason Wang
On 2017年07月25日 05:29, Michael S. Tsirkin wrote: On Wed, Jul 19, 2017 at 04:54:49PM +0800, Jason Wang wrote: Current XDP implementation wants guest offloads feature to be disabled on device. This is inconvenient and means guest can't benefit from offloads if XDP is not used. This patch tries

Re: [RFC] switchdev: clarify ndo_get_phys_port_name() formats

2017-07-25 Thread Jakub Kicinski
On Tue, 25 Jul 2017 21:48:15 -0400, Andy Gospodarek wrote: > On Tue, Jul 25, 2017 at 03:26:47PM -0700, Jakub Kicinski wrote: > > On Tue, 25 Jul 2017 11:22:41 -0400, Andy Gospodarek wrote: > > > On Mon, Jul 24, 2017 at 10:13:44PM -0700, Jakub Kicinski wrote: > > > > We are still in position

[PATCH iproute2] geneve: support for modifying geneve device

2017-07-25 Thread Girish Moodalbail
Ability to change geneve device attributes was added to kernel through commit 5b861f6baa3a ("geneve: add rtnl changelink support"), however one cannot do the same through ip-link(8) command. Changing the allowed geneve device attributes using 'ip link set type geneve id ' currently fails with

Re: [PATCH net] net: dsa: Initialize ds->cpu_port_mask earlier

2017-07-25 Thread Sean Wang
Hi, Florian the solution is better and also can fix the problem I originally reported. Thank for your immediate help :-) Sean On Mon, 2017-07-24 at 10:49 -0700, Florian Fainelli wrote: > The mt7530 driver has its dsa_switch_ops::get_tag_protocol function > check ds->cpu_port_mask to issue a

RE: [PATCH net-next] TLP: Don't reschedule PTO when there's one outstanding TLP retransmission.

2017-07-25 Thread maowenan
> -Original Message- > From: Neal Cardwell [mailto:ncardw...@google.com] > Sent: Tuesday, July 25, 2017 9:30 PM > To: maowenan > Cc: Netdev; David Miller; weiyongjun (A); Chenweilong; Yuchung Cheng; > Nandita Dukkipati > Subject: Re: [PATCH net-next] TLP: Don't reschedule PTO when

Re: [RFC] switchdev: clarify ndo_get_phys_port_name() formats

2017-07-25 Thread Andy Gospodarek
On Tue, Jul 25, 2017 at 03:26:47PM -0700, Jakub Kicinski wrote: > On Tue, 25 Jul 2017 11:22:41 -0400, Andy Gospodarek wrote: > > On Mon, Jul 24, 2017 at 10:13:44PM -0700, Jakub Kicinski wrote: > > > We are still in position where we can suggest uniform naming > > > convention for

RE: [PATCH net-next] TLP: Don't reschedule PTO when there's one outstanding TLP retransmission.

2017-07-25 Thread maowenan
> -Original Message- > From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] > Sent: Tuesday, July 25, 2017 5:55 PM > To: maowenan; netdev@vger.kernel.org; da...@davemloft.net; weiyongjun > (A); Chenweilong > Subject: Re: [PATCH net-next] TLP: Don't reschedule PTO when

Re: [PATCH net-next 10/18] net: mvpp2: use the GoP interrupt for link status changes

2017-07-25 Thread Antoine Tenart
Hi Thomas, On Tue, Jul 25, 2017 at 03:17:48PM +0200, Thomas Petazzoni wrote: > On Mon, 24 Jul 2017 15:48:40 +0200, Antoine Tenart wrote: > > + > > + port->link_irq = of_irq_get_byname(port_node, "link"); > > + if (port->link_irq == -EPROBE_DEFER) { > > + err

[net-next v4 1/5] ixgbe: Ensure MAC filter was added before setting MACVLAN

2017-07-25 Thread Jeff Kirsher
From: Tony Nguyen This patch adds a check to ensure that adding the MAC filter was successful before setting the MACVLAN. If it was unsuccessful, propagate the error. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers

[net-next v4 4/5] ixgbe: Do not support flow control autonegotiation for X553

2017-07-25 Thread Jeff Kirsher
From: Tony Nguyen Flow control autonegotiation is not supported for fiber on X553. Add device ID checks in ixgbe_device_supports_autoneg_fc() to return the appropriate value. Signed-off-by: Tony Nguyen Signed-off-by: Emil Tantilov

[net-next v4 3/5] ixgbe: Update NW_MNG_IF_SEL support for X553

2017-07-25 Thread Jeff Kirsher
From: Tony Nguyen The MAC register NW_MNG_IF_SEL fields have been redefined for X553. These changes impact the iXFI driver code flow. Since iXFI is only supported in X552, add MAC checks for iXFI flows. Signed-off-by: Tony Nguyen

[net-next v4 2/5] ixgbe: Enable LASI interrupts for X552 devices

2017-07-25 Thread Jeff Kirsher
From: Tony Nguyen Enable LASI interrupts on X552 devices in order to receive notifications of link configurations of the external PHY and support the configuration of the internal iXFI link since iXFI does not support auto-negotiation. This is not required for X553

[net-next v4 5/5] ixgbe: Disable flow control for XFI

2017-07-25 Thread Jeff Kirsher
From: Tony Nguyen Flow control autonegotiation is not supported for XFI. Make sure that ixgbe_device_supports_autoneg_fc() returns false and hw->fc.disable_fc_autoneg is set to true to avoid running the fc_autoneg function for that device. Signed-off-by: Tony Nguyen

[net-next v4 0/5][pull request] 10GbE Intel Wired LAN Driver Updates 2017-07-25

2017-07-25 Thread Jeff Kirsher
This series contains updates to ixgbe only. Tony provides all of the changes in the series, starting with adding a check to ensure that adding a MAC filter was successful, before setting the MACVLAN. In order to receive notifications of link configurations of the external PHY and support the

Re: [PATCH net] bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()

2017-07-25 Thread Daniel Borkmann
On 07/26/2017 01:15 AM, Jakub Kicinski wrote: On Wed, 26 Jul 2017 00:59:49 +0200, Daniel Borkmann wrote: @@ -418,6 +420,8 @@ static void test_bpf_obj_id(void) nr_id_found++; err = bpf_obj_get_info_by_fd(prog_fd, _info, _len); +

Re: [PATCH net] bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()

2017-07-25 Thread Jakub Kicinski
On Tue, 25 Jul 2017 16:15:47 -0700, Jakub Kicinski wrote: > On Wed, 26 Jul 2017 00:59:49 +0200, Daniel Borkmann wrote: > > > @@ -418,6 +420,8 @@ static void test_bpf_obj_id(void) > > > nr_id_found++; > > > > > > err = bpf_obj_get_info_by_fd(prog_fd, _info, > >

Re: [PATCH net] bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()

2017-07-25 Thread Jakub Kicinski
On Wed, 26 Jul 2017 00:59:49 +0200, Daniel Borkmann wrote: > > @@ -418,6 +420,8 @@ static void test_bpf_obj_id(void) > > nr_id_found++; > > > > err = bpf_obj_get_info_by_fd(prog_fd, _info, _len); > > + prog_infos[i].jited_prog_insns = 0; > > +

Re: [PATCH net] bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()

2017-07-25 Thread Daniel Borkmann
On 07/26/2017 12:16 AM, Jakub Kicinski wrote: The buffer passed to bpf_obj_get_info_by_fd() should be initialized to zeros. Kernel will enforce that to guarantee we can safely extend info structures in the future. Making the bpf_obj_get_info_by_fd() call in libbpf perform the zeroing is

Re: [PATCH net-next 10/10] bnxt_en: add support for port_attr_get and and get_phys_port_name

2017-07-25 Thread Jakub Kicinski
On Tue, 25 Jul 2017 15:25:19 +0530, Sathya Perla wrote: > >> Suggested naming convention is "swXpYsZ", where X is the switch name or > >> ID, Y > >> is the port name or ID, and Z is the sub-port name or ID. For example, > >> sw1p1s0 > >> would be sub-port 0 on port 1 on switch 1. > > > > So

Re: [RFC] switchdev: clarify ndo_get_phys_port_name() formats

2017-07-25 Thread Jakub Kicinski
On Tue, 25 Jul 2017 11:22:41 -0400, Andy Gospodarek wrote: > On Mon, Jul 24, 2017 at 10:13:44PM -0700, Jakub Kicinski wrote: > > We are still in position where we can suggest uniform naming > > convention for ndo_get_phys_port_name(). switchdev.txt file > > already contained a suggestion of how

[PATCH net] bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()

2017-07-25 Thread Jakub Kicinski
The buffer passed to bpf_obj_get_info_by_fd() should be initialized to zeros. Kernel will enforce that to guarantee we can safely extend info structures in the future. Making the bpf_obj_get_info_by_fd() call in libbpf perform the zeroing is problematic, however, since some members of the info

Re: [Patch net] bonding: commit link status change after propose

2017-07-25 Thread महेश बंडेवार
On Tue, Jul 25, 2017 at 9:44 AM, Cong Wang wrote: > Commit de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring") > moves link status commitment into bond_mii_monitor(), but it still relies > on the return value of bond_miimon_inspect() as the hint. We

Re: [PATCH] qtfnmac: Tidy up DMA mask setting

2017-07-25 Thread Sergey Matyukevich
> As the only caller of dma_supported() outside of DMA API internals, the > qtfnmac driver stands out and invites scrutiny. Thankfully, it's not > being used for evil, but it is entirely redundant, since it open-codes a > check that the DMA mask setting functions are going to perform anyway. > In

Re: [PATCH V2 net] net: fix tcp reset packet flowlabel for ipv6

2017-07-25 Thread Shaohua Li
On Mon, Jul 24, 2017 at 01:34:55PM -0700, David Miller wrote: > From: Shaohua Li > Date: Tue, 18 Jul 2017 12:03:37 -0700 > > > + /* Since this is being sent on the wire obfuscate hash a bit > > +* to minimize possbility that any useful information to an > > +* attacker

Re: [PATCH V2 net] net: fix tcp reset packet flowlabel for ipv6

2017-07-25 Thread Shaohua Li
On Mon, Jul 24, 2017 at 04:12:53PM -0700, Cong Wang wrote: > On Mon, Jul 24, 2017 at 1:34 PM, David Miller wrote: > > From: Shaohua Li > > Date: Tue, 18 Jul 2017 12:03:37 -0700 > > > >> + /* Since this is being sent on the wire obfuscate hash a bit > >>

Re: [PATCH net-next 3/5] netvsc: optimize receive completions

2017-07-25 Thread Stephen Hemminger
On Tue, 25 Jul 2017 13:04:20 -0700 Stephen Hemminger wrote: > Optimize how receive completion ring are managed. >* Allocate only as many slots as needed for all buffers from host >* Allocate before setting up sub channel for better error detection >* Don't

[PATCH v2 1/3] ptp: introduce ptp auxiliary worker

2017-07-25 Thread Grygorii Strashko
Many PTP drivers required to perform some asynchronous or periodic work, like periodically handling PHC counter overflow or handle delayed timestamp for RX/TX network packets. In most of the cases, such work is implemented using workqueues. Unfortunately, Kernel workqueues might introduce

[PATCH v2 3/3] net: ethernet: ti: cpts: fix tx timestamping timeout

2017-07-25 Thread Grygorii Strashko
With the low speed Ethernet connection CPDMA notification about packet processing can be received before CPTS TX timestamp event, which is set when packet actually left CPSW while cpdma notification is sent when packet pushed in CPSW fifo. As result, when connection is slow and CPU is fast enough

[PATCH v2 2/3] net: ethernet: ti: cpts: convert to use ptp auxiliary worker

2017-07-25 Thread Grygorii Strashko
There could be significant delay in CPTS work schedule under high system load and on -RT which could cause CPTS misbehavior due to internal counter overflow. Usage of own kthread_worker allows to avoid such kind of issues and makes it possible to tune priority of CPTS kthread_worker thread on -RT.

[PATCH v2 0/3] net: ethernet: ti: cpts: fix tx timestamping timeout

2017-07-25 Thread Grygorii Strashko
Patch3 - With the low Ethernet connection speed cpdma notification about packet processing can be received before CPTS TX timestamp event, which is set when packet actually left CPSW while cpdma notification is sent when packet pushed in CPSW fifo. As result, when connection is slow and CPU is

[PATCH net-next 2/5] netvsc: fix warnings reported by lockdep

2017-07-25 Thread Stephen Hemminger
This includes a bunch of fixups for issues reported by sparse and lockdep. * ethtool routines can assume RTNL * send is done with RCU lock (and BH disable) Most of the changes involve passing internal device struct (netvsc) as parameter, so that code called in both initialization and

[PATCH net-next 3/5] netvsc: optimize receive completions

2017-07-25 Thread Stephen Hemminger
Optimize how receive completion ring are managed. * Allocate only as many slots as needed for all buffers from host * Allocate before setting up sub channel for better error detection * Don't need to keep copy of initial receive section message * Only needt keep the transaction id,

[PATCH net-next 1/5] netvsc: fix return value for set_channels

2017-07-25 Thread Stephen Hemminger
The error and normal case got swapped. Reported-by: Dan Carpenter Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc_drv.c

[PATCH net-next 5/5] netvsc: allow smaller send/recv buffer size

2017-07-25 Thread Stephen Hemminger
The default value of send and receive buffer area for host DMA is much larger than it needs to be. Experimentation shows that 4M receive and 1M send is sufficient. Make the size a module parameter so that it can be adjusted as needed for testing or special needs. Signed-off-by: Stephen Hemminger

[PATCH net-next 0/5] netvsc: fixes and performance related changes

2017-07-25 Thread Stephen Hemminger
The first two are more fixes to problems introduced in latest net-next changes. The rest are changes to improve performance and reduce memory footprint. The driver used to allocate large amounts of memory (33M) per interface, this reduces that down to about 7M. Stephen Hemminger (5): netvsc:

[PATCH net-next 4/5] netvsc: signal host if receive ring is emptied

2017-07-25 Thread Stephen Hemminger
Latency improvement related to NAPI conversion. If all packets are processed from receive ring then need to signal host. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface

2017-07-25 Thread Francois Romieu
Aviad Krawczyk : [...] > module_pci_driver - is not used in other drivers in the same segments, it > is necessary ? /me checks... Ok, there seems to be some overenthusiastic copy'paste. See drivers/net/ethernet/intel/ixgb/ixgb_main.c: [...] /** * ixgb_init_module -

Re: [PATCH net-next 0/3] bnxt_en: Fix kbuild errors and rename phys_port_name.

2017-07-25 Thread David Miller
From: Michael Chan Date: Tue, 25 Jul 2017 13:28:38 -0400 > Fix 2 more kbuild errors (the first one already fixed by DaveM), and rename > the physical port name. Series applied, thanks for working to clear this all up.

Re: [PATCH net-next v2] bpf: install libbpf headers on 'make install'

2017-07-25 Thread Daniel Borkmann
On 07/25/2017 08:17 PM, Jakub Kicinski wrote: Add a new target to install the bpf.h header to $(prefix)/include/bpf/ directory. This is necessary to build standalone applications using libbpf, without the need to clone the kernel sources and point to them. Signed-off-by: Jakub Kicinski

[net:master 16/16] net//ipv4/udp.c:1789:47: error: 'struct sk_buff' has no member named 'sp'; did you mean 'sk'?

2017-07-25 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master head: dce4551cb2adb1ac9a30f8ab5299d614392b3cff commit: dce4551cb2adb1ac9a30f8ab5299d614392b3cff [16/16] udp: preserve head state for IP_CMSG_PASSSEC config: arm-at91_dt_defconfig (attached as .config) compiler:

Re: [PATCH v2 net-next 1/5] drop_monitor: import netnamespace framework

2017-07-25 Thread David Miller
Every patch series must start with an appropriate "[PATCH ... 0/N] ..." header posting explaining what the patch series is doing, how it is doing it, and why it is doing it that way. Thank you.

Re: [PATCH] lib: test_rhashtable: Fix KASAN warning

2017-07-25 Thread David Miller
From: Phil Sutter Date: Tue, 25 Jul 2017 13:36:21 +0200 > I forgot one spot when introducing struct test_obj_val. > > Fixes: e859afe1ee0c5 ("lib: test_rhashtable: fix for large entry counts") > Reported by: kernel test robot > > Signed-off-by: Phil Sutter

Re: [PATCH] net: phy: Remove trailing semicolon in macro definition

2017-07-25 Thread David Miller
From: Marc Gonzalez Date: Tue, 25 Jul 2017 11:08:15 +0200 > Commit e5a03bfd873c2 ("phy: Add an mdio_device structure") > introduced a spurious trailing semicolon. Remove it. > > Signed-off-by: Marc Gonzalez Good catch, applied,

Re: [PATCH] net: phy: Log only PHY state transitions

2017-07-25 Thread David Miller
From: Marc Gonzalez Date: Tue, 25 Jul 2017 11:31:46 +0200 > In the current code, old and new PHY states are always logged. > From now on, log only PHY state transitions. > > Signed-off-by: Marc Gonzalez > --- >

Re: [PATCH net-next 0/6] network related warning fixes

2017-07-25 Thread David Miller
From: Stephen Hemminger Date: Mon, 24 Jul 2017 10:25:17 -0700 > Various fixes for warnings in network code and drivers. Series applied, thanks Stephen.

Re: [PATCH net-next] nfp: set config bit (ifup/ifdown) on netdev open/close

2017-07-25 Thread David Miller
From: Jakub Kicinski Date: Tue, 25 Jul 2017 00:51:08 -0700 > From: Dirk van der Merwe > > When a netdev (PF netdev or representor) is opened or closed, set the > physical port config bit appropriately - which powers UP/DOWN the PHY

Re: [PATCH] drivers/net: Fix ptr_ret.cocci warnings.

2017-07-25 Thread David Miller
aFrom: Tonghao Zhang Date: Tue, 25 Jul 2017 00:00:26 -0700 > we can use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > 1. drivers/net/appletalk/ipddp.c > 2. drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c > > Generated by:

Re: [PATCH net-next v2 01/10] net: dsa: lan9303: Fixed MDIO interface

2017-07-25 Thread Vivien Didelot
Hi Egil, Egil Hjelmeland writes: > Fixes after testing on actual HW: > > - lan9303_mdio_write()/_read() must multiply register number > by 4 to get offset > > - Indirect access (PMI) to phy register only work in I2C mode. In > MDIO mode phy registers must be

Re: [PATCH iproute2 master v2 0/2] Minor BPF updates

2017-07-25 Thread Stephen Hemminger
On Sun, 23 Jul 2017 01:22:17 +0200 Daniel Borkmann wrote: > Two minor updates to the BPF code, first one makes use of the > recently exposed owner_jited in fdinfo to report whether a > load issue related to tail calls occured, and second one fixes > up custom mount of bpf

Re: [PATCH] ip route: replace exits with returns

2017-07-25 Thread Stephen Hemminger
On Sun, 23 Jul 2017 00:42:02 +0200 e...@bouttier.eu wrote: > From: Élie Bouttier > > This patch replaces exits with returns in ip route > commands. > > Allows to continue when invoked with ip -batch. > > Signed-off-by: Élie Bouttier Sure applied, but any

Fw: [Bug 196469] New: UDPv4+UDPv6 receive silently fails after heavy UDP load

2017-07-25 Thread Stephen Hemminger
Begin forwarded message: Date: Mon, 24 Jul 2017 20:52:01 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 196469] New: UDPv4+UDPv6 receive silently fails after heavy UDP load https://bugzilla.kernel.org/show_bug.cgi?id=196469 Bug ID:

[PATCH] netpoll: Fix device name check in netpoll_setup()

2017-07-25 Thread Matthias Kaehlcke
Apparently netpoll_setup() assumes that netpoll.dev_name is a pointer when checking if the device name is set: if (np->dev_name) { ... However the field is a character array, therefore the condition always yields true. Check instead whether the first byte of the array has a non-zero value.

Re: [PATCH net-next] bpf: add helper capable of reading out instructions

2017-07-25 Thread Daniel Borkmann
On 07/25/2017 08:20 PM, Jakub Kicinski wrote: On Tue, 25 Jul 2017 18:40:23 +0200, Daniel Borkmann wrote: [ +Martin ] Sorry, I thought I CCed Martin. On 07/24/2017 11:22 PM, Jakub Kicinski wrote: To read translated and jited instructions from the kernel, one has to set certain pointers of

Re: [PATCH net-next] bpf: add helper capable of reading out instructions

2017-07-25 Thread Jakub Kicinski
On Tue, 25 Jul 2017 18:40:23 +0200, Daniel Borkmann wrote: > [ +Martin ] Sorry, I thought I CCed Martin. > On 07/24/2017 11:22 PM, Jakub Kicinski wrote: > > To read translated and jited instructions from the kernel, > > one has to set certain pointers of struct bpf_prog_info to > > pre-allocated

[PATCH net-next v2] bpf: install libbpf headers on 'make install'

2017-07-25 Thread Jakub Kicinski
Add a new target to install the bpf.h header to $(prefix)/include/bpf/ directory. This is necessary to build standalone applications using libbpf, without the need to clone the kernel sources and point to them. Signed-off-by: Jakub Kicinski --- v2: - make the

Re: [PATCH v2 2/4] can: fixed-transceiver: Add documentation for CAN fixed transceiver bindings

2017-07-25 Thread Franklin S Cooper Jr
On 07/25/2017 11:32 AM, Oliver Hartkopp wrote: > >> + max-data-speed:a positive non 0 value that determines the max >> data rate >> +that can be used in CAN-FD mode. A value of -1 implies >> +CAN-FD is not supported by the transceiver. >> + >> +Examples: > > (..) >

[PATCH net-next v2 06/10] net: dsa: lan9303: added sysfs node swe_bcst_throt

2017-07-25 Thread Egil Hjelmeland
Allowing per-port access to Switch Engine Broadcast Throttling Register Also added lan9303_write_switch_reg_mask() Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 83 ++ 1 file changed, 83 insertions(+)

[PATCH net-next v2 02/10] net: dsa: lan9303: Do not disable/enable switch fabric port 0 at startup

2017-07-25 Thread Egil Hjelmeland
For some mysterious reason enable switch fabric port 0 TX fails to work, when the TX has previous been disabled. Resolved by not disable/enable switch fabric port 0 at startup. Port 1 and 2 are still disabled in early init. Signed-off-by: Egil Hjelmeland ---

Re: Problem with PHY state machine when using interrupts

2017-07-25 Thread Florian Fainelli
On July 25, 2017 4:41:32 AM PDT, Mason wrote: >On 25/07/2017 12:51, Mason wrote: > >> Moving the call to phy_stop() down after all the MAC tear down >> avoids the hang. >> >> As far as I understand, when we are shutting everything down, >> we don't need the phy_state_machine

Re: [PATCH net] ipv6: no need to return rt->dst.error if it is not null entry.

2017-07-25 Thread Cong Wang
On Mon, Jul 24, 2017 at 5:08 PM, Hangbin Liu wrote: > But what we want in inet6_rtm_getroute() and rt6_dump_route() is to > get/dump the route info. So we should get the info even it's unreachable or > prohibit. If you want to dump prohibit/blackhole entry, then you have

[PATCH net-next 3/3] bnxt_en: fix switchdev port naming for external-port-rep and vf-reps

2017-07-25 Thread Michael Chan
From: Sathya Perla Fix the phys_port_name for the external physical port to be in "pA" format and that of VF-rep to be in "pCvfD" format as suggested by Jakub Kicinski. Fixes: c124a62ff2dd ("bnxt_en: add support for port_attr_get and get_phys_port_name")

[PATCH net-next 2/3] bnxt_en: use SWITCHDEV_SET_OPS() for setting vf_rep_switchdev_ops

2017-07-25 Thread Michael Chan
From: Sathya Perla This fixes the build error: ‘struct net_device’ has no member named ‘switchdev_ops’ Reported-by: kbuild test robot Fixes: c124a62ff2dd ("bnxt_en: add support for port_attr_get and and get_phys_port_name") Signed-off-by: Sathya

[PATCH net-next 0/3] bnxt_en: Fix kbuild errors and rename phys_port_name.

2017-07-25 Thread Michael Chan
Fix 2 more kbuild errors (the first one already fixed by DaveM), and rename the physical port name. Sathya Perla (3): bnxt_en: include bnxt_vfr.c code under CONFIG_BNXT_SRIOV switch bnxt_en: use SWITCHDEV_SET_OPS() for setting vf_rep_switchdev_ops bnxt_en: fix switchdev port naming for

[PATCH net-next 1/3] bnxt_en: include bnxt_vfr.c code under CONFIG_BNXT_SRIOV switch

2017-07-25 Thread Michael Chan
From: Sathya Perla And define empty functions in bnxt_vfr.h when CONFIG_BNXT_SRIOV is not defined. This fixes build error when CONFIG_BNXT_SRIOV is switched off: >> drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c:165:16: error: 'struct >> bnxt' has no member named

[PATCH net-next v2 05/10] net: dsa: added dsa_net_device_to_dsa_port()

2017-07-25 Thread Egil Hjelmeland
Allowing dsa drivers to attach sysfs nodes. Signed-off-by: Egil Hjelmeland --- include/net/dsa.h | 1 + net/dsa/slave.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index 88da272d20d0..a71c0a2401ee 100644

[PATCH net-next v2 08/10] net: dsa: lan9303: Added ALR/fdb/mdb handling

2017-07-25 Thread Egil Hjelmeland
Added functions for accessing / managing the lan9303 ALR (Address Logic Resolution). Implemented DSA methods: set_addr, port_fast_age, port_fdb_prepare, port_fdb_add, port_fdb_del, port_fdb_dump, port_mdb_prepare, port_mdb_add and port_mdb_del. Since the lan9303 do not offer reading specific ALR

[PATCH net-next v2 09/10] net: dsa: lan9303: Added Documentation/networking/dsa/lan9303.txt

2017-07-25 Thread Egil Hjelmeland
Signed-off-by: Egil Hjelmeland --- Documentation/networking/dsa/lan9303.txt | 63 1 file changed, 63 insertions(+) create mode 100644 Documentation/networking/dsa/lan9303.txt diff --git a/Documentation/networking/dsa/lan9303.txt

[PATCH net-next v2 10/10] net: dsa: lan9303: Only allocate 3 ports

2017-07-25 Thread Egil Hjelmeland
Saving 2628 bytes. Signed-off-by: Egil Hjelmeland Reviewed-by: Florian Fainelli --- drivers/net/dsa/lan9303-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/lan9303-core.c

Re: [PATCH net] udp: preserve head state for IP_CMSG_PASSSEC

2017-07-25 Thread David Miller
From: Paolo Abeni Date: Tue, 25 Jul 2017 17:57:47 +0200 > Paul Moore reported a SELinux/IP_PASSSEC regression > caused by missing skb->sp at recvmsg() time. We need to > preserve the skb head state to process the IP_CMSG_PASSSEC > cmsg. > > With this commit we avoid releasing

Re: ARM GLX Khadas VIM Pro - Ethernet detected as only 10Mbps and stalled after some traffic

2017-07-25 Thread crow
Hi, Today I did test on ArchLinuxArm the Kernel v4.13-rc2. On downloading the linux git source the network will eventually get stalled. Here are the information Over SSH (network works). [root@alarm ~]# uname -a Linux alarm 4.13.0-rc2-1-ARCH #1 SMP Mon Jul 24 20:02:50 MDT 2017 aarch64 GNU/Linux

Re: [PATCH net-next] bpf: install libbpf headers on 'make install'

2017-07-25 Thread Daniel Borkmann
On 07/24/2017 11:22 PM, Jakub Kicinski wrote: Install the bpf.h header to $(prefix)/include/bpf/ directory. This is necessary to build standalone applications using libbpf, without the need to clone the kernel sources and point to them. Signed-off-by: Jakub Kicinski

[PATCH net-next v2 07/10] net: dsa: lan9303: Added basic offloading of unicast traffic

2017-07-25 Thread Egil Hjelmeland
When both user ports are joined to the same bridge, the normal HW MAC learning is enabled. This means that unicast traffic is forwarded in HW. Support for STP is also added. If one of the user ports leave the bridge, the ports goes back to the initial separated operation. Added brigde methods

[Patch net] bonding: commit link status change after propose

2017-07-25 Thread Cong Wang
Commit de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring") moves link status commitment into bond_mii_monitor(), but it still relies on the return value of bond_miimon_inspect() as the hint. We need to return non-zero as long as we propose a link status change. Fixes:

[PATCH net-next v2 03/10] net: dsa: lan9303: Refactor lan9303_enable_packet_processing()

2017-07-25 Thread Egil Hjelmeland
lan9303_enable_packet_processing, lan9303_disable_packet_processing() Pass port number (0,1,2) as parameter instead of port offset. Simplify accordingly. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 66 --

[PATCH net-next v2 00/10] net: dsa: lan9303: unicast offload, fdb,mdb,STP

2017-07-25 Thread Egil Hjelmeland
This series extends the LAN9303 3 port switch DSA driver. Highlights: - Make the MDIO interface work - Bridging: Unicast offload - Bridging: Added fdb/mdb handling - Bridging: STP support - Documentation Changes v1 -> v2: - sorted out emailing issues, threading and date. And sent from

[PATCH net-next v2 04/10] net: dsa: lan9303: Added adjust_link() method

2017-07-25 Thread Egil Hjelmeland
This makes the driver react to device tree "fixed-link" declaration on CPU port. - turn off autonegotiation - force speed 10 or 100 mb/s - force duplex mode Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 33 + 1

Re: [PATCH net-next] bpf: add helper capable of reading out instructions

2017-07-25 Thread Daniel Borkmann
[ +Martin ] On 07/24/2017 11:22 PM, Jakub Kicinski wrote: To read translated and jited instructions from the kernel, one has to set certain pointers of struct bpf_prog_info to pre-allocated user buffers. Unfortunately, the existing bpf_obj_get_info_by_fd() helper zeros struct bpf_prog_info

[PATCH net-next v2 01/10] net: dsa: lan9303: Fixed MDIO interface

2017-07-25 Thread Egil Hjelmeland
Fixes after testing on actual HW: - lan9303_mdio_write()/_read() must multiply register number by 4 to get offset - Indirect access (PMI) to phy register only work in I2C mode. In MDIO mode phy registers must be accessed directly. Introduced struct lan9303_phy_ops to handle the two modes.

Re: [PATCH net-next 2/2] bnxt_en: define sriov_lock unconditionally

2017-07-25 Thread Michael Chan
On Tue, Jul 25, 2017 at 8:29 AM, Arnd Bergmann wrote: > The sriov_lock is used to serialize the sriov code with the vfr code. > However, when SRIOV is disabled, the lock is not there at all, leading > to a build error: > > drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c: In function

Re: [PATCH net-next 1/3] bnxt_en: include bnxt_vfr.c code under CONFIG_BNXT_SRIOV switch

2017-07-25 Thread Michael Chan
On Tue, Jul 25, 2017 at 3:49 AM, Sathya Perla wrote: > This fixes build error when CONFIG_BNXT_SRIOV is switched off: >>> drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c:165:16: error: 'struct >>> bnxt' has no member named 'sriov_lock' > > Reported-by: kbuild test robot

Re: [PATCH v2 2/4] can: fixed-transceiver: Add documentation for CAN fixed transceiver bindings

2017-07-25 Thread Oliver Hartkopp
+ max-data-speed: a positive non 0 value that determines the max data rate + that can be used in CAN-FD mode. A value of -1 implies + CAN-FD is not supported by the transceiver. + +Examples: (..) + fixed-transceiver { +

[PATCH net] udp: preserve head state for IP_CMSG_PASSSEC

2017-07-25 Thread Paolo Abeni
Paul Moore reported a SELinux/IP_PASSSEC regression caused by missing skb->sp at recvmsg() time. We need to preserve the skb head state to process the IP_CMSG_PASSSEC cmsg. With this commit we avoid releasing the skb head state in the BH even if a secpath is attached to the current skb, and

[PATCH 3/8] net: mvpp2: introduce per-port nrxqs/ntxqs variables

2017-07-25 Thread Thomas Petazzoni
Currently, the global variables rxq_number and txq_number hold the number of per-port TXQs and RXQs. Until now, such numbers were constant regardless of the driver configuration. As we are going to introduce different modes for TX and RX queues, these numbers will depend on the configuration

[PATCH 6/8] net: mvpp2: add support for TX interrupts and RX queue distribution modes

2017-07-25 Thread Thomas Petazzoni
This commit adds the support for two related features: - Support for TX interrupts, with one interrupt for each CPU - Support for different RX queue distribution modes MVPP2_QDIST_SINGLE_MODE where a single interrupt, shared by all CPUs, receives the RX events, and

[PATCH 1/8] net: mvpp2: fix MVPP21_ISR_RXQ_GROUP_REG definition

2017-07-25 Thread Thomas Petazzoni
The MVPP21_ISR_RXQ_GROUP_REG register is not indexed by rxq, but by port, so we fix the parameter name accordingly. There are no functional changes. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1

[PATCH 8/8] arm64: dts: marvell: add TX interrupts for PPv2.2

2017-07-25 Thread Thomas Petazzoni
This commit updates the Marvell Armada 7K/8K Device Tree to describe the TX interrupts of the Ethernet controllers, in both the master and slave CP110s. Signed-off-by: Thomas Petazzoni --- Dave: please do *not* apply this patch. It will go through the ARM

[PATCH 4/8] net: mvpp2: move from cpu-centric naming to "software thread" naming

2017-07-25 Thread Thomas Petazzoni
The PPv2.2 IP has a concept of "software thread", with all registers of the PPv2.2 mapped 8 times, for concurrent accesses by 8 "software threads". In addition, interrupts on RX queues are associated to such "software thread". For most cases, we map a "software thread" to the more conventional

[PATCH 5/8] net: mvpp2: introduce queue_vector concept

2017-07-25 Thread Thomas Petazzoni
In preparation to the introduction of TX interrupts and improved RX queue distribution, this commit introduces the concept of "queue vector". A queue vector represents a number of RX and/or TX queues, and an associated NAPI instance and interrupt. This commit currently only creates a single

[PATCH 2/8] net: mvpp2: remove RX queue group reset code

2017-07-25 Thread Thomas Petazzoni
The RX queue group allocation is anyway re-done later in mvpp2_port_init(), so resetting it in mvpp2_init() is not very useful, and will be annoying as we are going to rework the RX queue group allocation logic. Signed-off-by: Thomas Petazzoni ---

[PATCH 0/8] net: mvpp2: add TX interrupts support

2017-07-25 Thread Thomas Petazzoni
Hello, So far, the mvpp2 driver was using an hrtimer to handle TX completion. This patch series adds support for using TX interrupts (for each CPU) on PPv2.2, the variant of the IP used on Marvell Armada 7K/8K. This series has been tested on Marvell Armada 7K (PPv2.2) and Armada 375 (PPv2.1).

[PATCH 7/8] dt-bindings: net: marvell-pp2: update interrupt-names with TX interrupts

2017-07-25 Thread Thomas Petazzoni
The PPv2.2 unit has several interrupts used for TX completion notification. This commit updates the Device Tree binding describing this HW block to mention such interrupts. While at it, we update the example to use a recent Device Tree example, that uses interrupts going through the ICU, and not

  1   2   >