[PATCH] net/tls: race causes kernel panic

2020-09-23 Thread Rohit Maheshwari
BUG: kernel NULL pointer dereference, address: 00b8 #PF: supervisor read access in kernel mode #PF: error_code(0x) - not-present page PGD 8008b6fef067 P4D 8008b6fef067 PUD 8b6fe6067 PMD 0 Oops: [#1] SMP PTI CPU: 12 PID: 23871 Comm: kworker/12:80 Kdump: loaded Taint

[PATCH] net/ethernet/broadcom: fix spelling typo

2020-09-23 Thread Wang Qing
Modify the comment typo: "compliment" -> "complement". Signed-off-by: Wang Qing --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h b/drivers/net/ethernet/broadco

[PATCH] iwlwifi: mvm: Increase session protection duration for association

2020-09-23 Thread Kai-Heng Feng
Sometimes Intel AX201 fails to associate with AP: [ 839.290042] wlp0s20f3: authenticate with xx:xx:xx:xx:xx:xx [ 839.291737] wlp0s20f3: send auth to xx:xx:xx:xx:xx:xx (try 1/3) [ 839.350010] wlp0s20f3: send auth to xx:xx:xx:xx:xx:xx (try 2/3) [ 839.360826] wlp0s20f3: authenticated [ 839.363205

[net-next v2 3/3] cxgb4/ch_ktls: ktls stats are added at port level

2020-09-23 Thread Rohit Maheshwari
All the ktls stats were at adapter level, but now changing it to port level. Fixes: 62370a4f346d ("cxgb4/chcr: Add ipv6 support and statistics") Signed-off-by: Rohit Maheshwari --- .../ethernet/chelsio/cxgb4/cxgb4_debugfs.c| 35 ++--- .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c|

[net-next v2 2/3] cxgb4: Avoid log flood

2020-09-23 Thread Rohit Maheshwari
Changing these logs to dynamic debugs. If issue is seen, these logs can be enabled at run time. Signed-off-by: Rohit Maheshwari --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_

[net-next v2 1/3] ch_ktls: Issue if connection offload fails

2020-09-23 Thread Rohit Maheshwari
Since driver first return success to tls_dev_add, if req to HW is successful, but later if HW returns failure, that connection traffic fails permanently and connection status remains unknown to stack. v1->v2: - removed conn_up from all places. Fixes: 34aba2c45024 ("cxgb4/chcr : Register to tls ad

RE: [EXT] Re: [PATCH] net: fec: Keep device numbering consistent with datasheet

2020-09-23 Thread Andy Duan
From: David Miller Sent: Thursday, September 24, 2020 4:32 AM > From: Stefan Riedmueller > Date: Wed, 23 Sep 2020 16:25:28 +0200 > > > From: Christian Hemp > > > > Make use of device tree alias for device enumeration to keep the > > device order consistent with the naming in the datasheet. > >

[net-next v2 0/3] cxgb4/ch_ktls: updates in net-next

2020-09-23 Thread Rohit Maheshwari
This series of patches improves connections setup and statistics. This series is broken down as follows: Patch 1 fixes the handling of connection setup failure in HW. Driver shouldn't return success to tls_dev_add, until HW returns success. Patch 2 avoids the log flood. Patch 3 adds ktls statis

[PATCH] net: usb: ax88179_178a: add Toshiba usb 3.0 adapter

2020-09-23 Thread Wilken Gottwalt
Reposted and added netdev as suggested by Jakub Kicinski. --- Adds the driver_info and usb ids of the AX88179 based Toshiba USB 3.0 ethernet adapter. Signed-off-by: Wilken Gottwalt --- drivers/net/usb/ax88179_178a.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/

Re: [PATCH] Revert "net: linkwatch: add check for netdevice being present to linkwatch_do_dev"

2020-09-23 Thread Saeed Mahameed
On Wed, 2020-09-23 at 17:23 -0700, David Miller wrote: > From: David Miller > Date: Wed, 23 Sep 2020 17:21:25 -0700 (PDT) > > > If an async code path tests 'present', gets true, and then the RTNL > > holding synchronous code path puts the device into D3hot > immediately > > afterwards, the async

Re: [PATCH net-next v2 3/3] dpaa2-mac: add PCS support through the Lynx module

2020-09-23 Thread Ioana Ciornei
On Thu, Sep 24, 2020 at 03:10:51AM +0200, Andrew Lunn wrote: > > +static int dpaa2_pcs_create(struct dpaa2_mac *mac, > > + struct device_node *dpmac_node, int id) > > +{ > > + struct mdio_device *mdiodev; > > + struct device_node *node; > > + > > + node = of_parse_phandl

Re: possible deadlock in xfrm_policy_delete

2020-09-23 Thread Herbert Xu
On Thu, Sep 24, 2020 at 06:44:12AM +0200, Dmitry Vyukov wrote: > > FWIW one of the dups of this issue was bisected to: > > commit 1909760f5fc3f123e47b4e24e0ccdc0fc8f3f106 > Author: Ahmed S. Darwish > Date: Fri Sep 4 15:32:31 2020 + > > seqlock: PREEMPT_RT: Do not starve seqlock_t write

Re: [net-next 1/3] ch_ktls: Issue if connection offload fails

2020-09-23 Thread rohit maheshwari
On 23/09/20 4:14 AM, Jakub Kicinski wrote: On Tue, 22 Sep 2020 23:14:59 +0530 Rohit Maheshwari wrote: Since driver first return success to tls_dev_add, if req to HW is successful, but later if HW returns failure, that connection traffic fails permanently and connection status remains unknown t

Re: inconsistent lock state in xfrm_policy_lookup_inexact_addr

2020-09-23 Thread Herbert Xu
On Wed, Sep 16, 2020 at 01:51:14AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:6b02addb Add linux-next specific files for 20200915 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=15888efd90 > kernel config

Re: possible deadlock in xfrm_user_rcv_msg

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: possible deadlock in xfrm_policy_delete

2020-09-23 Thread Herbert Xu
On Sun, Sep 20, 2020 at 01:22:14PM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:5fa35f24 Add linux-next specific files for 20200916 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1122e2d990 > kernel config

Re: [PATCH] net/ipv4: always honour route mtu during forwarding

2020-09-23 Thread kernel test robot
Hi "Maciej, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] [also build test WARNING on net/master linus/master sparc-next/master next-20200923] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

Re: [PATCH net-next v3 1/2] net: dsa: untag the bridge pvid from rx skbs

2020-09-23 Thread Florian Fainelli
On 9/23/2020 4:08 PM, Vladimir Oltean wrote: On Wed, Sep 23, 2020 at 03:59:46PM -0700, Florian Fainelli wrote: On 9/23/20 3:58 PM, Vladimir Oltean wrote: On Wed, Sep 23, 2020 at 03:54:59PM -0700, Florian Fainelli wrote: Not having much luck with using __vlan_find_dev_deep_rcu() for a reaso

Re: possible deadlock in xfrm_policy_lookup_bytype

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: WARNING: SOFTIRQ-READ-safe -> SOFTIRQ-READ-unsafe lock order detected

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH net-next] net: vlan: Avoid using BUG() in vlan_proto_idx()

2020-09-23 Thread Florian Fainelli
While we should always make sure that we specify a valid VLAN protocol to vlan_proto_idx(), killing the machine when an invalid value is specified is too harsh and not helpful for debugging. All callers are capable of dealing with an error returned by vlan_proto_idx() so check the index value and p

Re: inconsistent lock state in xfrm_user_rcv_msg

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: possible deadlock in xfrm_policy_lookup_inexact_addr

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

skb_under_panic with corrupt (?) head/data pointers

2020-09-23 Thread Guenter Roeck
Hi, we are seeing situations where skb_under_panic is reported with bad data pointers. A recent example is [1], but we have seen more of the same. Some random examples: skb_under_panic: text:39ea4f04 len:272 put:48 head:bdd3f564 data:f70d12b8 tail:0x102 end:0x2c0

[RFC PATCH 23/24] vdpa_sim: filter destination mac address

2020-09-23 Thread Jason Wang
Add a simple unicast filter to filter out the dest MAC doesn't match to the one stored in the config. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 49 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_s

[RFC PATCH 24/24] vdpasim: control virtqueue support

2020-09-23 Thread Jason Wang
This patch introduces the control virtqueue support for vDPA simulator. This is a requirement for supporting advanced features like multiqueue. A requirement for control virtqueue is to isolate its memory access from the rx/tx virtqueues. This is because when using vDPA device for VM, the control

[RFC PATCH 20/24] vdpa_sim: advertise VIRTIO_NET_F_MTU

2020-09-23 Thread Jason Wang
We've already reported maximum mtu via config space, so let's advertise the feature. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index d176

[RFC PATCH 21/24] vdpa_sim: advertise VIRTIO_NET_F_MAC

2020-09-23 Thread Jason Wang
We advertise mac address via config space, so let's advertise VIRTIO_NET_F_MAC. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 4b2d0d3fb

[RFC PATCH 22/24] vdpa_sim: factor out buffer completion logic

2020-09-23 Thread Jason Wang
This patch factors out the buffer completion logic in order to support future features. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 33 +--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers

[RFC PATCH 19/24] vdpa_sim: use separated iov for reading and writing

2020-09-23 Thread Jason Wang
In order to support control virtqueue whose commands have both in and out descriptors, we need to use separated iov for reading and writing in vdpa_sim. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/

[RFC PATCH 15/24] vhost-vdpa: introduce uAPI to get the number of address spaces

2020-09-23 Thread Jason Wang
A new uAPI is introduced for the userspace to know the address spaces that is supported by a specific device. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 3 +++ include/uapi/linux/vhost.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/v

[RFC PATCH 18/24] vhost-vdpa: support ASID based IOTLB API

2020-09-23 Thread Jason Wang
This patch extends the vhost-vdpa to support ASID based IOTLB API. The vhost-vdpa device will allocated multple IOTLBs for vDPA device that supports multiple address spaces. The IOTLBs and vDPA device memory mappings is determined and maintained through ASID. Note that we still don't support vDPA

[RFC PATCH 16/24] vhost-vdpa: uAPI to get virtqueue group id

2020-09-23 Thread Jason Wang
Follows the support for virtqueue group in vDPA. This patches introduces uAPI to get the virtqueue group ID for a specific virtqueue in vhost-vdpa. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 8 include/uapi/linux/vhost.h | 4 2 files changed, 12 insertions(+) diff

[RFC PATCH 17/24] vhost-vdpa: introduce uAPI to set group ASID

2020-09-23 Thread Jason Wang
Follows the vDPA support for associating ASID to a specific virtqueue group. This patch adds a uAPI to support setting them from userspace. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 8 include/uapi/linux/vhost.h | 4 2 files changed, 12 insertions(+) diff --git a/

[RFC PATCH 13/24] vhost-vdpa: introduce ASID based IOTLB

2020-09-23 Thread Jason Wang
This patch introduces the support of ASID based IOTLB by tagging IOTLB with a unique ASID. This is a must for supporting ASID based vhost IOTLB API by the following patches. IOTLB were stored in a hlist and new IOTLB will be allocated when a new ASID is seen via IOTLB API and destoryed when there'

[RFC PATCH 14/24] vhost-vdpa: introduce uAPI to get the number of virtqueue groups

2020-09-23 Thread Jason Wang
Follows the vDPA support for multiple address spaces, this patch introduce uAPI for the userspace to know the number of virtqueue groups supported by the vDPA device. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 4 include/uapi/linux/vhost.h | 4 2 files changed, 8 insert

[RFC PATCH 10/24] vdpa: introduce config operations for associating ASID to a virtqueue group

2020-09-23 Thread Jason Wang
This patch introduces a new bus operation to allow the vDPA bus driver to associate an ASID to a virtqueue group. Signed-off-by: Jason Wang --- include/linux/vdpa.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 1e1163daa352..e23

[RFC PATCH 12/24] vhost: support ASID in IOTLB API

2020-09-23 Thread Jason Wang
This patches allows userspace to send ASID based IOTLB message to vhost. This idea is to use the reserved u32 field in the existing V2 IOTLB message. Vhost device should advertise this capability via VHOST_BACKEND_F_IOTLB_ASID backend feature. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c

[RFC PATCH 11/24] vhost_iotlb: split out IOTLB initialization

2020-09-23 Thread Jason Wang
This patch split out IOTLB initialization logic into a new helper. This allows vhost to implement device specific IOTLB allocation logic. Signed-off-by: Jason Wang --- drivers/vhost/iotlb.c | 23 ++- include/linux/vhost_iotlb.h | 2 ++ 2 files changed, 20 insertions(+)

[RFC PATCH 07/24] vdpa: add the missing comment for nvqs in struct vdpa_device

2020-09-23 Thread Jason Wang
Signed-off-by: Jason Wang --- include/linux/vdpa.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index eae0bfd87d91..df169c2f5c0f 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -42,6 +42,7 @@ struct vdpa_vq_state { * @config: th

[RFC PATCH 09/24] vdpa: multiple address spaces support

2020-09-23 Thread Jason Wang
This patches introduces the multiple address spaces support for vDPA device. This idea is to identify a specific address space via an dedicated identifier - ASID. During vDPA device allocation, vDPA device driver needs to report the number of address spaces supported by the device then the DMA map

[RFC PATCH 06/24] vhost-vdpa: switch to use vhost-vdpa specific IOTLB

2020-09-23 Thread Jason Wang
To ease the implementation of per group ASID support for vDPA device. This patch switches to use a vhost-vdpa specific IOTLB to avoid the unnecessary refactoring of the vhost core. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 14 -- 1 file changed, 8 insertions(+), 6 deletion

[RFC PATCH 08/24] vdpa: introduce virtqueue groups

2020-09-23 Thread Jason Wang
This patch introduces virtqueue groups to vDPA device. The virtqueue group is the minimal set of virtqueues that must share an address space. And the adddress space identifier could only be attached to a specific virtqueue group. A new mandated bus operation is introduced to get the virtqueue grou

[RFC PATCH 03/24] vhost: move the backend feature bits to vhost_types.h

2020-09-23 Thread Jason Wang
We should store feature bits in vhost_types.h as what has been done for e.g VHOST_F_LOG_ALL. Signed-off-by: Jason Wang --- include/uapi/linux/vhost.h | 5 - include/uapi/linux/vhost_types.h | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/vho

[RFC PATCH 02/24] vhost-vdpa: fix vqs leak in vhost_vdpa_open()

2020-09-23 Thread Jason Wang
We need to free vqs during the err path after it has been allocated since vhost won't do that for us. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 796fe979f997.

[RFC PATCH 00/24] Control VQ support in vDPA

2020-09-23 Thread Jason Wang
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue

[RFC PATCH 01/24] vhost-vdpa: fix backend feature ioctls

2020-09-23 Thread Jason Wang
Commit 653055b9acd4 ("vhost-vdpa: support get/set backend features") introduces two malfunction backend features ioctls: 1) the ioctls was blindly added to vring ioctl instead of vdpa device ioctl 2) vhost_set_backend_features() was called when dev mutex has already been held which will lead

[RFC PATCH 04/24] virtio-vdpa: don't set callback if virtio doesn't need it

2020-09-23 Thread Jason Wang
There's no need for setting callbacks for the driver that doesn't care about that. Signed-off-by: Jason Wang --- drivers/virtio/virtio_vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c index 4a9ddb44b2a7..af6ee6

[RFC PATCH 05/24] vhost-vdpa: passing iotlb to IOMMU mapping helpers

2020-09-23 Thread Jason Wang
To prepare for the ASID support for vhost-vdpa, try to pass IOTLB object to dma helpers. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c i

[PATCH bpf-next v3 1/2] bpf: Add bpf_ktime_get_real_ns

2020-09-23 Thread bimmy . pujari
From: Bimmy Pujari The existing bpf helper functions to get timestamp return the time elapsed since system boot. This timestamp is not particularly useful where epoch timestamp is required or more than one server is involved and time sync is required. Instead, you want to use CLOCK_REALTIME, whic

[PATCH bpf-next v3 2/2] selftests/bpf: Verifying real time helper function

2020-09-23 Thread bimmy . pujari
From: Bimmy Pujari Test xdping measures RTT from xdp using monotonic time helper. Extending xdping test to use real time helper function in order to verify this helper function. Signed-off-by: Bimmy Pujari --- .../testing/selftests/bpf/progs/xdping_kern.c | 183 + .../testing/s

RE: [PATCH bpf-next v2 1/2] bpf: Add bpf_ktime_get_real_ns

2020-09-23 Thread Pujari, Bimmy
-Original Message- From: David Ahern Sent: Wednesday, September 23, 2020 7:19 PM To: Maciej Żenczykowski ; Pujari, Bimmy Cc: bpf ; Linux NetDev ; mche...@kernel.org; Alexei Starovoitov ; Daniel Borkmann ; Martin Lau ; Nikravesh, Ashkan Subject: Re: [PATCH bpf-next v2 1/2] bpf: Add

[net] net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3

2020-09-23 Thread Xiaoliang Yang
INIT_IPS and GATE_ENABLE fields have a wrong offset in SG_CONFIG_REG_3. This register is used by stream gate control of PSFP, and it has not been used before, because PSFP is not implemented in ocelot driver. Signed-off-by: Xiaoliang Yang --- include/soc/mscc/ocelot_ana.h | 8 1 file ch

Re: [PATCH bpf-next v2 1/2] bpf: Add bpf_ktime_get_real_ns

2020-09-23 Thread David Ahern
On 9/23/20 7:19 PM, Maciej Żenczykowski wrote: >> diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c >> index 5cc7425ee476..776ff58f969d 100644 >> --- a/kernel/bpf/helpers.c >> +++ b/kernel/bpf/helpers.c >> @@ -155,6 +155,17 @@ const struct bpf_func_proto bpf_ktime_get_ns_proto = { >>

Re: [PATCH net-next] net: mscc: ocelot: always pass skb clone to ocelot_port_add_txtstamp_skb

2020-09-23 Thread Richard Cochran
On Wed, Sep 23, 2020 at 02:24:20PM +0300, Vladimir Oltean wrote: > Currently, ocelot switchdev passes the skb directly to the function that > enqueues it to the list of skb's awaiting a TX timestamp. Whereas the > felix DSA driver first clones the skb, then passes the clone to this > queue. > > Th

RE: [net-next] net: dsa: felix: convert TAS link speed based on phylink speed

2020-09-23 Thread Xiaoliang Yang
On Tue, Sep 22, 2020 at 19:37, Vladimir Oltean wrote: > > Hi Xiaoliang, > > On Tue, Sep 22, 2020 at 06:43:02PM +0800, Xiaoliang Yang wrote: > > state->speed holds a value of 10, 100, 1000 or 2500, but > > QSYS_TAG_CONFIG_LINK_SPEED expects a value of 0, 1, 2, 3. So convert > > the speed to a pr

[net] net: dsa: felix: convert TAS link speed based on phylink speed

2020-09-23 Thread Xiaoliang Yang
state->speed holds a value of 10, 100, 1000 or 2500, but QSYS_TAG_CONFIG_LINK_SPEED expects a value of 0, 1, 2, 3. So convert the speed to a proper value. Fixes: de143c0e274b ("net: dsa: felix: Configure Time-Aware Scheduler via taprio offload") Signed-off-by: Xiaoliang Yang Reviewed-by: Vladimi

[PATCH v4 bpf-next 3/3] selftests/bpf: add raw_tp_test_run

2020-09-23 Thread Song Liu
This test runs test_run for raw_tracepoint program. The test covers ctx input, retval output, and running on correct cpu. Signed-off-by: Song Liu --- .../bpf/prog_tests/raw_tp_test_run.c | 79 +++ .../bpf/progs/test_raw_tp_test_run.c | 25 ++ 2 files changed

[PATCH v4 bpf-next 0/3] enable BPF_PROG_TEST_RUN for raw_tp

2020-09-23 Thread Song Liu
This set enables BPF_PROG_TEST_RUN for raw_tracepoint type programs. This set also enables running the raw_tp program on a specific CPU. This feature can be used by user space to trigger programs that access percpu resources, e.g. perf_event, percpu variables. Changes v3 => v4: 1. Use cpu+flags in

Re: ip rule iif oif and vrf

2020-09-23 Thread David Ahern
On 9/23/20 5:50 PM, Stephen Suryaputra wrote: > > I have a reproducer using namespaces attached in this email (gre_setup.sh). Thanks for the script. Very helpful. Interesting setup. # +---+ +--+ +--+ +---+ # | h0| |r0| |r1| |h1 |

Re: [PATCH net-next] net: mscc: ocelot: always pass skb clone to ocelot_port_add_txtstamp_skb

2020-09-23 Thread Horatiu Vultur
The 09/23/2020 20:45, Vladimir Oltean wrote: > > On Wed, Sep 23, 2020 at 10:35:30PM +0200, Horatiu Vultur wrote: > > The 09/23/2020 20:22, Vladimir Oltean wrote: > > > On Wed, Sep 23, 2020 at 10:08:00PM +0200, Horatiu Vultur wrote: > > > > The 09/23/2020 14:24, Vladimir Oltean wrote: > > > > > +

[PATCH v4 bpf-next 1/3] bpf: enable BPF_PROG_TEST_RUN for raw_tracepoint

2020-09-23 Thread Song Liu
Add .test_run for raw_tracepoint. Also, introduce a new feature that runs the target program on a specific CPU. This is achieved by a new flag in bpf_attr.test, BPF_F_TEST_RUN_ON_CPU. When this flag is set, the program is triggered on cpu with id bpf_attr.test.cpu. This feature is needed for BPF pr

[PATCH v4 bpf-next 2/3] libbpf: support test run of raw tracepoint programs

2020-09-23 Thread Song Liu
Add bpf_prog_test_run_opts() with support of new fields in bpf_attr.test, namely, flags and cpu. Also extend _opts operations to support outputs via opts. Signed-off-by: Song Liu --- tools/lib/bpf/bpf.c | 31 +++ tools/lib/bpf/bpf.h | 26 ++

Re: [PATCH v2 bpf-next 2/3] libbpf: introduce bpf_prog_test_run_xattr_opts

2020-09-23 Thread Song Liu
> On Sep 23, 2020, at 6:11 PM, Andrii Nakryiko > wrote: > > On Wed, Sep 23, 2020 at 4:54 PM Song Liu wrote: >> >> >> >>> On Sep 23, 2020, at 12:31 PM, Andrii Nakryiko >>> wrote: >>> >>> On Wed, Sep 23, 2020 at 9:55 AM Song Liu wrote: This API supports new field cpu_plus in

Re: [PATCH bpf-next v8 11/11] selftests: Remove fmod_ret from benchmarks and test_overhead

2020-09-23 Thread Andrii Nakryiko
On Wed, Sep 23, 2020 at 6:08 PM Alexei Starovoitov wrote: > > On Tue, Sep 22, 2020 at 08:38:45PM +0200, Toke Høiland-Jørgensen wrote: > > -const struct bench bench_trig_fmodret = { > > - .name = "trig-fmodret", > > - .validate = trigger_validate, > > - .setup = trigger_fmodret_setup, >

[PATCH net] hinic: fix wrong return value of mac-set cmd

2020-09-23 Thread Luo bin
It should also be regarded as an error when hw return status=4 for PF's setting mac cmd. Only if PF return status=4 to VF should this cmd be taken special treatment. Fixes: 7dd29ee12865 ("hinic: add sriov feature support") Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_port.c

Re: [PATCH net] hinic: fix wrong return value of mac-set cmd

2020-09-23 Thread luobin (L)
On 2020/9/24 8:43, David Miller wrote: > From: Luo bin > Date: Tue, 22 Sep 2020 19:26:43 +0800 > >> It should also be regarded as an error when hw return status=4 for PF's >> setting mac cmd. Only if PF return status=4 to VF should this cmd be >> taken special treatment. >> >> Signed-off-by: Luo

Re: [PATCH net-next v3 0/2] net: dsa: b53: Configure VLANs while not filtering

2020-09-23 Thread David Miller
From: Florian Fainelli Date: Wed, 23 Sep 2020 14:40:36 -0700 > These two patches allow the b53 driver which always configures its CPU > port as egress tagged to behave correctly with VLANs being always > configured whenever a port is added to a bridge. > > Vladimir provides a patch that aligns t

Re: [PATCH v2 bpf-next 2/3] libbpf: introduce bpf_prog_test_run_xattr_opts

2020-09-23 Thread Andrii Nakryiko
On Wed, Sep 23, 2020 at 4:54 PM Song Liu wrote: > > > > > On Sep 23, 2020, at 12:31 PM, Andrii Nakryiko > > wrote: > > > > On Wed, Sep 23, 2020 at 9:55 AM Song Liu wrote: > >> > >> This API supports new field cpu_plus in bpf_attr.test. > >> > >> Acked-by: John Fastabend > >> Signed-off-by: Son

Re: [PATCH] net: mdio: Remove redundant parameter and check

2020-09-23 Thread David Miller
From: Tang Bin Date: Wed, 23 Sep 2020 18:05:32 +0800 > @@ -125,12 +124,9 @@ ipq8064_mdio_probe(struct platform_device *pdev) > return PTR_ERR(priv->base); > } > > - ret = of_mdiobus_register(bus, np); > - if (ret) > - return ret; > - > platform_set_

Re: [PATCH net-next v2 3/3] dpaa2-mac: add PCS support through the Lynx module

2020-09-23 Thread Andrew Lunn
> +static int dpaa2_pcs_create(struct dpaa2_mac *mac, > + struct device_node *dpmac_node, int id) > +{ > + struct mdio_device *mdiodev; > + struct device_node *node; > + > + node = of_parse_phandle(dpmac_node, "pcs-handle", 0); > + if (!node) { > +

Re: [PATCH v1 net] net: stmmac: removed enabling eee in EEE set callback

2020-09-23 Thread David Miller
From: Voon Weifeng Date: Wed, 23 Sep 2020 16:56:14 +0800 > EEE should be only be enabled during stmmac_mac_link_up() when the > link are up and being set up properly. set_eee should only do settings > configuration and disabling the eee. > > Without this fix, turning on EEE using ethtool will re

[MPTCP][PATCH net-next 16/16] mptcp: retransmit ADD_ADDR when timeout

2020-09-23 Thread Geliang Tang
This patch implemented the retransmition of ADD_ADDR when no ADD_ADDR echo is received. It added a timer with the announced address. When timeout occurs, ADD_ADDR will be retransmitted. Suggested-by: Mat Martineau Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang ---

Re: [PATCH bpf-next v8 11/11] selftests: Remove fmod_ret from benchmarks and test_overhead

2020-09-23 Thread Alexei Starovoitov
On Tue, Sep 22, 2020 at 08:38:45PM +0200, Toke Høiland-Jørgensen wrote: > -const struct bench bench_trig_fmodret = { > - .name = "trig-fmodret", > - .validate = trigger_validate, > - .setup = trigger_fmodret_setup, > - .producer_thread = trigger_producer, > - .consumer_thread =

Re: [PATCH net-next v2 1/3] net: pcs-lynx: add support for 10GBASER

2020-09-23 Thread Andrew Lunn
On Wed, Sep 23, 2020 at 06:41:21PM +0300, Ioana Ciornei wrote: > Add support in the Lynx PCS module for the 10GBASE-R mode which is only > used to get the link state, since it offers a single fixed speed. > > Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next v2 2/3] of: add of_mdio_find_device() api

2020-09-23 Thread Andrew Lunn
On Wed, Sep 23, 2020 at 06:41:22PM +0300, Ioana Ciornei wrote: > From: Russell King > > Add a helper function which finds the mdio_device structure given a > device tree node. This is helpful for finding the PCS device based on a > DTS node but managing it as a mdio_device instead of a phy_device

[MPTCP][PATCH net-next 15/16] mptcp: add sk_stop_timer_sync helper

2020-09-23 Thread Geliang Tang
This patch added a new helper sk_stop_timer_sync, it deactivates a timer like sk_stop_timer, but waits for the handler to finish. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- include/net/sock.h | 2 ++ net/core/sock.c| 7 +++ 2 files changed, 9 insertions(+) diff --git a/inclu

Re: [PATCH net-next] tipc: potential memory corruption in tipc_crypto_key_rcv()

2020-09-23 Thread David Miller
From: Dan Carpenter Date: Wed, 23 Sep 2020 11:30:17 +0300 > This code uses "skey->keylen" as an memcpy() size and then checks that > it is valid on the next line. The other problem is that the check has > a potential integer overflow, it's better to use struct_size() for this. > > Fixes: 23700d

Re: [PATCH bpf-next v8 05/11] bpf: support attaching freplace programs to multiple attach points

2020-09-23 Thread Alexei Starovoitov
On Tue, Sep 22, 2020 at 08:38:39PM +0200, Toke Høiland-Jørgensen wrote: > + > + if (tgt_prog_fd) { > + /* For now we only allow new targets for BPF_PROG_TYPE_EXT */ > + if (prog->type != BPF_PROG_TYPE_EXT) { > + err = -EINVAL; > +

[MPTCP][PATCH net-next 14/16] mptcp: add struct mptcp_pm_add_entry

2020-09-23 Thread Geliang Tang
Add a new struct mptcp_pm_add_entry to describe add_addr's entry. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/pm_netlink.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index b33aebd85

Re: [PATCH net-next v2 0/2] PHY subsystem kernel doc

2020-09-23 Thread David Miller
From: Andrew Lunn Date: Wed, 23 Sep 2020 00:29:01 +0200 > The first patches fix existing warnings in the kerneldoc for the PHY > subsystem, and then the 2nd extend the kernel documentation for the > major structures and functions in the PHY subsystem. > > v2: > Drop the other fixes which have al

Re: [PATCH v2] net: lantiq: Add locking for TX DMA channel

2020-09-23 Thread David Miller
From: Hauke Mehrtens Date: Tue, 22 Sep 2020 23:41:12 +0200 > The TX DMA channel data is accessed by the xrx200_start_xmit() and the > xrx200_tx_housekeeping() function from different threads. Make sure the > accesses are synchronized by acquiring the netif_tx_lock() in the > xrx200_tx_housekeepin

[MPTCP][PATCH net-next 13/16] selftests: mptcp: add remove addr and subflow test cases

2020-09-23 Thread Geliang Tang
This patch added the remove addr and subflow test cases and two new functions. The first function run_remove_tests calls do_transfer with two new arguments, rm_nr_ns1 and rm_nr_ns2, for the numbers of addresses should be removed during the transfer process in namespace 1 and namespace 2. If both

[MPTCP][PATCH net-next 12/16] selftests: mptcp: add remove cfg in mptcp_connect

2020-09-23 Thread Geliang Tang
This patch added a new cfg, named cfg_remove in mptcp_connect. This new cfg_remove is copied from cfg_join. The only difference between them is in the do_rnd_write function. Here we slow down the transfer process of all data to let the RM_ADDR suboption can be sent and received completely. Otherwis

[MPTCP][PATCH net-next 11/16] mptcp: add mptcp_destroy_common helper

2020-09-23 Thread Geliang Tang
This patch added a new helper named mptcp_destroy_common containing the shared code between mptcp_destroy() and mptcp_sock_destruct(). Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/protocol.c | 11 --- net/mptcp/protocol.h | 1 + net/mptcp/subflow.c | 4 +--- 3

[MPTCP][PATCH net-next 10/16] mptcp: add RM_ADDR related mibs

2020-09-23 Thread Geliang Tang
This patch added two new mibs for RM_ADDR, named MPTCP_MIB_RMADDR and MPTCP_MIB_RMSUBFLOW, when the RM_ADDR suboption is received, increase the first mib counter, when the local subflow is removed, increase the second mib counter. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested

[MPTCP][PATCH net-next 09/16] mptcp: implement mptcp_pm_remove_subflow

2020-09-23 Thread Geliang Tang
This patch implemented the local subflow removing function, mptcp_pm_remove_subflow, it simply called mptcp_pm_nl_rm_subflow_received under the PM spin lock. We use mptcp_pm_remove_subflow to remove a local subflow, so change it's argument from remote_id to local_id. We check subflow->local_id in

Re: [PATCH net-next 0/2] net: dsa: bcm_sf2: Additional DT changes

2020-09-23 Thread David Miller
From: Florian Fainelli Date: Tue, 22 Sep 2020 13:03:54 -0700 > This patch series includes some additional changes to the bcm_sf2 in > order to support the Device Tree firmwares provided on such platforms. Series applied, thanks Florian.

[MPTCP][PATCH net-next 08/16] mptcp: remove addr and subflow in PM netlink

2020-09-23 Thread Geliang Tang
This patch implements the remove announced addr and subflow logic in PM netlink. When the PM netlink removes an address, we traverse all the existing msk sockets to find the relevant sockets. We add a new list named anno_list in mptcp_pm_data, to record all the announced addrs. In the traversing,

[MPTCP][PATCH net-next 07/16] mptcp: add accept_subflow re-check

2020-09-23 Thread Geliang Tang
The re-check of pm->accept_subflow with pm->lock held was missing, this patch fixed it. Suggested-by: Mat Martineau Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang --- net/mptcp/pm.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/mptcp/pm.c b/net/mptc

Re: [PATCH] net: switchdev: Fixed kerneldoc warning

2020-09-23 Thread David Miller
From: Tian Tao Date: Tue, 22 Sep 2020 21:32:19 +0800 > Update kernel-doc line comments to fix warnings reported by make W=1. > net/switchdev/switchdev.c:413: warning: Function parameter or > member 'extack' not described in 'call_switchdev_notifiers' > > Signed-off-by: Tian Tao Applied.

Re: [net-next PATCH 0/2] Add support for VLAN based flow distribution

2020-09-23 Thread David Miller
From: George Cherian Date: Tue, 22 Sep 2020 18:37:25 +0530 > This series add support for VLAN based flow distribution for octeontx2 > netdev driver. This adds support for configuring the same via ethtool. > > Following tests have been done. > - Multi VLAN flow with same SD > - Multi

[MPTCP][PATCH net-next 06/16] selftests: mptcp: add ADD_ADDR mibs check function

2020-09-23 Thread Geliang Tang
This patch added the ADD_ADDR related mibs counter check function chk_add_nr(). This function check both ADD_ADDR and ADD_ADDR with echo flag. The output looks like this: 07 unused signal address syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - e

[MPTCP][PATCH net-next 05/16] mptcp: add ADD_ADDR related mibs

2020-09-23 Thread Geliang Tang
This patch added two mibs for ADD_ADDR, MPTCP_MIB_ADDADDR for receiving of the ADD_ADDR suboption with echo-flag=0, and MPTCP_MIB_ECHOADD for receiving the ADD_ADDR suboption with echo-flag=1. Reviewed-by: Mat Martineau Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Geli

Re: [PATCH net] hinic: fix wrong return value of mac-set cmd

2020-09-23 Thread David Miller
From: Luo bin Date: Tue, 22 Sep 2020 19:26:43 +0800 > It should also be regarded as an error when hw return status=4 for PF's > setting mac cmd. Only if PF return status=4 to VF should this cmd be > taken special treatment. > > Signed-off-by: Luo bin Bug fixes require a proper Fixes: tag. Ple

Re: [PATCH 1/3] net: fix a new kernel-doc warning at dev.c

2020-09-23 Thread David Miller
From: Mauro Carvalho Chehab Date: Tue, 22 Sep 2020 13:22:52 +0200 > kernel-doc expects the function prototype to be just after > the kernel-doc markup, as otherwise it will get it all wrong: > > ./net/core/dev.c:10036: warning: Excess function parameter 'dev' > description in 'WAIT_REFS_M

[MPTCP][PATCH net-next 04/16] mptcp: send out ADD_ADDR with echo flag

2020-09-23 Thread Geliang Tang
When the ADD_ADDR suboption has been received, we need to send out the same ADD_ADDR suboption with echo-flag=1, and no HMAC. Suggested-by: Mat Martineau Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang --- net/mptcp/options.c| 27 --- net/mptcp/pm.c |

Re: [PATCH v5 0/2] net: mdio-ipq4019: add Clause 45 support

2020-09-23 Thread David Miller
From: Robert Marko Date: Tue, 22 Sep 2020 12:16:30 +0200 > This patch series adds support for Clause 45 to the driver. > > While at it also change some defines to upper case to match rest of the > driver. > > Changes since v4: > * Rebase onto net-next.git > > Changes since v1: > * Drop clock

Re: [PATCH net] Revert "ravb: Fixed to be able to unload modules"

2020-09-23 Thread David Miller
From: Geert Uytterhoeven Date: Tue, 22 Sep 2020 09:29:31 +0200 > This reverts commit 1838d6c62f57836639bd3d83e7855e0ee4f6defc. > > This commit moved the ravb_mdio_init() call (and thus the > of_mdiobus_register() call) from the ravb_probe() to the ravb_open() > call. This causes a regression du

[MPTCP][PATCH net-next 03/16] mptcp: add the incoming RM_ADDR support

2020-09-23 Thread Geliang Tang
This patch added the RM_ADDR option parsing logic: We parsed the incoming options to find if the rm_addr option is received, and called mptcp_pm_rm_addr_received to schedule PM work to a new status, named MPTCP_PM_RM_ADDR_RECEIVED. PM work got this status, and called mptcp_pm_nl_rm_addr_received

  1   2   3   4   >