Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Bartosz Golaszewski
czw., 14 maj 2020 o 18:19 Arnd Bergmann napisał(a): > > On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > This adds the driver for the MediaTek Ethernet MAC used on the MT8* SoC > > family. For now we only support full-duplex. > > > > Signed-of

Re: [PATCH] net: phy: realtek: clear interrupt during init for rtl8211f

2020-05-15 Thread Jisheng Zhang
On Thu, 14 May 2020 21:50:53 +0200 Heiner Kallweit wrote: > > > On 14.05.2020 08:25, Jisheng Zhang wrote: > > On Wed, 13 May 2020 20:45:13 +0200 Heiner Kallweit wrote: > > > >> > >> On 13.05.2020 08:51, Jisheng Zhang wrote: > >>> Hi, > >>> > >>> On Tue, 12 May 2020 20:43:40 +0200 Heiner Kall

[PATCH net] net: phy: broadcom: add support for BCM54811 PHY

2020-05-15 Thread Kevin Lo
The BCM54811 PHY shares many similarities with the already supported BCM54810 PHY but additionally requires some semi-unique configuration. Signed-off-by: Kevin Lo --- diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index d14d91b759b7..0360a5cfdb9e 100644 --- a/drivers/net/ph

Re: [PATCH ipsec] esp6: calculate transport_header correctly when sel.family != AF_INET6

2020-05-15 Thread Steffen Klassert
On Wed, May 13, 2020 at 06:38:54PM +0800, Xin Long wrote: > In esp6_init_state() for beet mode when x->sel.family != AF_INET6: > > x->props.header_len = sizeof(struct ip_esp_hdr) + > crypto_aead_ivsize(aead) + IPV4_BEET_PHMAXLEN + > (sizeof(struct ipv6hdr) - sizeof(struct iphdr)) > >

[PATCH] mwifiex: Fix memory corruption in dump_station

2020-05-15 Thread Pali Rohár
The mwifiex_cfg80211_dump_station() uses static variable for iterating over a linked list of all associated stations (when the driver is in UAP role). This has a race condition if .dump_station is called in parallel for multiple interfaces. This corruption can be triggered by registering multiple S

Re: stable/linux-4.4.y bisection: baseline.login on at91-sama5d4_xplained

2020-05-15 Thread Henri Rosten
On Tue, May 12, 2020 at 05:15:19PM -0400, Sasha Levin wrote: > On Tue, May 12, 2020 at 01:29:06PM -0700, Florian Fainelli wrote: > > > > > > On 5/12/2020 4:10 AM, Alexandre Belloni wrote: > > > Hi, > > > > > > On 12/05/2020 06:54:29+0100, Guillaume Tucker wrote: > > > > Please see the bisection

RE: remove kernel_setsockopt and kernel_getsockopt

2020-05-15 Thread David Laight
Looking at __sys_setsockopt() I noticed that the BPF intercept can also cause set_fs(KERNEL_DS) be set in order to pass a modified buffer into the actual setsockopt() code. If that functionality is to be kept then the underlying protocol specific code needs changing to accept a kernel buffer. The

[PATCH net-next] hinic: add set_channels ethtool_ops support

2020-05-15 Thread Luo bin
add support to change TX/RX queue number with ethtool -L Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 67 +-- .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 7 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 + .../net/ethernet/huawei/hinic/h

Re: [PATCH bpf-next 1/3] samples: bpf: refactor kprobe tracing user progs with libbpf

2020-05-15 Thread Daniel T. Lee
On Thu, May 14, 2020 at 12:29 AM Yonghong Song wrote: > > > > On 5/12/20 11:51 PM, Daniel T. Lee wrote: > > On Wed, May 13, 2020 at 10:40 AM Yonghong Song wrote: > >> > >> > >> > >> On 5/12/20 7:43 AM, Daniel T. Lee wrote: > >>> Currently, the kprobe BPF program attachment method for bpf_load is

Re: [PATCH] sctp: check assoc before SCTP_ADDR_{MADE_PRIM,ADDED} event

2020-05-15 Thread Jonas Falkevik
On Wed, May 13, 2020 at 11:32 PM Marcelo Ricardo Leitner wrote: > > On Wed, May 13, 2020 at 10:11:05PM +0200, Jonas Falkevik wrote: > > On Wed, May 13, 2020 at 6:01 PM Marcelo Ricardo Leitner > > wrote: > > > > > > On Wed, May 13, 2020 at 04:52:16PM +0200, Jonas Falkevik wrote: > > > > Do not gen

[PATCH 06/19] staging: wfx: fix indentation

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller Fix indention of wfx_skb_dtor(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index cac8c9ecbc34..a12590214a5d 10064

[PATCH 03/19] staging: wfx: check pointers returned by allocations

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller Until now, the driver did not always check if the allocations success. The issue was discussed here: https://lore.kernel.org/netdev/2026476.QLiXXEGFCf@pc-42/ Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 43 +

[PATCH 01/19] staging: wfx: fix warning when unregister a frozen device

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller The device does not answer to the command hif_shutdown. Therefore, hif_shutdown() is a bit special. It bypasses some of work normally made by wfx_cmd_send(). In particularly, it unlock hif_cmd.lock and hif_cmd.key_renew_lock. However, if the driver notice that the device is

[PATCH 02/19] staging: wfx: apply 80-columns rule to strings

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller Strings are allowed to exceed 80 columns but, in this case, the format arguments should be placed on a new line. Apply this rule to the whole code of the driver. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 3 ++- drivers/staging/wfx/data_tx.c |

[PATCH 12/19] staging: wfx: merge wfx_stop_ap() with wfx_reset()

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_stop_ap() and wfx_reset() do the same thing. Merge them. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index e077f42b62dc..7d9

[PATCH 00/19] staging: wfx: various fixes

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller Hello, This series contains various changes. The most important patches are the 13 and 14 since they fix two functional defects. The other patches fix runtime warnings (1, 17, 18, 19), improve robustness (3, 4, 5, 7, 10, 16) and do some cosmetics improvements (2, 6, 8, 9, 1

[PATCH 04/19] staging: wfx: fix value of scan timeout

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller Before to start the scan request, the firmware signals (with a null frame) to the AP it won't be able to receive data. This frame can be long to send: up to 512TU. The current calculus of the scan timeout does not take into account this delay. Signed-off-by: Jérôme Pouiller

[PATCH 14/19] staging: wfx: fix PS parameters when multiple vif are in use

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller When multiple vif are in use (= one access point and one station), and when the channels are different, it is necessary to enable power save on station. The firmware check that steps are done in the correct order: - AP can't start if PS is not enable on the station - PS

[PATCH 09/19] staging: wfx: call wfx_tx_update_sta() before to destroy tx_priv

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller The function wfx_notify_buffered_tx() need to know if the frame was associated to a station. This information is available in the Control Buffer (CB) of the skb. However, when wfx_notify_buffered_tx() is called, the CB is no more available. Thus, the caller has to take care

[PATCH 17/19] staging: wfx: remove false-positive WARN()

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller The function wfx_tx_flush() wait for there is no more queued frames in hardware queue. Then, for the sanity, it checks that there is no more pending frame on any AC queue. However, there is a race here. It may happens that hardware queues are empty, but the counters of the

[PATCH 15/19] staging: wfx: drop unnecessary filter configuration when disabling filter

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller Currently, when mac80211 want to disable beacon filtering, the driver reset the filter table and disable the beacon filtering. Only the latter action is required. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 10/19] staging: wfx: fix potential use-after-free

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_tx_policy_put() use data from the skb. However, the call to skb_pull() has just discarded them (even if the memory is in fact not really discarded). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 19/19] staging: wfx: remove false positive warning

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller When a station is removed, the driver check that all the Tx frames were correctly sent. However, the station can be removed before all the Tx frames were acknowledged and a false positive warning can be emitted. The previous commit has added a trace when driver received an

[PATCH 16/19] staging: wfx: fix error reporting in wfx_start_ap()

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller If AP did not start, the error was not reported to mac80211. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 57304ed42e79..f

[PATCH 18/19] staging: wfx: trace acknowledges not linked to any stations

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller Some resources are associated to the outgoing of the stations. To avoid any resource leaks. It is important to understand why an acknowledge is not associated to any station. Add a trace for that purpose. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c |

[PATCH 08/19] staging: wfx: split out wfx_tx_fill_rates() from wfx_tx_confirm_cb()

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_tx_confirm_cb() is a big function. A big part of its body aims to fill the rates list. So, create a new function wfx_tx_fill_rates() and make wfx_tx_confirm_cb() smaller. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 63 ++-

[PATCH 13/19] staging: wfx: fix potential dead lock between join and scan

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller The device disallows to start a scan request between hif_join() and hif_set_bss_params(). The driver is not protected against that. The worst case happens when association is aborted and hif_set_bss_params() never happens. mac80211 would never ask for scan during the associ

[PATCH 05/19] staging: wfx: fix coherency of hif_scan() prototype

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller The function hif_scan() return the timeout for the completion of the scan request. It is the only function from hif_tx.c that return another thing than just an error code. This behavior is not coherent with the rest of file. Worse, if value returned is positive, the caller c

[PATCH 11/19] staging: wfx: rename wfx_do_unjoin() into wfx_reset()

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller In fact, wfx_do_unjoin() resets the interface. This mechanism can be used in more cases than just disassociating from a BSS. So, rename it to reflect that fact. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 32 +++- drivers/sta

[PATCH 07/19] staging: wfx: fix status of dropped frames

2020-05-15 Thread Jerome Pouiller
From: Jérôme Pouiller When wfx_flush() is called, the status of pending frames are reported to mac80211 with random status. mac80211 probably won't interpret this status in this case, but it is cleaner to return a correctly initialized status. Signed-off-by: Jérôme Pouiller --- drivers/staging

Re: stable/linux-4.4.y bisection: baseline.login on at91-sama5d4_xplained

2020-05-15 Thread Henri Rosten
On Fri, May 15, 2020 at 11:14:00AM +0300, Henri Rosten wrote: > On Tue, May 12, 2020 at 05:15:19PM -0400, Sasha Levin wrote: > > On Tue, May 12, 2020 at 01:29:06PM -0700, Florian Fainelli wrote: > > > > > > > > > On 5/12/2020 4:10 AM, Alexandre Belloni wrote: > > > > Hi, > > > > > > > > On 12/05

Re: [PATCH v2] xfrm: policy: Fix xfrm policy match

2020-05-15 Thread Yuehaibing
Friendly ping... Any plan for this issue? On 2020/4/22 20:53, YueHaibing wrote: > While update xfrm policy as follow: > > ip -6 xfrm policy update src fd00::1/128 dst fd00::2/128 dir in \ > priority 1 mark 0 mask 0x10 > ip -6 xfrm policy update src fd00::1/128 dst fd00::2/128 dir in \ > prio

Re: [PATCH net-next 1/3] mptcp: add new sock flag to deal with join subflows

2020-05-15 Thread Paolo Abeni
On Thu, 2020-05-14 at 13:13 -0700, Mat Martineau wrote: > On Wed, 13 May 2020, Paolo Abeni wrote: > > > MP_JOIN subflows must not land into the accept queue. > > Currently tcp_check_req() calls an mptcp specific helper > > to detect such scenario. > > > > Such helper leverages the subflow context

Re: [PATCH 4/8] libbpf hashmap: Localize static hashmap__* symbols

2020-05-15 Thread Jiri Olsa
On Thu, May 14, 2020 at 11:56:20PM -0700, Ian Rogers wrote: > Localize the hashmap__* symbols in libbpf.a. To allow for a version in > libapi. > > Before: > $ nm libbpf.a > ... > 0002088a t hashmap_add_entry > 0001712a t hashmap__append > 00020aa3 T hashmap__capacity >

Re: [RFC v2] current devlink extension plan for NICs

2020-05-15 Thread Jiri Pirko
Fri, May 15, 2020 at 01:52:54AM CEST, jacob.e.kel...@intel.com wrote: > > >On 5/1/2020 2:14 AM, Jiri Pirko wrote: >> == >> || || >> || SF (subfunction) user cmdline

[PATCH net-next] net: core: recursively find netdev by device node

2020-05-15 Thread Tobias Waldekranz
The assumption that a device node is associated either with the netdev's device, or the parent of that device, does not hold for all drivers. E.g. Freescale's DPAA has two layers of platform devices above the netdev. Instead, recursively walk up the tree from the netdev, allowing any parent to matc

Re: [PATCH V2] dynamic_debug: Add an option to enable dynamic debug for modules only

2020-05-15 Thread Petr Mladek
On Thu 2020-04-23 00:02:48, Orson Zhai wrote: > On Wed, Apr 22, 2020 at 10:25 PM Leon Romanovsky wrote: > > > > On Wed, Apr 22, 2020 at 09:06:08PM +0800, Orson Zhai wrote: > > > On Tue, Apr 21, 2020 at 3:10 AM Leon Romanovsky wrote: > > > My motivation came from the concept of GKI (Generic Kernel

Re: "Forwarding" from TC classifier

2020-05-15 Thread Lorenz Bauer
On Thu, 14 May 2020 at 19:54, David Ahern wrote: > > On 5/14/20 9:41 AM, Lorenz Bauer wrote: > > On Wed, 13 May 2020 at 18:48, David Ahern wrote: > >> > >> On 5/13/20 10:40 AM, Lorenz Bauer wrote: > >>> We've recently open sourced a key component of our L4 load balancer: > >>> cls_redirect [1]. >

[PATCH bpf v2 3/3] bpf: restrict bpf_trace_printk()'s %s usage and add %pks, %pus specifier

2020-05-15 Thread Daniel Borkmann
Usage of plain %s conversion specifier in bpf_trace_printk() suffers from the very same issue as bpf_probe_read{,str}() helpers, that is, it is broken on archs with overlapping address ranges. While the helpers have been addressed through work in 6ae08ae3dea2 ("bpf: Add probe_read_{user, kernel} a

[PATCH bpf v2 0/3] Restrict bpf_probe_read{,str}() and bpf_trace_printk()'s %s

2020-05-15 Thread Daniel Borkmann
Small set of fixes in order to restrict BPF helpers for tracing which are broken on archs with overlapping address ranges as per discussion in [0]. I've targetted this for -bpf tree so they can be routed as fixes. Thanks! v1 -> v2: - switch to reusable %pks, %pus format specifiers (Yonghong) -

[PATCH bpf v2 1/3] bpf: restrict bpf_probe_read{,str}() only to archs where they work

2020-05-15 Thread Daniel Borkmann
Given the legacy bpf_probe_read{,str}() BPF helpers are broken on archs with overlapping address ranges, we should really take the next step to disable them from BPF use there. To generally fix the situation, we've recently added new helper variants bpf_probe_read_{user,kernel}() and bpf_probe_rea

[PATCH bpf v2 2/3] bpf: add bpf_probe_read_{user, kernel}_str() to do_refine_retval_range

2020-05-15 Thread Daniel Borkmann
Given bpf_probe_read{,str}() BPF helpers are now only available under CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE, we need to add the drop-in replacements of bpf_probe_read_{kernel,user}_str() to do_refine_retval_range() as well to avoid hitting the same issue as in 849fa50662fbc ("bpf/verifier:

[PATCH] rtlwifi: rtl8192ee: remove redundant for-loop

2020-05-15 Thread Colin King
From: Colin Ian King The for-loop seems to be redundant, the assignments for indexes 0..2 are being over-written by the last index 3 in the loop. Remove the loop and use index 3 instead. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- .../net/wireless/realtek/rtlwifi/rtl

See it

2020-05-15 Thread Alex
Hi I am seeking your consent to guard me invest as partners in any profit investment. If you are interested, get back to me for more details to see if you can handle it. Sincerely, Alex

skbedit priority action vs tc-flower hw_tc

2020-05-15 Thread Vladimir Oltean
Hi, I noticed that there seem to be 2 ways of doing the same thing, which is performing QoS classification. The skbedit priority offload action goes through FLOW_ACTION_PRIORITY, and hw_tc goes through tc_classid_to_hwtc. It appears that drivers are using one or the other method mostly at random.

Re: [PATCH net-next 0/4] Implement filter terse dump mode support

2020-05-15 Thread Vlad Buslov
On Thu 14 May 2020 at 20:26, Jakub Kicinski wrote: > On Thu, 14 May 2020 14:40:22 +0300 Vlad Buslov wrote: >> Implement support for terse dump mode which provides only essential >> classifier/action info (handle, stats, cookie, etc.). Use new >> TCA_DUMP_FLAGS_TERSE flag to prevent copying of unne

[PATCH net-next v2 0/4] Implement classifier-action terse dump mode

2020-05-15 Thread Vlad Buslov
Output rate of current upstream kernel TC filter dump implementation if relatively low (~100k rules/sec depending on configuration). This constraint impacts performance of software switch implementation that rely on TC for their datapath implementation and periodically call TC filter dump to update

[PATCH net-next v2 3/4] net: sched: cls_flower: implement terse dump support

2020-05-15 Thread Vlad Buslov
Implement tcf_proto_ops->terse_dump() callback for flower classifier. Only dump handle, flags and action data in terse mode. Signed-off-by: Vlad Buslov Reviewed-by: Jiri Pirko --- net/sched/cls_flower.c | 43 ++ 1 file changed, 43 insertions(+) diff --gi

[PATCH net-next v2 4/4] selftests: implement flower classifier terse dump tests

2020-05-15 Thread Vlad Buslov
Implement two basic tests to verify terse dump functionality of flower classifier: - Test that verifies that terse dump works. - Test that verifies that terse dump doesn't print filter key. Signed-off-by: Vlad Buslov --- .../tc-testing/tc-tests/filters/tests.json| 38 +++ 1

[PATCH net-next v2 1/4] net: sched: introduce terse dump flag

2020-05-15 Thread Vlad Buslov
Add new TCA_DUMP_FLAGS attribute and use it in cls API to request terse filter output from classifiers with TCA_DUMP_FLAGS_TERSE flag. This option is intended to be used to improve performance of TC filter dump when userland only needs to obtain stats and not the whole classifier/action data. Exten

[PATCH net-next v2 2/4] net: sched: implement terse dump support in act

2020-05-15 Thread Vlad Buslov
Extend tcf_action_dump() with boolean argument 'terse' that is used to request terse-mode action dump. In terse mode only essential data needed to identify particular action (action kind, cookie, etc.) and its stats is put to resulting skb and everything else is omitted. Implement tcf_exts_terse_du

Re: [PATCH net-next v2 2/4] net: sched: implement terse dump support in act

2020-05-15 Thread Jiri Pirko
Fri, May 15, 2020 at 01:40:12PM CEST, vla...@mellanox.com wrote: >Extend tcf_action_dump() with boolean argument 'terse' that is used to >request terse-mode action dump. In terse mode only essential data needed to >identify particular action (action kind, cookie, etc.) and its stats is put >to resu

Re: [PATCH net-next v2 1/4] net: sched: introduce terse dump flag

2020-05-15 Thread Jiri Pirko
Fri, May 15, 2020 at 01:40:11PM CEST, vla...@mellanox.com wrote: >Add new TCA_DUMP_FLAGS attribute and use it in cls API to request terse >filter output from classifiers with TCA_DUMP_FLAGS_TERSE flag. This option >is intended to be used to improve performance of TC filter dump when >userland only

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Arnd Bergmann
On Fri, May 15, 2020 at 9:11 AM Bartosz Golaszewski wrote: > > czw., 14 maj 2020 o 18:19 Arnd Bergmann napisał(a): > > > > On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > > > +static unsigned int mtk_mac_intr_read_and_clear(struct mtk_mac_priv > > > *priv) > > > +{ > > > + u

Re: [PATCH AUTOSEL 5.6 30/62] net: Make PTP-specific drivers depend on PTP_1588_CLOCK

2020-05-15 Thread Grygorii Strashko
On 15/05/2020 00:40, Arnd Bergmann wrote: On Thu, May 14, 2020 at 8:52 PM Sasha Levin wrote: From: Clay McClure [ Upstream commit b6d49cab44b567b3e0a5544b3d61e516a7355fad ] Commit d1cbfd771ce8 ("ptp_clock: Allow for it to be optional") changed all PTP-capable Ethernet drivers from `selec

Re: [PATCH bpf-next] bpf, bpftool: Allow probing for CONFIG_HZ from kernel config

2020-05-15 Thread Daniel Borkmann
On Thu, May 14, 2020 at 04:19:41PM -0700, Andrii Nakryiko wrote: > On Wed, May 13, 2020 at 1:00 AM Daniel Borkmann wrote: > > > > In Cilium we've recently switched to make use of bpf_jiffies64() for > > parts of our tc and XDP datapath since bpf_ktime_get_ns() is more > > expensive and high-precis

Re: [PATCH bpf-next v2 05/17] inet: Run SK_LOOKUP BPF program on socket lookup

2020-05-15 Thread Jakub Sitnicki
On Mon, May 11, 2020 at 10:44 PM CEST, Alexei Starovoitov wrote: > On Mon, May 11, 2020 at 08:52:06PM +0200, Jakub Sitnicki wrote: >> Run a BPF program before looking up a listening socket on the receive path. >> Program selects a listening socket to yield as result of socket lookup by >> calling b

[PATCH] dpaa2-eth: properly handle buffer size restrictions

2020-05-15 Thread Ioana Ciornei
Depending on the WRIOP version, the buffer size on the RX path must by a multiple of 64 or 256. Handle this restriction properly by aligning down the buffer size to the necessary value. Also, use the new buffer size dynamically computed instead of the compile time one. Fixes: 27c874867c4e ("dpaa2-

AW: [PATCH] rtlwifi: rtl8192ee: remove redundant for-loop

2020-05-15 Thread Walter Harms
if someone has same spare time, this driver need a bit more love ... SO far i can see in rtl92ee_phy_iq_calibrate: * IQK_MATRIX_REG_NUM should be used instead 8 hardcoded. * the for-loop in the beginning is obfuscating that it sets simply final_candidate this can be cleaned: reg_e94 = res

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Bartosz Golaszewski
pt., 15 maj 2020 o 14:04 Arnd Bergmann napisał(a): > > On Fri, May 15, 2020 at 9:11 AM Bartosz Golaszewski wrote: > > > > czw., 14 maj 2020 o 18:19 Arnd Bergmann napisał(a): > > > > > > On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski > > > wrote: > > > > +static unsigned int mtk_mac_intr_

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Arnd Bergmann
On Fri, May 15, 2020 at 2:56 PM Bartosz Golaszewski wrote: > pt., 15 maj 2020 o 14:04 Arnd Bergmann napisał(a): > > On Fri, May 15, 2020 at 9:11 AM Bartosz Golaszewski wrote: > > > > > > > > It looks like most of the stuff inside of the loop can be pulled out > > > > and only done once here. >

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Andrew Lunn
On Fri, May 15, 2020 at 09:11:14AM +0200, Bartosz Golaszewski wrote: > czw., 14 maj 2020 o 18:19 Arnd Bergmann napisał(a): > > > > On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > > > > > > From: Bartosz Golaszewski > > > > > > This adds the driver for the MediaTek Ethernet MAC used

[PATCH 3/4] appletalk: factor out a atrtr_ioctl_addrt helper

2020-05-15 Thread Christoph Hellwig
Add a helper than can be shared with the upcoming compat ioctl handler. Signed-off-by: Christoph Hellwig --- net/appletalk/ddp.c | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index b41375d4d295d..

move the SIOCDELRT and SIOCADDRT compat_ioctl handlers v2

2020-05-15 Thread Christoph Hellwig
Hi Dave, this series moves the compat_ioctl handlers into the protocol handlers, avoiding the need to override the address space limited as in the current handler. Changes since v1: - reorder a bunch of variable declarations

[PATCH 1/4] ipv6: lift copy_from_user out of ipv6_route_ioctl

2020-05-15 Thread Christoph Hellwig
Prepare for better compat ioctl handling by moving the user copy out of ipv6_route_ioctl. Signed-off-by: Christoph Hellwig --- include/net/ip6_route.h | 3 ++- net/ipv6/af_inet6.c | 16 +-- net/ipv6/route.c| 44 +++-- 3 files changed,

[PATCH 2/4] ipv6: move SIOCADDRT and SIOCDELRT handling into ->compat_ioctl

2020-05-15 Thread Christoph Hellwig
To prepare removing the global routing_ioctl hack start lifting the code into a newly added ipv6 ->compat_ioctl handler. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 2 ++ net/dccp/ipv6.c | 1 + net/ipv6/af_inet6.c | 53 + net/ipv6/raw.c

[PATCH 4/4] ipv4,appletalk: move SIOCADDRT and SIOCDELRT handling into ->compat_ioctl

2020-05-15 Thread Christoph Hellwig
To prepare removing the global routing_ioctl hack start lifting the code into the ipv4 and appletalk ->compat_ioctl handlers. Unlike the existing handler we don't bother copying in the name - there are no compat issues for char arrays. Signed-off-by: Christoph Hellwig --- include/net/compat.h |

Re: [PATCH] net: mscc: ocelot: replace readx_poll_timeout with readx_poll_timeout_atomic

2020-05-15 Thread Andrew Lunn
On Fri, May 15, 2020 at 11:18:13AM +0800, Xulin Sun wrote: > This fixes call trace like below to use atomic safe API: > > BUG: sleeping function called from invalid context at > drivers/net/ethernet/mscc/ocelot.c:59 > in_atomic(): 1, irqs_disabled(): 0, pid: 3778, name: ifconfig > INFO: lockdep i

Re: [PATCH 0/3] Patch series for a PTP Grandmaster use case using stmmac/gmac3 ptp clock

2020-05-15 Thread Julien Beraud
Sorry to jump in, just wanted to add a few details, On 15/05/2020 02:37, Richard Cochran wrote: On Thu, May 14, 2020 at 05:09:01PM +0200, Olivier Dautricourt wrote: My issue is that the default behavior of the stmmac driver is to set the mac into fine mode which implies to continuously do

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Arnd Bergmann
On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > +static int mtk_mac_ring_pop_tail(struct mtk_mac_ring *ring, > +struct mtk_mac_ring_desc_data *desc_data) I took another look at this function because of your comment on the locking the descriptor update

KMSAN: uninit-value in nf_ip6_checksum

2020-05-15 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:8b97c627 kmsan: drop the opportunity to ignore pages git tree: https://github.com/google/kmsan.git master console output: https://syzkaller.appspot.com/x/log.txt?x=17830eac10 kernel config: https://syzkaller.appspot.com/x/.con

BUG: unable to handle kernel paging request in fl_dump_key

2020-05-15 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:99addbe3 net: broadcom: Select BROADCOM_PHY for BCMGENET git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=173e568c10 kernel config: https://syzkaller.appspot.com/x/.config?x=b0212dbee046bc1f dashboard li

Re: [PATCH 05/19] staging: wfx: fix coherency of hif_scan() prototype

2020-05-15 Thread Greg Kroah-Hartman
On Fri, May 15, 2020 at 10:33:11AM +0200, Jerome Pouiller wrote: > From: Jérôme Pouiller > > The function hif_scan() return the timeout for the completion of the > scan request. It is the only function from hif_tx.c that return another > thing than just an error code. This behavior is not coheren

Re: [PATCH 05/19] staging: wfx: fix coherency of hif_scan() prototype

2020-05-15 Thread Greg Kroah-Hartman
On Fri, May 15, 2020 at 03:53:59PM +0200, Greg Kroah-Hartman wrote: > On Fri, May 15, 2020 at 10:33:11AM +0200, Jerome Pouiller wrote: > > From: Jérôme Pouiller > > > > The function hif_scan() return the timeout for the completion of the > > scan request. It is the only function from hif_tx.c tha

Re: "Forwarding" from TC classifier

2020-05-15 Thread David Ahern
On 5/15/20 3:59 AM, Lorenz Bauer wrote: > > Yes, but that doesn't play well with changing the source address to > the local machine's, since the upper part of the stack will drop the > packet due to accept_local=0. Can you defer the source address swap to the Tx path? Let the packet go up the sta

Re: [PATCH 4/8] libbpf hashmap: Localize static hashmap__* symbols

2020-05-15 Thread Arnaldo Carvalho de Melo
Em Fri, May 15, 2020 at 11:17:07AM +0200, Jiri Olsa escreveu: > On Thu, May 14, 2020 at 11:56:20PM -0700, Ian Rogers wrote: > > Localize the hashmap__* symbols in libbpf.a. To allow for a version in > > libapi. > > > > Before: > > $ nm libbpf.a > > ... > > 0002088a t hashmap_add_entry > >

Re: [PATCH 6/9] bpf: Compile bpfwl tool at kernel compilation start

2020-05-15 Thread Jiri Olsa
On Thu, May 14, 2020 at 03:38:57PM -0700, Andrii Nakryiko wrote: > On Wed, May 6, 2020 at 6:31 AM Jiri Olsa wrote: > > > > The bpfwl tool will be used during the vmlinux linking, > > so it's necessary it's ready. > > > > Signed-off-by: Jiri Olsa > > --- > > Makefile | 21 ++

Re: [PATCH 7/9] bpf: Compile the BTF id whitelist data in vmlinux

2020-05-15 Thread Jiri Olsa
On Thu, May 14, 2020 at 03:46:26PM -0700, Andrii Nakryiko wrote: > On Thu, May 14, 2020 at 1:05 AM Jiri Olsa wrote: > > > > On Wed, May 13, 2020 at 11:29:40AM -0700, Alexei Starovoitov wrote: > > > > SNIP > > > > > > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > > > > index d09a

Re: [PATCH 8/9] selftests/bpf: Add test for d_path helper

2020-05-15 Thread Jiri Olsa
On Thu, May 14, 2020 at 03:48:20PM -0700, Andrii Nakryiko wrote: > On Wed, May 6, 2020 at 6:32 AM Jiri Olsa wrote: > > > > Adding test for d_path helper which is pretty much > > copied from Wenbo Zhang's test for bpf_get_fd_path, > > which never made it in. > > > > I've failed so far to compile th

Re: [PATCH 3/9] bpf: Add bpfwl tool to construct bpf whitelists

2020-05-15 Thread Jiri Olsa
On Thu, May 14, 2020 at 03:20:19PM -0700, Andrii Nakryiko wrote: > On Wed, May 6, 2020 at 6:30 AM Jiri Olsa wrote: > > > > This tool takes vmlinux object and whitelist directory on input > > and produces C source object with BPF whitelist data. > > > > The vmlinux object needs to have a BTF inform

Re: [PATCH 1/9] bpf: Add d_path helper

2020-05-15 Thread Jiri Olsa
On Thu, May 14, 2020 at 03:06:01PM -0700, Andrii Nakryiko wrote: > On Wed, May 6, 2020 at 6:30 AM Jiri Olsa wrote: > > > > Adding d_path helper function that returns full path > > for give 'struct path' object, which needs to be the > > kernel BTF 'path' object. > > > > The helper calls directly d

Re: [PATCH 05/19] staging: wfx: fix coherency of hif_scan() prototype

2020-05-15 Thread Jérôme Pouiller
On Friday 15 May 2020 15:53:59 CEST Greg Kroah-Hartman wrote: > On Fri, May 15, 2020 at 10:33:11AM +0200, Jerome Pouiller wrote: > > From: Jérôme Pouiller > > > > The function hif_scan() return the timeout for the completion of the > > scan request. It is the only function from hif_tx.c that retur

Re: [PATCH bpf-next v2 05/17] inet: Run SK_LOOKUP BPF program on socket lookup

2020-05-15 Thread Alexei Starovoitov
On Fri, May 15, 2020 at 02:28:30PM +0200, Jakub Sitnicki wrote: > On Mon, May 11, 2020 at 10:44 PM CEST, Alexei Starovoitov wrote: > > On Mon, May 11, 2020 at 08:52:06PM +0200, Jakub Sitnicki wrote: > >> Run a BPF program before looking up a listening socket on the receive path. > >> Program select

[PATCH 00/17] RZ/G1H describe I2C, IIC, MMC0, SATA, AVB, RWDT and APMU nodes

2020-05-15 Thread Lad Prabhakar
Hi All, This patch series describes i2c, iic, mmc0, sdhi, sata, AVB, apmu and RWDT on R8A7742 SoC. Cheers, Prabhakar Lad Prabhakar (17): dt-bindings: i2c: renesas,i2c: Document r8a7742 support dt-bindings: i2c: renesas,iic: Document r8a7742 support ARM: dts: r8a7742: Add I2C and IIC suppor

[PATCH 01/17] dt-bindings: i2c: renesas,i2c: Document r8a7742 support

2020-05-15 Thread Lad Prabhakar
Document i2c controller for RZ/G1H (R8A7742) SoC, which is compatible with R-Car Gen2 SoC family. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- Documentation/devicetree/bindings/i2c/renesas,i2c.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicet

[PATCH 02/17] dt-bindings: i2c: renesas,iic: Document r8a7742 support

2020-05-15 Thread Lad Prabhakar
Document IIC controller for RZ/G1H (R8A7742) SoC, which is compatible with R-Car Gen2 SoC family. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- Documentation/devicetree/bindings/i2c/renesas,iic.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicet

[PATCH 04/17] dt-bindings: mmc: renesas,sdhi: Document r8a7742 support

2020-05-15 Thread Lad Prabhakar
Document SDHI controller for RZ/G1H (R8A7742) SoC, which is compatible with R-Car Gen2 SoC family. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- Documentation/devicetree/bindings/mmc/renesas,sdhi.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devic

[PATCH 05/17] mmc: renesas_sdhi_sys_dmac: Add support for r8a7742 SoC

2020-05-15 Thread Lad Prabhakar
Add support for r8a7742 SoC. Renesas RZ/G1H (R8A7742) SDHI is identical to the R-Car Gen2 family. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/renesas_sdhi_sys_

[PATCH 03/17] ARM: dts: r8a7742: Add I2C and IIC support

2020-05-15 Thread Lad Prabhakar
Add the I2C[0-3] and IIC[0-3] devices nodes to the R8A7742 device tree. Automatic transmission for PMIC control is not available on IIC3 hence compatible string "renesas,rcar-gen2-iic" and "renesas,rmobile-iic" is not added to iic3 node. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian

[PATCH 13/17] ARM: dts: r8a7742: Add Ether support

2020-05-15 Thread Lad Prabhakar
Define the generic R8A7742 part of the Ether device node. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- arch/arm/boot/dts/r8a7742.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi inde

[PATCH 16/17] dt-bindings: watchdog: renesas,wdt: Document r8a7742 support

2020-05-15 Thread Lad Prabhakar
RZ/G1H (R8A7742) watchdog implementation is compatible with R-Car Gen2, therefore add relevant documentation. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- Documentation/devicetree/bindings/watchdog/renesas,wdt.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Docu

[PATCH 14/17] dt-bindings: power: renesas,apmu: Document r8a7742 support

2020-05-15 Thread Lad Prabhakar
Document APMU and SMP enable method for RZ/G1H (also known as r8a7742) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- Documentation/devicetree/bindings/power/renesas,apmu.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/power

[PATCH 07/17] ARM: dts: r8a7742: Add MMC0 node

2020-05-15 Thread Lad Prabhakar
Describe MMC0 device node in the R8A7742 device tree. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- arch/arm/boot/dts/r8a7742.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi index

[PATCH 11/17] dt-bindings: net: renesas,ether: Document R8A7742 SoC

2020-05-15 Thread Lad Prabhakar
Document RZ/G1H (R8A7742) SoC bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- Documentation/devicetree/bindings/net/renesas,ether.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/renesas,ether.yaml b/Documentation/de

[PATCH 12/17] ARM: dts: r8a7742: Add Ethernet AVB support

2020-05-15 Thread Lad Prabhakar
Add Ethernet AVB support for R8A7742 SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- arch/arm/boot/dts/r8a7742.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi index 553b92f..925bc8

[PATCH 09/17] ARM: dts: r8a7742: Add sata nodes

2020-05-15 Thread Lad Prabhakar
Add the sata devices nodes to the R8A7742 device tree. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- arch/arm/boot/dts/r8a7742.dtsi | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi

[PATCH 17/17] ARM: dts: r8a7742: Add RWDT node

2020-05-15 Thread Lad Prabhakar
Add a device node for the Watchdog Timer (RWDT) controller on the Renesas RZ/G1H (r8a7742) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- arch/arm/boot/dts/r8a7742.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/a

[PATCH 15/17] ARM: dts: r8a7742: Add APMU nodes

2020-05-15 Thread Lad Prabhakar
Add DT nodes for the Advanced Power Management Units (APMU), and use the enable-method to point out that the APMU should be used for SMP support. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- arch/arm/boot/dts/r8a7742.dtsi | 13 + 1 file changed, 13 insertion

[PATCH 06/17] ARM: dts: r8a7742: Add SDHI nodes

2020-05-15 Thread Lad Prabhakar
Add the SDHI devices nodes to the R8A7742 device tree. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- arch/arm/boot/dts/r8a7742.dtsi | 60 ++ 1 file changed, 60 insertions(+) diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/b

[PATCH 08/17] dt-bindings: ata: renesas,rcar-sata: Add r8a7742 support

2020-05-15 Thread Lad Prabhakar
Document SATA support for the RZ/G1H, which is compatible with R-Car Gen2 SoC family. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu --- Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/b

  1   2   3   4   >