Re: [RFC 0/3] Adding config get/set to devlink

2017-10-13 Thread Roopa Prabhu
On Fri, Oct 13, 2017 at 12:11 AM, Jiri Pirko wrote: > Thu, Oct 12, 2017 at 11:53:56PM CEST, ro...@cumulusnetworks.com wrote: >>On Thu, Oct 12, 2017 at 12:20 PM, Florian Fainelli >>wrote: >>> On 10/12/2017 12:06 PM, David Miller wrote: From: Florian

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

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

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

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

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

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

[PATCH net v2 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-13 Thread Troy Kisky
This is better for code locality and should slightly speed up normal interrupts. This also allows PPS clock output to start working for i.mx7. This is because i.mx7 was already using the limit of 3 interrupts, and needed another. Signed-off-by: Troy Kisky ---

[PATCH net v2 1/2] ARM: dts: imx: name the interrupts for the fec ethernet driver

2017-10-13 Thread Troy Kisky
imx7s/imx7d has the ptp interrupt newly added as well. For imx7, "int0" is the interrupt for queue 0 and ENET_MII "int1" is for queue 1 "int2" is for queue 2 For imx6sx, "int0" handles all 3 queues and ENET_MII And of course, the "ptp" interrupt is for the PTP_CLOCK_PPS interrupts This will

RE: [Intel-wired-lan] [PATCH][V3] e1000: avoid null pointer dereference on invalid stat type

2017-10-13 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On Behalf > Of Colin King > Sent: Friday, September 22, 2017 10:14 AM > To: Kirsher, Jeffrey T ; intel-wired- > l...@lists.osuosl.org; netdev@vger.kernel.org > Cc: kernel-janit...@vger.kernel.org;

[PATCH net 4/6] bnxt_en: Fix VF resource checking.

2017-10-13 Thread Michael Chan
In bnxt_sriov_enable(), we calculate to see if we have enough hardware resources to enable the requested number of VFs. The logic to check for minimum completion rings and statistics contexts is missing. Add the required checks so that VF configuration won't fail. Signed-off-by: Michael Chan

[PATCH net 0/6] bnxt_en: bug fixes.

2017-10-13 Thread Michael Chan
Various bug fixes for the VF/PF link change logic, VF resource checking, potential firmware response corruption on NVRAM and DCB parameters, and reading the wrong register for PCIe link speed on the VF. Michael Chan (4): bnxt_en: Improve VF/PF link change logic. bnxt_en: Don't use rtnl lock

[PATCH net 6/6] bnxt_en: Fix possible corruption in DCB parameters from firmware.

2017-10-13 Thread Michael Chan
From: Sankar Patchineelam hwrm_send_message() is replaced with _hwrm_send_message(), and hwrm_cmd_lock mutex lock is grabbed for the whole period of firmware call until the firmware DCB parameters have been copied. This will prevent possible corruption of the

[PATCH net 2/6] bnxt_en: Don't use rtnl lock to protect link change logic in workqueue.

2017-10-13 Thread Michael Chan
As a further improvement to the PF/VF link change logic, use a private mutex instead of the rtnl lock to protect link change logic. With the new mutex, we don't have to take the rtnl lock in the workqueue when we have to handle link related functions. If the VF and PF drivers are running on the

[PATCH net 3/6] bnxt_en: Fix VF PCIe link speed and width logic.

2017-10-13 Thread Michael Chan
From: Vasundhara Volam PCIE PCIE_EP_REG_LINK_STATUS_CONTROL register is only defined in PF config space, so we must read it from the PF. Fixes: 90c4f788f6c0 ("bnxt_en: Report PCIe link speed and width during driver load") Signed-off-by: Vasundhara Volam

[PATCH net 5/6] bnxt_en: Fix possible corrupted NVRAM parameters from firmware response.

2017-10-13 Thread Michael Chan
In bnxt_find_nvram_item(), it is copying firmware response data after releasing the mutex. This can cause the firmware response data to be corrupted if the next firmware response overwrites the response buffer. The rare problem shows up when running ethtool -i repeatedly. Fix it by calling the

[PATCH net 1/6] bnxt_en: Improve VF/PF link change logic.

2017-10-13 Thread Michael Chan
Link status query firmware messages originating from the VFs are forwarded to the PF. The driver handles these interactions in a workqueue for the VF and PF. The VF driver waits for the response from the PF in the workqueue. If the PF and VF driver are running on the same host and the work for

Re: [net-next V7 PATCH 1/5] bpf: introduce new bpf cpu map type BPF_MAP_TYPE_CPUMAP

2017-10-13 Thread kbuild test robot
Hi Jesper, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Jesper-Dangaard-Brouer/New-bpf-cpumap-type-for-XDP_REDIRECT/20171014-061849 config: blackfin-allyesconfig (attached as .config) compiler: bfin-uclinux-gcc (GCC) 6.2.0 reproduce: wget

[next-queue PATCH v8 2/6] net/sched: Change behavior of mq select_queue()

2017-10-13 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia Currently, the class_ops select_queue() implementation on sch_mq returns a pointer to netdev_queue #0 when it receives and invalid qdisc id. That can be misleading since all of mq's inner qdiscs are attached to a valid netdev_queue.

[next-queue PATCH v8 0/6] TSN: Add qdisc based config interface for CBS

2017-10-13 Thread Vinicius Costa Gomes
Hi, Changes from v8: - Fixed comments from Eric Dumazet and Ivan Khoronzhuk; Changes since v6: - Fixed compilation for 32bit arches; - Aligned the behaviour of .select_queue() of the mq qdisc to be the same as mqprio; Changes since v5: - Fixed comments from Jiri Pirko; Changes since v4:

[next-queue PATCH v8 5/6] net/sched: Add support for HW offloading for CBS

2017-10-13 Thread Vinicius Costa Gomes
This adds support for offloading the CBS algorithm to the controller, if supported. Drivers wanting to support CBS offload must implement the .ndo_setup_tc callback and handle the TC_SETUP_CBS (introduced here) type. Signed-off-by: Vinicius Costa Gomes ---

Re: [PATCH net-next] ipv6: only update __use and lastusetime once per jiffy at most

2017-10-13 Thread Eric Dumazet
On Fri, Oct 13, 2017 at 5:09 PM, Martin KaFai Lau wrote: > On Fri, Oct 13, 2017 at 10:08:07PM +, Wei Wang wrote: >> From: Wei Wang >> >> In order to not dirty the cacheline too often, we try to only update >> dst->__use and dst->lastusetime at most once per

[next-queue PATCH v8 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Vinicius Costa Gomes
This queueing discipline implements the shaper algorithm defined by the 802.1Q-2014 Section 8.6.8.2 and detailed in Annex L. It's primary usage is to apply some bandwidth reservation to user defined traffic classes, which are mapped to different queues via the mqprio qdisc. Only a simple

[next-queue PATCH v8 6/6] igb: Add support for CBS offload

2017-10-13 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH v8 1/6] net/sched: Check for null dev_queue on create flow

2017-10-13 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc

[next-queue PATCH v8 3/6] net/sched: Add select_queue() class_ops for mqprio

2017-10-13 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel

Re: [net-next RFC 4/4] openvswitch: Add meter action support

2017-10-13 Thread Pravin Shelar
On Thu, Oct 12, 2017 at 3:38 PM, Andy Zhou wrote: > Implements OVS kernel meter action support. > > Signed-off-by: Andy Zhou > --- > include/uapi/linux/openvswitch.h | 1 + > net/openvswitch/actions.c| 12 > net/openvswitch/datapath.h |

Re: [net-next RFC 3/4] openvswitch: Add meter infrastructure

2017-10-13 Thread Pravin Shelar
On Thu, Oct 12, 2017 at 3:38 PM, Andy Zhou wrote: > OVS kernel datapath so far does not support Openflow meter action. > This is the first stab at adding kernel datapath meter support. > This implementation supports only drop band type. > > Signed-off-by: Andy Zhou

Re: [net-next RFC 0/4] Openvswitch meter action

2017-10-13 Thread Pravin Shelar
On Thu, Oct 12, 2017 at 3:38 PM, Andy Zhou wrote: > This patch series is the first attempt to add openvswitch > meter support. We have previously experimented with adding > metering support in nftables. However 1) It was not clear > how to expose a named nftables object cleanly,

Re: [PATCH net-next] ipv6: only update __use and lastusetime once per jiffy at most

2017-10-13 Thread Martin KaFai Lau
On Fri, Oct 13, 2017 at 10:08:07PM +, Wei Wang wrote: > From: Wei Wang > > In order to not dirty the cacheline too often, we try to only update > dst->__use and dst->lastusetime at most once per jiffy. > As dst->lastusetime is only used by ipv6 garbage collector, it

Re: [Patch net-next v3] tcp: add a tracepoint for tcp retransmission

2017-10-13 Thread Brendan Gregg
On Fri, Oct 13, 2017 at 3:09 PM, Alexei Starovoitov wrote: > On Fri, Oct 13, 2017 at 01:50:44PM -0700, Brendan Gregg wrote: >> On Fri, Oct 13, 2017 at 1:03 PM, Cong Wang wrote: >> > We need a real-time notification for tcp retransmission >>

Re: [Patch net-next v3] tcp: add a tracepoint for tcp retransmission

2017-10-13 Thread David Ahern
On 10/13/17 2:03 PM, Cong Wang wrote: > diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h > new file mode 100644 > index ..3d1cbd072b7e > --- /dev/null > +++ b/include/trace/events/tcp.h > @@ -0,0 +1,68 @@ > +#undef TRACE_SYSTEM > +#define TRACE_SYSTEM tcp > + > +#if

[PATCH net-next 5/5] mlxsw: spectrum_router: Add extack message for RIF and VRF overflow

2017-10-13 Thread David Ahern
Add extack argument down to mlxsw_sp_rif_create and mlxsw_sp_vr_create to set an error message on RIF or VR overflow. Now on overflow of either resource the user gets an informative message as opposed to failing with EBUSY. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel

[PATCH net-next 2/5] net: ipv6: Make inet6addr_validator a blocking notifier

2017-10-13 Thread David Ahern
inet6addr_validator chain was added by commit 3ad7d2468f79f ("Ipvlan should return an error when an address is already in use") to allow address validation before changes are committed and to be able to fail the address change with an error back to the user. The address validation is not done for

[PATCH net-next 4/5] mlxsw: spectrum: router: Add support for address validator notifier

2017-10-13 Thread David Ahern
Add support for inetaddr_validator and inet6addr_validator. The notifiers provide a means for validating ipv4 and ipv6 addresses before the addresses are installed and on failure the error is propagated back to the user. Signed-off-by: David Ahern ---

[PATCH net-next 1/5] ipv6: addrconf: cleanup locking in ipv6_add_addr

2017-10-13 Thread David Ahern
ipv6_add_addr is called in process context with rtnl lock held (e.g., manual config of an address) or during softirq processing (e.g., autoconf and address from a router advertisement). Currently, ipv6_add_addr calls rcu_read_lock_bh shortly after entry and does not call unlock until exit, minus

[PATCH net-next 3/5] net: Add extack to validator_info structs used for address notifier

2017-10-13 Thread David Ahern
Add extack to in_validator_info and in6_validator_info. Update the one user of each, ipvlan, to return an error message for failures. Only manual configuration of an address is plumbed in the IPv6 code path. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel

[PATCH net-next 0/5] mlxsw: spectrum_router: Add extack messages for RIF and VRF overflow

2017-10-13 Thread David Ahern
Currently, exceeding the number of VRF instances or the number of router interfaces either fails with a non-intuitive EBUSY: $ ip li set swp1s1.6 vrf vrf-1s1-6 up RTNETLINK answers: Device or resource busy or fails silently (IPv6) since the checks are done in a work queue. This set adds

Re: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Vinicius Costa Gomes
Hi, Ivan Khoronzhuk writes: [...] >> + >> +static int cbs_enqueue_soft(struct sk_buff *skb, struct Qdisc *sch) >> +{ >> +struct cbs_sched_data *q = qdisc_priv(sch); >> + >> +if (sch->q.qlen == 0 && q->credits > 0) { >> +/* We need to stop

Re: [PATCH net-next] ipv6: check fn before doing FIB6_SUBTREE(fn)

2017-10-13 Thread Martin KaFai Lau
On Fri, Oct 13, 2017 at 10:01:08PM +, Wei Wang wrote: > From: Wei Wang > > In fib6_locate(), we need to first make sure fn is not NULL before doing > FIB6_SUBTREE(fn) to avoid crash. Acked-by: Martin KaFai Lau

Re: [PATCH] Add -target to clang switch while cross compiling.

2017-10-13 Thread Abhijit Ayarekar
On Fri, Oct 13, 2017 at 03:10:38PM -0700, Alexei Starovoitov wrote: > On Fri, Oct 13, 2017 at 12:24:06PM -0700, Abhijit Ayarekar wrote: > > Update to llvm excludes assembly instructions. > > llvm git revision is below > > > > commit 65fad7c26569 ("bpf: add inline-asm support") > > > > This

Re: [PATCH] Add -target to clang switch while cross compiling.

2017-10-13 Thread Alexei Starovoitov
On Fri, Oct 13, 2017 at 12:24:06PM -0700, Abhijit Ayarekar wrote: > Update to llvm excludes assembly instructions. > llvm git revision is below > > commit 65fad7c26569 ("bpf: add inline-asm support") > > This change will be part of llvm release 6.0 > > __ASM_SYSREG_H define is not required for

Re: [Patch net-next v3] tcp: add a tracepoint for tcp retransmission

2017-10-13 Thread Alexei Starovoitov
On Fri, Oct 13, 2017 at 01:50:44PM -0700, Brendan Gregg wrote: > On Fri, Oct 13, 2017 at 1:03 PM, Cong Wang wrote: > > We need a real-time notification for tcp retransmission > > for monitoring. > > > > Of course we could use ftrace to dynamically instrument this > >

[PATCH net-next] ipv6: only update __use and lastusetime once per jiffy at most

2017-10-13 Thread Wei Wang
From: Wei Wang In order to not dirty the cacheline too often, we try to only update dst->__use and dst->lastusetime at most once per jiffy. As dst->lastusetime is only used by ipv6 garbage collector, it should be good enough time resolution. And __use is only used in

[PATCH net-next] ipv6: check fn before doing FIB6_SUBTREE(fn)

2017-10-13 Thread Wei Wang
From: Wei Wang In fib6_locate(), we need to first make sure fn is not NULL before doing FIB6_SUBTREE(fn) to avoid crash. This fixes the following static checker warning: net/ipv6/ip6_fib.c:1462 fib6_locate() warn: variable dereferenced before check 'fn' (see line

[net-next 7/9] i40e: make const array patterns static, reduces object code size

2017-10-13 Thread Jeff Kirsher
From: Colin Ian King Don't populate const array patterns on the stack, instead make it static. Makes the object code smaller by over 60 bytes: Before: textdata bss dec hex filename 1953 496 02449 991 i40e_diag.o After: text

[net-next 1/9] mqprio: Introduce new hardware offload mode and shaper in mqprio

2017-10-13 Thread Jeff Kirsher
From: Amritha Nambiar The offload types currently supported in mqprio are 0 (no offload) and 1 (offload only TCs) by setting these values for the 'hw' option. If offloads are supported by setting the 'hw' option to 1, the default offload mode is 'dcb' where only the TC

[net-next 9/9] i40e/i40evf: don't trust VF to reset itself

2017-10-13 Thread Jeff Kirsher
From: Alan Brady When using 'ethtool -L' on a VF to change number of requested queues from PF, we shouldn't trust the VF to reset itself after making the request. Doing it that way opens the door for a potentially malicious VF to do nasty things to the PF which should

[net-next 5/9] i40e: Refactor VF BW rate limiting

2017-10-13 Thread Jeff Kirsher
From: Amritha Nambiar This patch refactors the BW rate limiting for Tx traffic on the VF to be reused in the next patch for rate limiting Tx traffic for the VSIs on the PF as well. Signed-off-by: Amritha Nambiar Tested-by: Andrew Bowers

[net-next 2/9] i40e: Add macro for PF reset bit

2017-10-13 Thread Jeff Kirsher
From: Amritha Nambiar Introduce a macro for the bit setting the PF reset flag and update its usages. This makes it easier to use this flag in functions to be introduced in future without encountering checkpatch issues related to alignment and line over 80 characters.

[net-next 8/9] i40e: fix link reporting

2017-10-13 Thread Jeff Kirsher
From: Alan Brady When querying the NVM for supported phy_types, on some firmware versions, we were failing to actually fill out the phy_types which means ethtool wouldn't report any link types. Testing-hints: Check 'ethtool ' if you have the right (wrong?) firmware.

[net-next 4/9] i40e: Enable 'channel' mode in mqprio for TC configs

2017-10-13 Thread Jeff Kirsher
From: Amritha Nambiar The i40e driver is modified to enable the new mqprio hardware offload mode and factor the TCs and queue configuration by creating channel VSIs. In this mode, the priority to traffic class mapping and the user specified queue ranges are used to

[net-next 0/9][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-13

2017-10-13 Thread Jeff Kirsher
This series contains updates to mqprio and i40e. Amritha introduces a new hardware offload mode in tc/mqprio where the TCs, the queue configurations and bandwidth rate limits are offloaded to the hardware. The existing mqprio framework is extended to configure the queue counts and layout and also

[net-next 3/9] i40e: Add infrastructure for queue channel support

2017-10-13 Thread Jeff Kirsher
From: Amritha Nambiar This patch sets up the infrastructure for offloading TCs and queue configurations to the hardware by creating HW channels(VSI). A new channel is created for each of the traffic class configuration offloaded via mqprio framework except for the

[net-next 6/9] i40e: Add support setting TC max bandwidth rates

2017-10-13 Thread Jeff Kirsher
From: Amritha Nambiar This patch enables setting up maximum Tx rates for the traffic classes in i40e. The maximum rate is offloaded to the hardware through the mqprio framework by specifying the mode option as 'channel' and shaper option as 'bw_rlimit' and is

[PATCH net-next v2 0/4] tc-testing: Test suite updates

2017-10-13 Thread Lucas Bates
This patch series is a roundup of changes to the tc-testing suite: - Add test cases for police and mirred modules and some coverage in already-submitted test categories - Break the test case files down into more user-friendly sizes - Bug fix to the tdc.py script's handling of the -l

[PATCH net-next v2 4/4] tc-testing: fix the -l argument bug in tdc.py

2017-10-13 Thread Lucas Bates
This patch fixes a bug in the tdc script, where executing tdc with the -l argument would cause the tests to start running as opposed to listing all the known test cases. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim ---

[PATCH net-next v2 2/4] tc-testing: Split test case files into smaller chunks

2017-10-13 Thread Lucas Bates
The original submission had the test cases stored in one monolithic file. This can be unwieldy to edit, especially as more test cases are added. This patch removes the original tests.json file in favour of individual ones broken down by category. Signed-off-by: Lucas Bates

[PATCH net-next v2 3/4] tc-testing: Add test cases for police and skbmod

2017-10-13 Thread Lucas Bates
Add basic unit tests for police and skbmod actions in tc. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim --- .../tc-testing/tc-tests/actions/police.json| 527 + .../tc-testing/tc-tests/actions/skbmod.json| 372

[PATCH net-next v2 1/4] tc-testing: Add test cases for flushing actions

2017-10-13 Thread Lucas Bates
Tests for flushing gact and mirred were missing. This patch adds test cases to explicitly test the flush of any installed gact/mirred actions. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim --- .../tc-testing/tc-tests/actions/tests.json |

[RFC] SIOCGSTAMP semantics

2017-10-13 Thread Al Viro
ioctl() in question 1) fails with EOPNOTSUPP on AF_ALG, AF_CAIF, AF_IUCV, AF_KEY, AF_NFC, AF_RXRPC, AF_VSOCK 2) fails with ENOTTY on AF_DECnet, AF_KCM, AF_LLC, AF_NETLINK, AF_PHONET, AF_PPPOX, AF_RDS, AF_TIPC, AF_UNIX 3) fails with EINVAL on AF_ISDN 4)

Re: [Patch net-next v3] tcp: add a tracepoint for tcp retransmission

2017-10-13 Thread Brendan Gregg
On Fri, Oct 13, 2017 at 1:03 PM, Cong Wang wrote: > We need a real-time notification for tcp retransmission > for monitoring. > > Of course we could use ftrace to dynamically instrument this > kernel function too, however we can't retrieve the connection > information at

[net-next PATCH 0/2] Minor macvlan source mode cleanups

2017-10-13 Thread Alexander Duyck
So this patch series is just a few minor cleanups for macvlan source mode. The first patch addresses double receives when a packet is being routed to the macvlan destination address, and the other addresses the pkt_type being updated in cases where it most likely should not be. --- Alexander

[net-next PATCH 1/2] macvlan: Only deliver one copy of the frame to the macvlan interface

2017-10-13 Thread Alexander Duyck
From: Alexander Duyck This patch intoduces a slight adjustment for macvlan to address the fact that in source mode I was seeing two copies of any packet addressed to the macvlan interface being delivered where there should have been only one. The issue appears to be

[net-next PATCH 2/2] macvlan: Only update pkt_type if destination MAC address matches

2017-10-13 Thread Alexander Duyck
From: Alexander Duyck This patch updates the pkt_type to PACKET_HOST only if the destination MAC address matches on the on the source based macvlan. It didn't make sense to be updating broadcast, multicast, and non-local destined frames with PACKET_HOST.

[PATCH] Staging: irda: Remove trailing whitespace errors

2017-10-13 Thread Shreeya Patel
Remove trailing whitespace checkpatch errors. Signed-off-by: Shreeya Patel --- drivers/staging/irda/drivers/esi-sir.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/irda/drivers/esi-sir.c

Re: [Patch net-next] net_sched: fix a compile warning in act_ife

2017-10-13 Thread Roman Mashak
Cong Wang writes: > Apparently ife_meta_id2name() is only called when > CONFIG_MODULES is defined. > > This fixes: > > net/sched/act_ife.c:251:20: warning: ‘ife_meta_id2name’ defined but not used > [-Wunused-function] > static const char *ife_meta_id2name(u32 metaid)

[Patch net-next v3] tcp: add a tracepoint for tcp retransmission

2017-10-13 Thread Cong Wang
We need a real-time notification for tcp retransmission for monitoring. Of course we could use ftrace to dynamically instrument this kernel function too, however we can't retrieve the connection information at the same time, for example perf-tools [1] reads /proc/net/tcp for socket details, which

Re: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Ivan Khoronzhuk
On Thu, Oct 12, 2017 at 05:40:03PM -0700, Vinicius Costa Gomes wrote: > This queueing discipline implements the shaper algorithm defined by > the 802.1Q-2014 Section 8.6.8.2 and detailed in Annex L. > > It's primary usage is to apply some bandwidth reservation to user > defined traffic classes,

[Patch net-next] net_sched: fix a compile warning in act_ife

2017-10-13 Thread Cong Wang
Apparently ife_meta_id2name() is only called when CONFIG_MODULES is defined. This fixes: net/sched/act_ife.c:251:20: warning: ‘ife_meta_id2name’ defined but not used [-Wunused-function] static const char *ife_meta_id2name(u32 metaid) ^~~~ Fixes: d3f24ba895f0

Re: [PATCH net-next v5 5/5] selinux: bpf: Add addtional check for bpf object file receive

2017-10-13 Thread Stephen Smalley
On Thu, 2017-10-12 at 13:55 -0700, Chenbo Feng wrote: > From: Chenbo Feng > > Introduce a bpf object related check when sending and receiving files > through unix domain socket as well as binder. It checks if the > receiving > process have privilege to read/write the bpf map or

Re: [PATCH net-next v5 4/5] selinux: bpf: Add selinux check for eBPF syscall operations

2017-10-13 Thread Stephen Smalley
On Thu, 2017-10-12 at 13:55 -0700, Chenbo Feng wrote: > From: Chenbo Feng > > Implement the actual checks introduced to eBPF related syscalls. This > implementation use the security field inside bpf object to store a > sid that > identify the bpf object. And when processes try

[PATCH net-next,0/3] Add init of send table and var renames

2017-10-13 Thread Haiyang Zhang
From: Haiyang Zhang Add initialization of send indirection table. Otherwise it may contain old info of previous device with different number of channels. Also, did some variable renaming for easier reading. Haiyang Zhang (3): hv_netvsc: Rename ind_table to rx_table

[PATCH net-next,2/3] hv_netvsc: Rename tx_send_table to tx_table

2017-10-13 Thread Haiyang Zhang
From: Haiyang Zhang Simplify the variable name: tx_send_table Signed-off-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 4 ++-- 3 files changed, 4

[PATCH net-next,3/3] hv_netvsc: Add initialization of tx_table in netvsc_device_add()

2017-10-13 Thread Haiyang Zhang
From: Haiyang Zhang tx_table is part of the private data of kernel net_device. It is only zero-ed out when allocating net_device. We may recreate netvsc_device w/o recreating net_device, so the private netdev data, including tx_table, are not zeroed. It may contain

[PATCH net-next,1/3] hv_netvsc: Rename ind_table to rx_table

2017-10-13 Thread Haiyang Zhang
From: Haiyang Zhang Rename this variable because it is the Receive indirection table. Signed-off-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc_drv.c | 4 ++-- drivers/net/hyperv/rndis_filter.c | 6

[PATCH] Add -target to clang switch while cross compiling.

2017-10-13 Thread Abhijit Ayarekar
Update to llvm excludes assembly instructions. llvm git revision is below commit 65fad7c26569 ("bpf: add inline-asm support") This change will be part of llvm release 6.0 __ASM_SYSREG_H define is not required for native compile. -target switch includes appropriate target specific files while

Re: [net-next:master 836/858] bcmsysport.c:undefined reference to `unregister_dsa_notifier'

2017-10-13 Thread Florian Fainelli
On 10/13/2017 12:41 AM, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git > master > head: 2d0d21c12dfa3851620f1fa9fe2d444538f1fad4 > commit: d156576362c07e954dc36e07b0d7b0733a010f7d [836/858] net: systemport: > Establish lower/upper queue

Re: [PATCH 0/2] net: support bgmac with B50212E B1 PHY

2017-10-13 Thread Florian Fainelli
On 10/12/2017 01:21 AM, Rafał Miłecki wrote: > From: Rafał Miłecki > > I got a report that a board with BCM47189 SoC and B50212E B1 PHY doesn't > work well some devices as there is massive ping loss. After analyzing > PHY state it has appeared that is runs in slave mode and

RE: [PATCH net] net: dsa: mv88e6060: fix switch MAC address

2017-10-13 Thread Woojung.Huh
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of Vivien Didelot > Sent: Friday, October 13, 2017 1:39 PM > To: netdev@vger.kernel.org > Cc: linux-ker...@vger.kernel.org; ker...@savoirfairelinux.com; David S. > Miller; Florian

[Patch net] tun: call dev_get_valid_name() before register_netdevice()

2017-10-13 Thread Cong Wang
register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move these initializations into a

Re: [RFC] Support for UNARP (RFC 1868)

2017-10-13 Thread Girish Moodalbail
On 10/12/17 5:53 PM, Mahesh Bandewar (महेश बंडेवार) wrote: On Thu, Oct 12, 2017 at 4:06 PM, Girish Moodalbail wrote: Hello Eric, The basic idea is to mark the ARP entry either FAILED or STALE as soon as we can so that the subsequent packets that depend on that

[PATCH net-next v3 5/5] net: dsa: remove .set_addr

2017-10-13 Thread Vivien Didelot
Now that there is no user for the .set_addr function, remove it from DSA. If a switch supports this feature (like mv88e6xxx), the implementation can be done in the driver setup. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 1 - net/dsa/dsa2.c| 6

[PATCH net-next v3 0/5] net: dsa: remove .set_addr

2017-10-13 Thread Vivien Didelot
An Ethernet switch may support having a MAC address, which can be used as the switch's source address in transmitted full-duplex Pause frames. If a DSA switch supports the related .set_addr operation, the DSA core sets the master's MAC address on the switch. This won't make sense anymore in a

[PATCH net-next v3 4/5] net: dsa: dsa_loop: remove .set_addr

2017-10-13 Thread Vivien Didelot
The .set_addr function does nothing, remove the dsa_loop implementation before getting rid of it completely in DSA. Signed-off-by: Vivien Didelot --- drivers/net/dsa/dsa_loop.c | 8 1 file changed, 8 deletions(-) diff --git

[PATCH net-next v3 1/5] net: dsa: mv88e6xxx: setup random mac address

2017-10-13 Thread Vivien Didelot
An Ethernet switch may support having a MAC address, which can be used as the switch's source address in transmitted full-duplex Pause frames. If a DSA switch supports the related .set_addr operation, the DSA core sets the master's MAC address on the switch. This won't make sense anymore in a

[PATCH net-next v3 2/5] net: dsa: mv88e6060: fix switch MAC address

2017-10-13 Thread Vivien Didelot
The 88E6060 Ethernet switch always transmits the multicast bit of the switch MAC address as a zero. It re-uses the corresponding bit 8 of the register "Switch MAC Address Register Bytes 0 & 1" for "DiffAddr". If the "DiffAddr" bit is 0, then all ports transmit the same source address. If it is

[PATCH net-next v3 3/5] net: dsa: mv88e6060: setup random mac address

2017-10-13 Thread Vivien Didelot
As for mv88e6xxx, setup the switch from within the mv88e6060 driver with a random MAC address, and remove the .set_addr implementation. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6060.c | 43 ++- 1 file

RE: [PATCH net-next v2 2/4] net: dsa: mv88e6060: setup random mac address

2017-10-13 Thread Woojung.Huh
Hi Vivien, > >> > +REG_WRITE(REG_GLOBAL, GLOBAL_MAC_01, (addr[0] << 9) | > >> addr[1]); > >> > >> Is that supposed to be 9 ? > > > > Looks like it. > > Check > http://www.marvell.com/switching/assets/marvell_linkstreet_88E6060_data > sheet.pdf > > Hum, David is correct, there is a bug in

Re: [PATCH] tests: Remove bashisms (s/source/.)

2017-10-13 Thread Rustad, Mark D
> On Oct 8, 2017, at 7:39 AM, Petr Vorel wrote: > > diff --git a/testsuite/tests/ip/route/add_default_route.t > b/testsuite/tests/ip/route/add_default_route.t > index e5ea6473..0b566f1f 100755 > --- a/testsuite/tests/ip/route/add_default_route.t > +++

Re: [PATCH v2 5/5] fsl/fman: add dpaa in module names

2017-10-13 Thread Florian Fainelli
On 10/13/2017 07:50 AM, Madalin Bucur wrote: > Signed-off-by: Madalin Bucur You should provide a line or two to explain why are you making this change, it is to resolve modular build configurations? > --- > drivers/net/ethernet/freescale/fman/Makefile | 12 ++-- >

[PATCH net] net: dsa: mv88e6060: fix switch MAC address

2017-10-13 Thread Vivien Didelot
The 88E6060 Ethernet switch always transmits the multicast bit of the switch MAC address as a zero. It re-uses the corresponding bit 8 of the register "Switch MAC Address Register Bytes 0 & 1" for "DiffAddr". If the "DiffAddr" bit is 0, then all ports transmit the same source address. If it is

Re: [Patch net-next v2] tcp: add a tracepoint for tcp_retransmit_skb()

2017-10-13 Thread Cong Wang
On Thu, Oct 12, 2017 at 4:18 PM, Alexei Starovoitov wrote: > On Thu, Oct 12, 2017 at 03:48:07PM -0700, Cong Wang wrote: >> We need a real-time notification for tcp retransmission >> for monitoring. >> >> Of course we could use ftrace to dynamically instrument this >>

Re: Fw: [Bug 197213] New: panic in interrupt after ioctl to tun

2017-10-13 Thread Cong Wang
On Fri, Oct 13, 2017 at 8:11 AM, Stephen Hemminger wrote: > Hi, > > this is one more corner case found by syzkaller. > I'm not sure that 'Networking' is the right category for this, but the panic > was triggered by ioctl to /dev/net/tun... > > > [ 13.728009] BUG:

[PATCH net] l2tp: check ps->sock before running pppol2tp_session_ioctl()

2017-10-13 Thread Guillaume Nault
When pppol2tp_session_ioctl() is called by pppol2tp_tunnel_ioctl(), the session may be unconnected. That is, it was created by pppol2tp_session_create() and hasn't been connected with pppol2tp_connect(). In this case, ps->sock is NULL, so we need to check for this case in order to avoid

Re: [PATCH] net: stmmac: dwmac_lib: fix interchanged sleep/timeout values in DMA reset function

2017-10-13 Thread David Miller
From: Emiliano Ingrassia Date: Thu, 12 Oct 2017 11:00:47 +0200 > The DMA reset timeout, used in read_poll_timeout, is > ten times shorter than the sleep time. > This patch fixes these values interchanging them, as it was > before the read_poll_timeout introduction. > >

Re: [PATCH] [net] liquidio: fix timespec64_to_ns typo

2017-10-13 Thread David Miller
From: Arnd Bergmann Date: Thu, 12 Oct 2017 11:48:31 +0200 > While experimenting with changes to the timekeeping code, I > ran into a build error in the liquidio driver: > > drivers/net/ethernet/cavium/liquidio/lio_main.c: In function > 'liquidio_ptp_settime': >

Re: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Vinicius Costa Gomes
Hi, Eric Dumazet writes: [...] > > Your mixing of s64 and u64 is disturbing. > > do_div() handles u64, not s64. > > div64_s64() might be needed in place of do_div() I wasn't very comfortable about the signal juggling either. Didn't know about div64_s64(), looks much

Re: [PATCH v1] pch_gbe: Switch to new PCI IRQ allocation API

2017-10-13 Thread Andy Shevchenko
On Fri, 2017-10-13 at 20:02 +0300, Andy Shevchenko wrote: > This removes custom flag handling. Please, discard this one, slipped to early. > > Signed-off-by: Andy Shevchenko > --- > drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h| 3 +- >

[PATCH v1] pch_gbe: Switch to new PCI IRQ allocation API

2017-10-13 Thread Andy Shevchenko
This removes custom flag handling. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h| 3 +- .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 42 +- 2 files changed, 17 insertions(+), 28 deletions(-)

RE: [PATCH net-next 5/5] net: dsa: split dsa_port's netdev member

2017-10-13 Thread Vivien Didelot
Hi David, David Laight writes: > From: Vivien Didelot >> Sent: 13 October 2017 16:29 >> Vivien Didelot writes: >> >> >>> How about using: >> >>> >> >>> union { >> >>> struct net_device *master; >> >>> struct

[RFC PATCH] net: realtek: r8169: implement set_link_ksettings()

2017-10-13 Thread Tobias Jakobi
Commit 6fa1ba61520576cf1346c4ff09a056f2950cb3bf partially implemented the new ethtool API, by replacing get_settings() with get_link_ksettings(). This breaks ethtool, since the userspace tool (according to the new API specs) never tries the legacy set() call, when the new get() call succeeds. All

RE: [PATCH net-next v2 2/4] net: dsa: mv88e6060: setup random mac address

2017-10-13 Thread Vivien Didelot
Hi David, Woojung, woojung@microchip.com writes: >> From: Vivien Didelot >> > Sent: 13 October 2017 02:41 >> > As for mv88e6xxx, setup the switch from within the mv88e6060 driver with >> > a random MAC address, and remove the .set_addr implementation. >> > >> > Signed-off-by: Vivien Didelot

  1   2   3   >