Re: [PATCH] net: sched: tapr: remove WARN_ON() in taprio_get_start_time()

2021-04-14 Thread Eric Dumazet
On 4/15/21 8:39 AM, Du Cheng wrote: > There is a reproducible sequence from the userland that will trigger a > WARN_ON() > condition in taprio_get_start_time, which causes kernel to panic if configured > as "panic_on_warn". Remove this WARN_ON() to prevent kernel from crashing by > userland-ini

Re: [PATCH net v2] net: core: make napi_disable more robust

2021-04-14 Thread Eric Dumazet
On 4/14/21 10:08 AM, Lijun Pan wrote: > There are chances that napi_disable can be called twice by NIC driver. > This could generate deadlock. For example, > the first napi_disable will spin until NAPI_STATE_SCHED is cleared > by napi_complete_done, then set it again. > When napi_disable is call

Re: [PATCH net v2] net: core: make napi_disable more robust

2021-04-14 Thread Eric Dumazet
On 4/15/21 1:21 AM, Jakub Kicinski wrote: > On Wed, 14 Apr 2021 03:08:45 -0500 Lijun Pan wrote: >> There are chances that napi_disable can be called twice by NIC driver. >> This could generate deadlock. For example, >> the first napi_disable will spin until NAPI_STATE_SCHED is cleared >> by napi

Re: [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA

2021-04-14 Thread Zhu Lingshan
On 4/15/2021 2:31 PM, Jason Wang wrote: 在 2021/4/15 下午1:55, Zhu Lingshan 写道: On 4/15/2021 11:34 AM, Jason Wang wrote: 在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-block for vDPA. Signed-off-by: Zhu Lingshan ---   drivers/vdpa/ifcvf/ifcv

[PATCH] net: sched: tapr: remove WARN_ON() in taprio_get_start_time()

2021-04-14 Thread Du Cheng
There is a reproducible sequence from the userland that will trigger a WARN_ON() condition in taprio_get_start_time, which causes kernel to panic if configured as "panic_on_warn". Remove this WARN_ON() to prevent kernel from crashing by userland-initiated syscalls. Reported as bug on syzkaller: ht

Re: [PATCH net-next 6/6] mlx5: implement ethtool::get_fec_stats

2021-04-14 Thread Saeed Mahameed
On Tue, 2021-04-13 at 20:44 -0700, Jakub Kicinski wrote: > Report corrected bits. > > Signed-off-by: Jakub Kicinski > --- >  .../ethernet/mellanox/mlx5/core/en_ethtool.c  |  9 ++ >  .../ethernet/mellanox/mlx5/core/en_stats.c    | 28 > +-- >   > -#define MLX5E_READ_CTR64_BE_F(p

Re: [PATCH 1/3] vDPA/ifcvf: deduce VIRTIO device ID when probe

2021-04-14 Thread Zhu Lingshan
On 4/15/2021 2:30 PM, Jason Wang wrote: 在 2021/4/15 下午1:52, Zhu Lingshan 写道: On 4/15/2021 11:30 AM, Jason Wang wrote: 在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit deduces VIRTIO device ID as device type when probe, then ifcvf_vdpa_get_device_id() can simply return the ID. ifcvf_vdpa

Re: [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA

2021-04-14 Thread Jason Wang
在 2021/4/15 下午1:55, Zhu Lingshan 写道: On 4/15/2021 11:34 AM, Jason Wang wrote: 在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-block for vDPA. Signed-off-by: Zhu Lingshan ---   drivers/vdpa/ifcvf/ifcvf_base.h | 17 -   drivers/v

Re: [PATCH 1/3] vDPA/ifcvf: deduce VIRTIO device ID when probe

2021-04-14 Thread Jason Wang
在 2021/4/15 下午1:52, Zhu Lingshan 写道: On 4/15/2021 11:30 AM, Jason Wang wrote: 在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit deduces VIRTIO device ID as device type when probe, then ifcvf_vdpa_get_device_id() can simply return the ID. ifcvf_vdpa_get_features() and ifcvf_vdpa_get_config_s

Re: [PATCH v2 3/6] dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers

2021-04-14 Thread Aswath Govindraju
Hi Marc, On 14/04/21 9:03 pm, Marc Kleine-Budde wrote: > On 14.04.2021 19:35:18, Aswath Govindraju wrote: >> Add binding documentation for TI TCAN104x CAN transceivers. >> >> Signed-off-by: Aswath Govindraju >> --- >> .../bindings/phy/ti,tcan104x-can.yaml | 56 +++ >> MAI

Re: [PATCH net-next 3/6] ethtool: add FEC statistics

2021-04-14 Thread Saeed Mahameed
On Tue, 2021-04-13 at 20:44 -0700, Jakub Kicinski wrote: > ethtool_link_ksettings *); > +   void(*get_fec_stats)(struct net_device *dev, > +    struct ethtool_fec_stats > *fec_stats); why void ? some drivers need to access the FW and it could be an old FW/device

Re: [RFC net-next 4/6] ethtool: add interface to read standard MAC stats

2021-04-14 Thread Saeed Mahameed
On Wed, 2021-04-14 at 13:23 -0700, Jakub Kicinski wrote: > Most of the MAC statistics are included in > struct rtnl_link_stats64, but some fields > are aggregated. Besides it's good to expose > these clearly hardware stats separately. > > Signed-off-by: Jakub Kicinski > --- >  include/linux/ethto

Re: [PATCH net-next] r8169: add support for pause ethtool ops

2021-04-14 Thread Heiner Kallweit
On 15.04.2021 01:12, Jakub Kicinski wrote: > On Wed, 14 Apr 2021 08:23:15 +0200 Heiner Kallweit wrote: >> This adds support for the [g|s]et_pauseparam ethtool ops. It considers >> that the chip doesn't support pause frame use in jumbo mode. > > what happens if the MTU is changed afterwards? > Th

Re: [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA

2021-04-14 Thread Zhu Lingshan
On 4/15/2021 11:34 AM, Jason Wang wrote: 在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-block for vDPA. Signed-off-by: Zhu Lingshan ---   drivers/vdpa/ifcvf/ifcvf_base.h | 17 -   drivers/vdpa/ifcvf/ifcvf_main.c | 10 +-

Re: [PATCH 1/3] vDPA/ifcvf: deduce VIRTIO device ID when probe

2021-04-14 Thread Zhu Lingshan
On 4/15/2021 11:30 AM, Jason Wang wrote: 在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit deduces VIRTIO device ID as device type when probe, then ifcvf_vdpa_get_device_id() can simply return the ID. ifcvf_vdpa_get_features() and ifcvf_vdpa_get_config_size() can work properly based on the de

Re: [RFC net-next 0/6] ethtool: add uAPI for reading standard stats

2021-04-14 Thread Saeed Mahameed
On Wed, 2021-04-14 at 13:23 -0700, Jakub Kicinski wrote: > This series adds a new ethtool command to read well defined > device statistics. There is nothing clever here, just a netlink > API for dumping statistics defined by standards and RFCs which > today end up in ethtool -S under infinite varia

Re: Re: [PATCH v6 10/10] Documentation: Add documentation for VDUSE

2021-04-14 Thread Yongji Xie
On Wed, Apr 14, 2021 at 10:15 PM Stefan Hajnoczi wrote: > > On Wed, Mar 31, 2021 at 04:05:19PM +0800, Xie Yongji wrote: > > VDUSE (vDPA Device in Userspace) is a framework to support > > implementing software-emulated vDPA devices in userspace. This > > document is intended to clarify the VDUSE de

RE: [net-next] enetc: fix locking for one-step timestamping packet transfer

2021-04-14 Thread Y.b. Lu
> -Original Message- > From: Jakub Kicinski > Sent: 2021年4月15日 0:36 > To: Y.b. Lu > Cc: netdev@vger.kernel.org; David S . Miller ; Richard > Cochran ; Claudiu Manoil > ; Vladimir Oltean ; > Russell King > Subject: Re: [net-next] enetc: fix locking for one-step timestamping packet > tra

[net-next] enetc: convert to schedule_work()

2021-04-14 Thread Yangbo Lu
Convert system_wq queue_work() to schedule_work() which is a wrapper around it, since the former is a rare construct. Fixes: 7294380c5211 ("enetc: support PTP Sync packet one-step timestamping") Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- 1 file changed, 1 i

Re: [PATCH net v2] i40e: fix the panic when running bpf in xdpdrv mode

2021-04-14 Thread Jason Xing
On Thu, Apr 15, 2021 at 10:08 AM Jesse Brandeburg wrote: > > Jason Xing wrote: > > > On Wed, Apr 14, 2021 at 12:27 AM Jesse Brandeburg > > wrote: > > > > > > kerneljasonx...@gmail.com wrote: > > > > > > > From: Jason Xing > > > > > > Hi Jason, > > > > > > Sorry, I missed this on the first time:

Re: [RFC Patch bpf-next] bpf: introduce bpf timer

2021-04-14 Thread Alexei Starovoitov
On Wed, Apr 14, 2021 at 9:02 PM Cong Wang wrote: > > On Mon, Apr 12, 2021 at 4:01 PM Alexei Starovoitov > wrote: > > > > On Mon, Apr 05, 2021 at 05:36:27PM -0700, Cong Wang wrote: > > > On Fri, Apr 2, 2021 at 4:45 PM Alexei Starovoitov > > > wrote: > > > > > > > > On Fri, Apr 02, 2021 at 02:24:5

RE: [PATCH net-next] skbuff: revert "skbuff: remove some unnecessary operation in skb_segment_list()"

2021-04-14 Thread Dongseok Yi
On Thu, Apr 15, 2021 at 10:23:17AM +0800, Yunsheng Lin wrote: > On 2021/4/14 18:48, Paolo Abeni wrote: > > the commit 1ddc3229ad3c ("skbuff: remove some unnecessary operation > > in skb_segment_list()") introduces an issue very similar to the > > one already fixed by commit 53475c5dd856 ("net: fix

Re: [PATCH] net: fix a concurrency bug in l2tp_tunnel_register()

2021-04-14 Thread Cong Wang
On Wed, Apr 14, 2021 at 2:14 PM Sishuai Gong wrote: > > l2tp_tunnel_register() registers a tunnel without fully > initializing its attribute. This can allow another kernel thread > running l2tp_xmit_core() to access the uninitialized data and > then cause a kernel NULL pointer dereference error, a

Re: [RFC Patch bpf-next] bpf: introduce bpf timer

2021-04-14 Thread Cong Wang
On Mon, Apr 12, 2021 at 4:01 PM Alexei Starovoitov wrote: > > On Mon, Apr 05, 2021 at 05:36:27PM -0700, Cong Wang wrote: > > On Fri, Apr 2, 2021 at 4:45 PM Alexei Starovoitov > > wrote: > > > > > > On Fri, Apr 02, 2021 at 02:24:51PM -0700, Cong Wang wrote: > > > > > > where the key is the timer I

Re: [PATCH 3/3] vDPA/ifcvf: get_config_size should return dev specific config size

2021-04-14 Thread Jason Wang
在 2021/4/14 下午5:18, Zhu Lingshan 写道: get_config_size() should return the size based on the decected device type. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_main.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH] net: fix a data race when get vlan device

2021-04-14 Thread zhudi
From: Di Zhu We encountered a crash: in the packet receiving process, we got an illegal VLAN device address, but the VLAN device address saved in vmcore is correct. After checking the code, we found a possible data competition: CPU 0: CPU 1: (RCU read lock)

Re: [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA

2021-04-14 Thread Jason Wang
在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-block for vDPA. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_base.h | 17 - drivers/vdpa/ifcvf/ifcvf_main.c | 10 +- 2 files changed, 25 insertions(+), 2 delet

[PATCH RESEND net-next] net: Make tcp_allowed_congestion_control readonly in non-init netns

2021-04-14 Thread Jonathon Reinhart
Currently, tcp_allowed_congestion_control is global and writable; writing to it in any net namespace will leak into all other net namespaces. tcp_available_congestion_control and tcp_allowed_congestion_control are the only sysctls in ipv4_net_table (the per-netns sysctl table) with a NULL data poi

Re: [PATCH 1/3] vDPA/ifcvf: deduce VIRTIO device ID when probe

2021-04-14 Thread Jason Wang
在 2021/4/14 下午5:18, Zhu Lingshan 写道: This commit deduces VIRTIO device ID as device type when probe, then ifcvf_vdpa_get_device_id() can simply return the ID. ifcvf_vdpa_get_features() and ifcvf_vdpa_get_config_size() can work properly based on the device ID. Signed-off-by: Zhu Lingshan ---

Re: [PATCH v3 net-next] net: multipath routing: configurable seed

2021-04-14 Thread David Ahern
On 4/14/21 12:33 AM, Pavel Balaev wrote: >> >> This should work the same for IPv6. > I wanted to add IPv6 support after IPv4 will be approved, > anyway no problem, will add IPv6 in next version >> And please add test cases under tools/testing/selftests/net. > This feature cannot be tested whithin

Re: [PATCH v2 net-next 9/9] net: korina: Make driver COMPILE_TESTable

2021-04-14 Thread kernel test robot
Hi Thomas, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Thomas-Bogendoerfer/net-Korina-improvements/20210414-233326 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git

Re: [PATCHv7 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-14 Thread Hangbin Liu
On Wed, Apr 14, 2021 at 05:17:11PM -0700, Martin KaFai Lau wrote: > > static void bq_xmit_all(struct xdp_dev_bulk_queue *bq, u32 flags) > > { > > struct net_device *dev = bq->dev; > > - int sent = 0, err = 0; > > + int sent = 0, drops = 0, err = 0; > > + unsigned int cnt = bq->count; >

Re: [PATCH net-next] skbuff: revert "skbuff: remove some unnecessary operation in skb_segment_list()"

2021-04-14 Thread Yunsheng Lin
On 2021/4/14 18:48, Paolo Abeni wrote: > the commit 1ddc3229ad3c ("skbuff: remove some unnecessary operation > in skb_segment_list()") introduces an issue very similar to the > one already fixed by commit 53475c5dd856 ("net: fix use-after-free when > UDP GRO with shared fraglist"). > > If the GSO

Re: [PATCHv7 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-14 Thread Hangbin Liu
On Wed, Apr 14, 2021 at 05:23:50PM -0700, Martin KaFai Lau wrote: > On Wed, Apr 14, 2021 at 08:26:08PM +0800, Hangbin Liu wrote: > [ ... ] > > > +static __always_inline int __bpf_xdp_redirect_map(struct bpf_map *map, u32 > > ifindex, > > + u64 flags, u6

[PATCH RESEND net-next 1/2] net: hns3: PF add support for pushing link status to VFs

2021-04-14 Thread Huazhong Tan
From: Guangbin Huang Previously, VF updates its link status every second by send query command to PF in periodic service task. If link stats of PF is changed, VF may need at most one second to update its link status. To reduce delay of link status between PF and VFs, PF actively push its link st

[PATCH RESEND net-next 0/2] net: hns3: updates for -next

2021-04-14 Thread Huazhong Tan
This series adds support for pushing link status to VFs for the HNS3 ethernet driver. Guangbin Huang (2): net: hns3: PF add support for pushing link status to VFs net: hns3: VF not request link status when PF support push link status feature drivers/net/ethernet/hisilicon/hns3/hclge_mbx.

[PATCH RESEND net-next 2/2] net: hns3: VF not request link status when PF support push link status feature

2021-04-14 Thread Huazhong Tan
From: Guangbin Huang To reduce the processing of unnecessary mailbox command when PF supports actively push its link status to VFs, VFs stop sending request link status command in periodic service task in this case. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/eth

linux-next: manual merge of the net-next tree with the net tree

2021-04-14 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c between commit: 00423969d806 ("Revert "net: stmmac: re-init rx buffers when mac resume back"") from the net tree and commits: bba2556efad6 ("net: stmmac: Enable RX

Re: [PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs

2021-04-14 Thread Huazhong Tan
On 2021/4/15 9:53, Jakub Kicinski wrote: On Thu, 15 Apr 2021 09:11:03 +0800 Huazhong Tan wrote: They are in different contexts. here will be called to update the link status of all VFs when the underlying link status is changed, while the below one is called when the admin set up the specific

Re: [PATCH net v2] i40e: fix the panic when running bpf in xdpdrv mode

2021-04-14 Thread Jesse Brandeburg
Jason Xing wrote: > On Wed, Apr 14, 2021 at 12:27 AM Jesse Brandeburg > wrote: > > > > kerneljasonx...@gmail.com wrote: > > > > > From: Jason Xing > > > > Hi Jason, > > > > Sorry, I missed this on the first time: Added intel-wired-lan, > > please include on any future submissions for Intel drive

Re: [PATCH net v3] i40e: fix the panic when running bpf in xdpdrv mode

2021-04-14 Thread Jesse Brandeburg
kerneljasonx...@gmail.com wrote: > From: Jason Xing > > Fix this panic by adding more rules to calculate the value of @rss_size_max > which could be used in allocating the queues when bpf is loaded, which, > however, could cause the failure and then trigger the NULL pointer of > vsi->rx_rings. P

Re: [PATCH bpf-next 12/17] libbpf: support extern resolution for BTF-defined maps in .maps section

2021-04-14 Thread Alexei Starovoitov
On Wed, Apr 14, 2021 at 04:48:25PM -0700, Andrii Nakryiko wrote: > On Wed, Apr 14, 2021 at 3:00 PM Alexei Starovoitov wrote: > > > > On 4/14/21 1:01 PM, Andrii Nakryiko wrote: > > > Add extra logic to handle map externs (only BTF-defined maps are > > > supported for > > > linking). Re-use the map

Re: [PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs

2021-04-14 Thread Jakub Kicinski
On Thu, 15 Apr 2021 09:11:03 +0800 Huazhong Tan wrote: > >> They are in different contexts. here will be called to > >> update the link status of all VFs when the underlying > >> link status is changed, while the below one is called > >> when the admin set up the specific VF link status. > > I se

Re: [PATCH] tools/testing: Remove unused variable

2021-04-14 Thread Martin KaFai Lau
On Wed, Apr 14, 2021 at 10:16:39PM +0800, zuoqil...@163.com wrote: > From: zuoqilin > > Remove unused variable "ret2". Please tag the targeting branch in the future as described in Documentation/bpf/bpf_devel_QA.rst. This one belongs to bpf-next. Acked-by: Martin KaFai Lau

[PATCH net-next v2] net: phy: at803x: select correct page on config init

2021-04-14 Thread David Bauer
The Atheros AR8031 and AR8033 expose different registers for SGMII/Fiber as well as the copper side of the PHY depending on the BT_BX_REG_SEL bit in the chip configure register. The driver assumes the copper side is selected on probe, but this might not be the case depending which page was last se

Re: [PATCH net v2] i40e: fix the panic when running bpf in xdpdrv mode

2021-04-14 Thread Jason Xing
On Wed, Apr 14, 2021 at 12:27 AM Jesse Brandeburg wrote: > > kerneljasonx...@gmail.com wrote: > > > From: Jason Xing > > Hi Jason, > > Sorry, I missed this on the first time: Added intel-wired-lan, > please include on any future submissions for Intel drivers. > get-maintainers script might help h

Re: [PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs

2021-04-14 Thread Huazhong Tan
On 2021/4/15 0:42, Jakub Kicinski wrote: On Wed, 14 Apr 2021 09:51:38 +0800 Huazhong Tan wrote: On 2021/4/14 1:18, Jakub Kicinski wrote: On Tue, 13 Apr 2021 14:17:00 +0800 Huazhong Tan wrote: +static void hclge_push_link_status(struct hclge_dev *hdev) +{ + struct hclge_vport *vport; +

Re: [PATCH net-next 8/9] igc: Enable RX via AF_XDP zero-copy

2021-04-14 Thread Jakub Kicinski
On Wed, 14 Apr 2021 23:59:22 + Joseph, Jithu wrote: > On Wed, 2021-04-14 at 16:25 -0700, Jakub Kicinski wrote: > > On Wed, 14 Apr 2021 23:14:04 + Joseph, Jithu wrote: > > > If h/w time-stamp is added by the NIC, then metasize will be non > > > zero > > > (as xdp->data is advanced by the

[PATCH net-next 15/15] ice: reduce scope of variable

2021-04-14 Thread Tony Nguyen
From: Paul M Stillwell Jr The scope of this variable can be reduced so do that. Signed-off-by: Paul M Stillwell Jr Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/d

[PATCH net-next 13/15] ice: suppress false cppcheck issues

2021-04-14 Thread Tony Nguyen
From: Bruce Allan Silence false errors, warnings and style issues reported by cppcheck. Signed-off-by: Bruce Allan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 3 +++ drivers/net/ethernet/intel/ice/ice_nvm.c | 1 + drivers/ne

[PATCH net-next 11/15] ice: remove unused struct member

2021-04-14 Thread Tony Nguyen
From: Jesse Brandeburg The only time you can ever have a rq_last_status is if a firmware event was somehow reporting a status on the receive queue, which are generally firmware initiated events or mailbox messages from a VF. Mostly this struct member was unused. Fix this problem by still printi

[PATCH net-next 02/15] ice: Drop leading underscores in enum ice_pf_state

2021-04-14 Thread Tony Nguyen
From: Anirudh Venkataramanan Remove the leading underscores in enum ice_pf_state. This is not really communicating anything and is unnecessary. No functional change. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/

[PATCH net-next 06/15] ice: manage interrupts during poll exit

2021-04-14 Thread Tony Nguyen
From: Jesse Brandeburg The driver would occasionally miss that there were outstanding descriptors to clean when exiting busy/napi poll. This issue has been in the code since the introduction of the ice driver. Attempt to "catch" any remaining work by triggering a software interrupt when exiting

[PATCH net-next 12/15] ice: Set vsi->vf_id as ICE_INVAL_VFID for non VF VSI types

2021-04-14 Thread Tony Nguyen
From: Brett Creeley Currently the vsi->vf_id is set only for ICE_VSI_VF and it's left as 0 for all other VSI types. This is confusing and could be problematic since 0 is a valid vf_id. Fix this by always setting non VF VSI types to ICE_INVAL_VFID. Signed-off-by: Brett Creeley Tested-by: Tony Br

[PATCH net-next 14/15] ice: remove return variable

2021-04-14 Thread Tony Nguyen
From: Paul M Stillwell Jr We were saving the return value from ice_vsi_manage_rss_lut(), but the errors from that function are not critical so change it to return void and remove the code that saved the value. Signed-off-by: Paul M Stillwell Jr Tested-by: Tony Brelinski Signed-off-by: Tony Ngu

[PATCH net-next 04/15] ice: refactor interrupt moderation writes

2021-04-14 Thread Tony Nguyen
From: Jesse Brandeburg Introduce several new helpers for writing ITR and GLINT_RATE registers, and refactor the code calling them. This resulted in removal of several duplicate functions and rolled a bunch of simple code back into the calling routines. In particular this removes some code that

[PATCH net-next 08/15] ice: Reimplement module reads used by ethtool

2021-04-14 Thread Tony Nguyen
From: Scott W Taylor There was an excessive increment of the QSFP page, which is now fixed. Additionally, this new update now reads 8 bytes at a time and will retry each request if the module/bus is busy. Also, prevent reading from upper pages if module does not support those pages. Signed-off-

[PATCH net-next 10/15] ice: use local for consistency

2021-04-14 Thread Tony Nguyen
From: Jesse Brandeburg Do a minor refactor on ice_vsi_rebuild to use a local variable to store vsi->type. Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_lib.c | 12 +++- 1 file changed, 7 insertions(+), 5 de

[PATCH net-next 01/15] ice: use kernel definitions for IANA protocol ports and ether-types

2021-04-14 Thread Tony Nguyen
From: Bruce Allan The well-known IANA protocol port 3260 (iscsi-target 0x0cbc) and the ether-types 0x8906 (ETH_P_FCOE) and 0x8914 (ETH_P_FIP) are already defined in kernel header files. Use those definitions instead of open-coding the same. Signed-off-by: Bruce Allan Tested-by: Tony Brelinski

[PATCH net-next 09/15] ice: print name in /proc/iomem

2021-04-14 Thread Tony Nguyen
From: Jesse Brandeburg The driver previously printed it's PCI address in the name field for the pci resource, which when displayed via /proc/iomem, would print the same thing twice. It's more useful for debugging to see the driver name, as most other modules do. Here's a diff of before and afte

[PATCH net-next 05/15] ice: replace custom AIM algorithm with kernel's DIM library

2021-04-14 Thread Tony Nguyen
From: Jacob Keller The ice driver has support for adaptive interrupt moderation, an algorithm for tuning the interrupt rate dynamically. This algorithm is based on various assumptions about ring size, socket buffer size, link speed, SKB overhead, ethernet frame overhead and more. The Linux kerne

[PATCH net-next 07/15] ice: refactor ITR data structures

2021-04-14 Thread Tony Nguyen
From: Jesse Brandeburg Use a dedicated bitfield in order to both increase the amount of checking around the length of ITR writes as well as simplify the checks of dynamic mode. Basically unpack the "high bit means dynamic" logic into bitfields. Also, remove some unused ITR defines. Signed-off-

[PATCH net-next 03/15] ice: Add new VSI states to track netdev alloc/registration

2021-04-14 Thread Tony Nguyen
From: Anirudh Venkataramanan Add two new VSI states, one to track if a netdev for the VSI has been allocated and the other to track if the netdev has been registered. Call unregister_netdev/free_netdev only when the corresponding state bits are set. Signed-off-by: Anirudh Venkataramanan Tested-

[PATCH net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2021-04-14

2021-04-14 Thread Tony Nguyen
changes since commit 3a1aa533f7f676aad68f8da10b9502903770: Merge tag 'linux-can-next-for-5.13-20210414' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next and are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 100GbE An

Re: [PATCHv7 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-14 Thread Martin KaFai Lau
On Wed, Apr 14, 2021 at 08:26:08PM +0800, Hangbin Liu wrote: [ ... ] > +static __always_inline int __bpf_xdp_redirect_map(struct bpf_map *map, u32 > ifindex, > + u64 flags, u64 flag_mask, > void *lookup_

Re: [PATCH v2 0/2][next] wl3501_cs: Fix out-of-bounds warnings

2021-04-14 Thread Gustavo A. R. Silva
On 4/14/21 01:51, Kalle Valo wrote: > "Gustavo A. R. Silva" writes: > >> Friendly ping: could somebody give us some feedback or take >> this series, please? > > First patch 2 comment needs to be resolved. Done: https://lore.kernel.org/lkml/cover.1618442265.git.gustavo...@kernel.org/ Thanks

Re: [PATCH bpf-next 00/17] BPF static linker: support externs

2021-04-14 Thread Andrii Nakryiko
On Wed, Apr 14, 2021 at 1:02 PM Andrii Nakryiko wrote: > > Add BPF static linker support for extern resolution of global variables, > functions, and BTF-defined maps. > > This patch set consists of 4 parts: > - few patches are extending bpftool to simplify working with BTF dump; > - libbpf obj

Re: [PATCHv7 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-14 Thread Martin KaFai Lau
On Wed, Apr 14, 2021 at 08:26:07PM +0800, Hangbin Liu wrote: [ ... ] > diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c > index aa516472ce46..3980fb3bfb09 100644 > --- a/kernel/bpf/devmap.c > +++ b/kernel/bpf/devmap.c > @@ -57,6 +57,7 @@ struct xdp_dev_bulk_queue { > struct list_head f

Re: Bug#985893: Forking on MMSD

2021-04-14 Thread Chris Talbot
Hello! On Wed, 2021-04-14 at 23:09 +0100, Wookey wrote: > On 2021-04-14 18:39 +, Marius Gripsgard wrote: > > > I would really like to avoid a fork, it's not worth doing dual > > work. Did you ping ofono devs at irc?  Also have you sent upstream > > patches? If a fork is the way you want to go

Re: [PATCH bpf-next 13/17] selftests/bpf: use -O0 instead of -Og in selftests builds

2021-04-14 Thread Andrii Nakryiko
On Wed, Apr 14, 2021 at 3:15 PM David Laight wrote: > > From: Andrii Nakryiko > > Sent: 14 April 2021 21:02 > > > > While -Og is designed to work well with debugger, it's still inferior to -O0 > > in terms of debuggability experience. It will cause some variables to still > > be > > inlined, it w

Re: [PATCH net-next 8/9] igc: Enable RX via AF_XDP zero-copy

2021-04-14 Thread Joseph, Jithu
On Wed, 2021-04-14 at 16:25 -0700, Jakub Kicinski wrote: > On Wed, 14 Apr 2021 23:14:04 + Joseph, Jithu wrote: > > > > +static struct sk_buff *igc_construct_skb_zc(struct igc_ring > > > > *ring, > > > > + struct xdp_buff > > > > *xdp) > > > > +{ > > > >

Re: [PATCH bpf-next 3/5] libbpf: add low level TC-BPF API

2021-04-14 Thread Andrii Nakryiko
On Wed, Apr 14, 2021 at 4:32 PM Daniel Borkmann wrote: > > On 4/15/21 1:19 AM, Andrii Nakryiko wrote: > > On Wed, Apr 14, 2021 at 3:51 PM Toke Høiland-Jørgensen > > wrote: > >> Andrii Nakryiko writes: > >>> On Wed, Apr 14, 2021 at 3:58 AM Toke Høiland-Jørgensen > >>> wrote: > Andrii Nakr

Re: [PATCH bpf-next 12/17] libbpf: support extern resolution for BTF-defined maps in .maps section

2021-04-14 Thread Andrii Nakryiko
On Wed, Apr 14, 2021 at 3:00 PM Alexei Starovoitov wrote: > > On 4/14/21 1:01 PM, Andrii Nakryiko wrote: > > Add extra logic to handle map externs (only BTF-defined maps are supported > > for > > linking). Re-use the map parsing logic used during bpf_object__open(). Map > > externs are currently

[PATCH v3 2/2] wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join

2021-04-14 Thread Gustavo A. R. Silva
Fix the following out-of-bounds warnings by adding a new structure wl3501_req instead of duplicating the same members in structure wl3501_join_req and wl3501_scan_confirm: arch/x86/include/asm/string_32.h:182:25: warning: '__builtin_memcpy' offset [39, 108] from the object at 'sig' is out of the

[PATCH v3 1/2] wl3501_cs: Fix out-of-bounds warnings in wl3501_send_pkt

2021-04-14 Thread Gustavo A. R. Silva
Fix the following out-of-bounds warnings by enclosing structure members daddr and saddr into new struct addr, in structures wl3501_md_req and wl3501_md_ind: arch/x86/include/asm/string_32.h:182:25: warning: '__builtin_memcpy' offset [18, 23] from the object at 'sig' is out of the bounds of refere

[PATCH v3 0/2] Fix out-of-bounds warnings

2021-04-14 Thread Gustavo A. R. Silva
Fix multiple out-of-bounds warnings by making the code a bit more structured. This helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Changes in v3: -

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-14 Thread Vladimir Oltean
On Wed, Apr 14, 2021 at 08:39:53PM +0200, Tobias Waldekranz wrote: > In order to have two entries for the same destination, they must belong > to different FIDs. But that FID is also used for automatic learning. So > if all ports use their own FID, all the switched traffic will have to be > flooded

Re: [PATCH bpf-next 3/5] libbpf: add low level TC-BPF API

2021-04-14 Thread Daniel Borkmann
On 4/15/21 1:19 AM, Andrii Nakryiko wrote: On Wed, Apr 14, 2021 at 3:51 PM Toke Høiland-Jørgensen wrote: Andrii Nakryiko writes: On Wed, Apr 14, 2021 at 3:58 AM Toke Høiland-Jørgensen wrote: Andrii Nakryiko writes: On Tue, Apr 6, 2021 at 3:06 AM Toke Høiland-Jørgensen wrote: Andrii Nakr

Re: [pull request][net 0/3] mlx5 fixes 2021-04-14

2021-04-14 Thread Jakub Kicinski
On Wed, 14 Apr 2021 16:16:07 -0700 Saeed Mahameed wrote: > This series provides 3 small fixes to mlx5 driver. > Please pull and let me know if there is any problem. FWIW a little more info on user-visible misbehavior on patch 2 would have helped. Acked-by: Jakub Kicinski

Re: [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2021-04-14

2021-04-14 Thread Jakub Kicinski
On Wed, 14 Apr 2021 09:20:29 -0700 Tony Nguyen wrote: > This series contains updates to ixgbe and ice drivers. > > Alex Duyck fixes a NULL pointer dereference for ixgbe. > > Yongxin Liu fixes an unbalanced enable/disable which was causing a call > trace with suspend for ixgbe. > > Colin King fix

[PATCH net 3/3] net/mlx5: Fix checksum issue of VXLAN and IPsec crypto offload

2021-04-14 Thread Saeed Mahameed
From: Huy Nguyen The packet is VXLAN packet over IPsec transport mode tunnel which has the following format: [IP1 | ESP | UDP | VXLAN | IP2 | TCP] NVIDIA ConnectX card cannot do checksum offload for two L4 headers. The solution is using the checksum partial offload similar to VXLAN | TCP packet.

[PATCH net 2/3] net/xfrm: Add inner_ipproto into sec_path

2021-04-14 Thread Saeed Mahameed
From: Huy Nguyen The inner_ipproto saves the inner IP protocol of the plain text packet. This allows vendor's IPsec feature making offload decision at skb's features_check and configuring hardware at ndo_start_xmit. For example, ConnectX6-DX IPsec device needs the plaintext's IP protocol to supp

[PATCH net 1/3] net/mlx5: Optimize mlx5e_feature_checks for non IPsec packet

2021-04-14 Thread Saeed Mahameed
From: Huy Nguyen mlx5e_ipsec_feature_check belongs to mlx5e_tunnel_features_check. Also, IPsec is not the default configuration so it should be checked at the end instead of the beginning of mlx5e_features_check. Fixes: 2ac9cfe78223 ("net/mlx5e: IPSec, Add Innova IPSec offload TX data path") Sig

[PATCH net 0/3] Fix ipsec offlaods with vxlan tunnel

2021-04-14 Thread Saeed Mahameed
From: Saeed Mahameed This small series fixes ipsec TX offloads with vxlan overlay on top of the offloaded ipsec packet, the driver (mlx5) was lacking such information and the skb->encapsulation bit wasn't enough as indication to reach the vxlan inner headers, as a solution we mark the tunnel in t

Re: [PATCH net-next 8/9] igc: Enable RX via AF_XDP zero-copy

2021-04-14 Thread Jakub Kicinski
On Wed, 14 Apr 2021 23:14:04 + Joseph, Jithu wrote: > > > +static struct sk_buff *igc_construct_skb_zc(struct igc_ring *ring, > > > + struct xdp_buff *xdp) > > > +{ > > > + unsigned int metasize = xdp->data - xdp->data_meta; > > > + unsigned int datasize = xd

Re: [PATCH net v2] net: core: make napi_disable more robust

2021-04-14 Thread Jakub Kicinski
On Wed, 14 Apr 2021 03:08:45 -0500 Lijun Pan wrote: > There are chances that napi_disable can be called twice by NIC driver. > This could generate deadlock. For example, > the first napi_disable will spin until NAPI_STATE_SCHED is cleared > by napi_complete_done, then set it again. > When napi_disa

Re: [PATCH bpf-next 3/5] libbpf: add low level TC-BPF API

2021-04-14 Thread Andrii Nakryiko
On Wed, Apr 14, 2021 at 3:51 PM Toke Høiland-Jørgensen wrote: > > Andrii Nakryiko writes: > > > On Wed, Apr 14, 2021 at 3:58 AM Toke Høiland-Jørgensen > > wrote: > >> > >> Andrii Nakryiko writes: > >> > >> > On Tue, Apr 6, 2021 at 3:06 AM Toke Høiland-Jørgensen > >> > wrote: > >> >> > >> >>

[net 2/3] net/mlx5e: Fix setting of RS FEC mode

2021-04-14 Thread Saeed Mahameed
From: Aya Levin Change register setting from bit number to bit mask. Fixes: b5ede32d3329 ("net/mlx5e: Add support for FEC modes based on 50G per lane links") Signed-off-by: Aya Levin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/port.c

[net 3/3] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta

2021-04-14 Thread Saeed Mahameed
From: wenxu In the nft_offload there is the mate flow_dissector with no ingress_ifindex but with ingress_iftype that only be used in the software. So if the mask of ingress_ifindex in meta is 0, this meta check should be bypass. Fixes: 6d65bc64e232 ("net/mlx5e: Add mlx5e_flower_parse_meta suppor

[pull request][net 0/3] mlx5 fixes 2021-04-14

2021-04-14 Thread Saeed Mahameed
From: Saeed Mahameed Hi Dave, Jakub, This series provides 3 small fixes to mlx5 driver. Please pull and let me know if there is any problem. Thanks, Saeed. --- The following changes since commit 2afeec08ab5c86ae21952151f726bfe184f6b23d: xen-netback: Check for hotplug-status existence befor

[net 1/3] net/mlx5: Fix setting of devlink traps in switchdev mode

2021-04-14 Thread Saeed Mahameed
From: Aya Levin Prevent setting of devlink traps on the uplink while in switchdev mode. In this mode, it is the SW switch responsibility to handle both packets with a mismatch in destination MAC or VLAN ID. Therefore, there are no flow steering tables to trap undesirable packets and driver crashe

Re: [PATCH net-next 8/9] igc: Enable RX via AF_XDP zero-copy

2021-04-14 Thread Joseph, Jithu
Hi Jakub, Apologies for the delay, I am looking into this as the original developer Andre is no-longer with Intel. I really appreciate your review feedback. (I removed Andre's and Vedang's email from the cc list as they are bouncing and have added a couple of Intel folks) Pardon me if I have

Re: [PATCH net-next] r8169: add support for pause ethtool ops

2021-04-14 Thread Jakub Kicinski
On Wed, 14 Apr 2021 08:23:15 +0200 Heiner Kallweit wrote: > This adds support for the [g|s]et_pauseparam ethtool ops. It considers > that the chip doesn't support pause frame use in jumbo mode. what happens if the MTU is changed afterwards?

Re: [PATCH] net: Make tcp_allowed_congestion_control readonly in non-init netns

2021-04-14 Thread Jakub Kicinski
On Wed, 14 Apr 2021 17:31:55 -0400 Jonathon Reinhart wrote: > On Tue, Apr 13, 2021 at 2:23 PM Jakub Kicinski wrote: > > > > On Tue, 13 Apr 2021 03:08:48 -0400 Jonathon Reinhart wrote: > > > Fixes: 9cb8e048e5d9: ("net/ipv4/sysctl: show tcp_{allowed, > > > available}_congestion_control in non-ini

Re: [PATCH] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta

2021-04-14 Thread Saeed Mahameed
On Fri, 2021-04-09 at 13:33 +0800, we...@ucloud.cn wrote: > From: wenxu > > In the nft_offload there is the mate flow_dissector with no > ingress_ifindex but with ingress_iftype that only be used > in the software. So if the mask of ingress_ifindex in meta is > 0, this meta check should be bypass

[PATCH v3 net-next 08/10] net: korina: Get mdio input clock via common clock framework

2021-04-14 Thread Thomas Bogendoerfer
With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 19 +-- 1 file chan

[PATCH v3 net-next 07/10] net: korina: Add support for device tree

2021-04-14 Thread Thomas Bogendoerfer
If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --g

[PATCH v3 net-next 04/10] net: korina: Remove nested helpers

2021-04-14 Thread Thomas Bogendoerfer
Remove helpers, which are only used in one call site. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index 408cb2d

[PATCH v3 net-next 09/10] net: korina: Make driver COMPILE_TESTable

2021-04-14 Thread Thomas Bogendoerfer
Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/Kconfig | 2 +- drivers/net/ethernet/korin

[PATCH v3 net-next 06/10] net: korina: Only pass mac address via platform data

2021-04-14 Thread Thomas Bogendoerfer
Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer --- arch/mips/rb532/devices.c | 5 +++-- drivers/net/ethernet/korina.c | 11 ++- 2 files changed, 9 i

  1   2   3   4   5   >