Re: [PATCH net-next] net: bridge: pop vlan from skb if filtering is disabled but it's a pvid

2020-09-11 Thread Nikolay Aleksandrov
On Sat, 2020-09-12 at 02:16 +0300, Vladimir Oltean wrote: > Currently the bridge untags VLANs from its VLAN group in > __allowed_ingress() only when VLAN filtering is enabled. > > When installing a pvid in egress-tagged mode, DSA switches have a > problem: > > ip link add dev br0 type bridge vlan

Re: [PATCH 06/29] wil6210: Fix a couple of formatting issues in 'wil6210_debugfs_init'

2020-09-11 Thread Kalle Valo
Lee Jones wrote: > Kerneldoc expects attributes/parameters to be in '@*.: ' format and > gets confused if the variable does not follow the type/attribute > definitions. > > Fixes the following W=1 kernel build warning(s): > > drivers/net/wireless/ath/wil6210/debugfs.c:456: warning: Function pa

[PATCH RFC bpf-next 1/2] bpf: Move the PTR_TO_BTF_ID check to check_reg_type()

2020-09-11 Thread Martin KaFai Lau
check_reg_type() checks whether a reg can be used as an arg of a func_proto. For PTR_TO_BTF_ID, the check is actually not completely done until the reg->btf_id is pointing to a kernel struct that is acceptable by the func_proto. Thus, this patch moves the btf_id check into check_reg_type(). The c

[PATCH RFC bpf-next 2/2] bpf: Enable bpf_skc_to_* sock casting helper to networking prog type

2020-09-11 Thread Martin KaFai Lau
There is a constant need to add more fields into the bpf_tcp_sock for the bpf programs running at tc, sock_ops...etc. A current workaround could be to use bpf_probe_read_kernel(). However, other than making another helper call for reading each field and missing CO-RE, it is also not as intuitive

[PATCH RFC bpf-next 0/2] bpf: Enable bpf_skc_to_* sock casting helper to networking prog type

2020-09-11 Thread Martin KaFai Lau
This set allows networking prog type to directly read fields from the in-kernel socket type, e.g. "struct tcp_sock". Patch 2 has the details on the use case. It is currently under RFC since it needs proper tests and it builds on top of Lorenz's patches: https://lore.kernel.org/bpf/20200910125

[PATCH 2/2] ptp_qoriq: support FIPER3

2020-09-11 Thread Yangbo Lu
The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch is to support it in ptp_qoriq driver. Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c | 23 ++- include/linux/fsl/ptp_qoriq.h | 3 +++ 2 file

[PATCH 1/2] dt-binding: ptp_qoriq: support fsl,tmr-fiper3 property

2020-09-11 Thread Yangbo Lu
Add fsl,tmr-fiper3 property definition which is supported only on DPAA2 and ENETC network controller hardware. Signed-off-by: Yangbo Lu --- Documentation/devicetree/bindings/ptp/ptp-qoriq.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/ptp/ptp-qoriq.tx

[PATCH 0/2] ptp_qoriq: support FIPER3

2020-09-11 Thread Yangbo Lu
The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch-set is to support it in ptp_qoriq driver and dt-binding. Yangbo Lu (2): dt-binding: ptp_qoriq: support fsl,tmr-fiper3 property ptp_qoriq: support FIPER3 .../devicetree/b

Re: [PATCH net-next v2 0/8] ethtool: add pause frame stats

2020-09-11 Thread Florian Fainelli
On 9/11/2020 5:42 PM, Jakub Kicinski wrote: On Sat, 12 Sep 2020 03:15:42 +0300 Vladimir Oltean wrote: On Fri, Sep 11, 2020 at 05:07:24PM -0700, Jakub Kicinski wrote: On Sat, 12 Sep 2020 02:49:32 +0300 Vladimir Oltean wrote: On Fri, Sep 11, 2020 at 04:28:45PM -0700, Jakub Kicinski wrote: Hi

[PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call

2020-09-11 Thread Xie He
x25_type_trans only needs to be called before we call netif_rx to pass the skb to upper layers. It does not need to be called before lapb_data_received. The LAPB module does not need the fields that are set by calling it. In the other two X.25 drivers - lapbether and hdlc_x25. x25_type_trans is o

Re: inconsistent lock state in sco_conn_del

2020-09-11 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:e8878ab8 Merge tag 'spi-fix-v5.9-rc4' of git://git.kernel... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1213075990 kernel config: https://syzkaller.appspot.com/x/.config?x=c616100

Re: [PATCH net-next v2 7/8] mlx5: add pause frame stats

2020-09-11 Thread Jakub Kicinski
On Fri, 11 Sep 2020 16:28:52 -0700 Jakub Kicinski wrote: > +static void mlx5e_uplink_rep_get_pause_stats(struct net_device *netdev, > + struct ethtool_pause_stats *stats) > +{ > + struct mlx5e_priv *priv = netdev_priv(netdev); > + > + mlx5e_stats_pau

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

2020-09-11 Thread Jesse Brandeburg
Edward Cree wrote: > On 11/09/2020 23:26, Jakub Kicinski wrote: > > #declare _MCDI_BUF_LEN(_len) DIV_ROUND_UP(_len, 4) > > > > efx_dword_t txbuf[_MCDI_BUF_LEN(MC_CMD_PTP_IN_TRANSMIT_LENMAX)]; > > > > Would that work? > That could work, yes.  Though, probably lose the leading underscore >  in

[PATCH net-next v2 2/7] net: ipa: replace ipa->suspend_ref with a flag bit

2020-09-11 Thread Alex Elder
For suspend/resume, we currently take an extra clock reference to prevent the IPA clock from being shut down until a power management suspend request arrives. An atomic field in the IPA structure is used to indicate whether this reference has been taken. Instead, introduce a new flags bitmap in t

[PATCH net-next v2 4/7] net: ipa: manage endpoints separate from clock

2020-09-11 Thread Alex Elder
Currently, when (before) the last IPA clock reference is dropped, all endpoints are suspended. And whenever the first IPA clock reference is taken, all endpoints are resumed (or started). In most cases there's no need to start endpoints when the clock starts. So move the calls to ipa_endpoint_su

[PATCH net-next v2 5/7] net: ipa: use device_init_wakeup()

2020-09-11 Thread Alex Elder
The call to wakeup_source_register() in ipa_probe() does not do what it was intended to do. Call device_init_wakeup() in ipa_setup() instead, to set the IPA device as wakeup-capable and to initially enable wakeup capability. When we receive a SUSPEND interrupt, call pm_wakeup_dev_event() with a z

[PATCH net-next v2 7/7] net: ipa: do not enable GSI interrupt for wakeup

2020-09-11 Thread Alex Elder
We now trigger a system resume when we receive an IPA SUSPEND interrupt. We should *not* wake up on GSI interrupts. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 17 - drivers/net/ipa/gsi.h | 1 - 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/n

[PATCH net-next v2 6/7] net: ipa: enable wakeup on IPA interrupt

2020-09-11 Thread Alex Elder
Now that we handle wakeup interrupts properly, arrange for the IPA interrupt to be treated as a wakeup interrupt. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_interrupt.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ipa/ipa_interrupt.c b/drivers/net/ipa/ip

[PATCH net-next v2 3/7] net: ipa: verify reference flag values

2020-09-11 Thread Alex Elder
We take a single IPA clock reference to keep the clock running until we get a system suspend operation, and maintain a flag indicating whether that reference has been taken. When a suspend request arrives, we drop that reference and clear the flag. In most places we simply set or clear the extra-

[PATCH net-next v2 1/7] net: ipa: use refcount_t for IPA clock reference count

2020-09-11 Thread Alex Elder
Take advantage of the checking provided by refcount_t, rather than using a plain atomic to represent the IPA clock reference count. Note that we need to *set* the value to 1 in ipa_clock_get() rather than incrementing it from 0 (because doing that is considered an error for a refcount_t). Signed-

[PATCH net-next v2 0/7] net: ipa: wake up system on RX available

2020-09-11 Thread Alex Elder
This series arranges for the IPA driver to wake up a suspended system if the IPA hardware has a packet to deliver to the AP. Version 2 replaces the first patch from version 1 with three patches, in response to David Miller's feedback. Specifically: - The first patch now replaces an atomic_t fiel

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

2020-09-11 Thread David Miller
From: Geert Uytterhoeven Date: Fri, 11 Sep 2020 08:32:55 +0200 > Hi David, > > On Thu, Sep 10, 2020 at 9:20 PM David Miller wrote: >> From: Geert Uytterhoeven >> Date: Tue, 1 Sep 2020 17:02:37 +0200 >> >> > This reverts commit 124eee3f6955f7aa19b9e6ff5c9b6d37cb3d1e2c. >> > >> > Inami-san repo

Re: [PATCH net-next v2 0/8] ethtool: add pause frame stats

2020-09-11 Thread Jakub Kicinski
On Sat, 12 Sep 2020 03:15:42 +0300 Vladimir Oltean wrote: > On Fri, Sep 11, 2020 at 05:07:24PM -0700, Jakub Kicinski wrote: > > On Sat, 12 Sep 2020 02:49:32 +0300 Vladimir Oltean wrote: > > > On Fri, Sep 11, 2020 at 04:28:45PM -0700, Jakub Kicinski wrote: > > > > Hi! > > > > > > > > This is the

Re: [PATCH v3 net-next] net: phy: mchp: Add support for LAN8814 QUAD PHY

2020-09-11 Thread David Miller
From: Divya Koppera Date: Fri, 11 Sep 2020 18:48:44 +0530 > LAN8814 is a low-power, quad-port triple-speed (10BASE-T/100BASETX/1000BASE-T) > Ethernet physical layer transceiver (PHY). It supports transmission and > reception of data on standard CAT-5, as well as CAT-5e and CAT-6, unshielded > twi

Re: [PATCH net-next] net: hns: use IRQ_NOAUTOEN to avoid irq is enabled due to request_irq

2020-09-11 Thread David Miller
From: Barry Song Date: Fri, 11 Sep 2020 13:55:10 +1200 > Rather than doing request_irq and then disabling the irq immediately, it > should be safer to use IRQ_NOAUTOEN flag for the irq. It removes any gap > between request_irq() and disable_irq(). > > Cc: Salil Mehta > Reviewed-by: Yunsheng Lin

Re: [PATCH] net: ethernet: ti: cpsw_new: fix suspend/resume

2020-09-11 Thread David Miller
From: Grygorii Strashko Date: Thu, 10 Sep 2020 23:52:29 +0300 > Add missed suspend/resume callbacks to properly restore networking after > suspend/resume cycle. > > Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based > driver part 1 - dual-emac") > Signed-off-by: Grygorii St

Re: [PATCH net-next v3 0/9] net: ethernet: ti: ale: add static configuration

2020-09-11 Thread David Miller
From: Grygorii Strashko Date: Thu, 10 Sep 2020 23:27:58 +0300 > As existing, as newly introduced CPSW ALE versions have differences in > supported features and ALE table formats. Especially it's actual for the > recent AM65x/J721E/J7200 and future AM64x SoCs, which supports more > features like:

Re: [PATCH v2 net-next 0/4] DSA tag_8021q cleanup

2020-09-11 Thread David Miller
From: Vladimir Oltean Date: Thu, 10 Sep 2020 19:48:53 +0300 > From: Vladimir Oltean > > This small series tries to consolidate the VLAN handling in DSA a little > bit. It reworks tag_8021q to be minimally invasive to the dsa_switch_ops > structure. This makes the rest of the code a bit easier t

Re: [PATCH net] net: ipa: fix u32_replace_bits by u32p_xxx version

2020-09-11 Thread David Miller
From: Vadym Kochan Date: Thu, 10 Sep 2020 18:41:52 +0300 > Looks like u32p_replace_bits() should be used instead of > u32_replace_bits() which does not modifies the value but returns the > modified version. > > Fixes: 2b9feef2b6c2 ("soc: qcom: ipa: filter and routing tables") > Signed-off-by: Va

Re: [net-next] crypto/chcr: move nic TLS functionality to drivers/net

2020-09-11 Thread David Miller
From: Rohit Maheshwari Date: Thu, 10 Sep 2020 19:51:47 +0530 > This patch moves complete nic tls offload (kTLS) code from crypto > directory to drivers/net/ethernet/chelsio/inline_crypto/ch_ktls > directory. nic TLS is made a separate ULD of cxgb4. > > Signed-off-by: Rohit Maheshwari Applied,

Re: [PATCH net v1] hinic: fix rewaking txq after netif_tx_disable

2020-09-11 Thread David Miller
From: Luo bin Date: Thu, 10 Sep 2020 22:04:40 +0800 > When calling hinic_close in hinic_set_channels, all queues are > stopped after netif_tx_disable, but some queue may be rewaken in > free_tx_poll by mistake while drv is handling tx irq. If one queue > is rewaken core may call hinic_xmit_frame

Re: [PATCH net v1] taprio: Fix allowing too small intervals

2020-09-11 Thread David Miller
From: Vinicius Costa Gomes Date: Wed, 9 Sep 2020 17:03:11 -0700 > It's possible that the user specifies an interval that couldn't allow > any packet to be transmitted. This also avoids the issue of the > hrtimer handler starving the other threads because it's running too > often. > > The soluti

Re: [RESEND net 0/4][pull request] Intel Wired LAN Driver Updates 2020-09-09

2020-09-11 Thread David Miller
From: Tony Nguyen Date: Fri, 11 Sep 2020 16:22:03 -0700 > This series contains updates to i40e and igc drivers. > > Stefan Assmann changes num_vlans to u16 to fix may be used uninitialized > error and propagates error in i40_set_vsi_promisc() for i40e. > > Vinicius corrects timestamping latency

Re: [PATCH net-next v2 0/8] ethtool: add pause frame stats

2020-09-11 Thread Vladimir Oltean
On Fri, Sep 11, 2020 at 05:07:24PM -0700, Jakub Kicinski wrote: > On Sat, 12 Sep 2020 02:49:32 +0300 Vladimir Oltean wrote: > > On Fri, Sep 11, 2020 at 04:28:45PM -0700, Jakub Kicinski wrote: > > > Hi! > > > > > > This is the first (small) series which exposes some stats via > > > the corresponding

Re: [PATCH v2 net-next 0/7] sfc: encap offloads on EF10

2020-09-11 Thread David Miller
From: Jakub Kicinski Date: Fri, 11 Sep 2020 16:07:26 -0700 > On Fri, 11 Sep 2020 23:37:10 +0100 Edward Cree wrote: >> EF10 NICs from the 8000 series onwards support TX offloads (checksumming, >> TSO) on VXLAN- and NVGRE-encapsulated packets. This series adds driver >> support for these offload

Re: [PATCH net-next] octeontx2-af: Constify npc_kpu_profile_{action,cam}

2020-09-11 Thread David Miller
From: Rikard Falkeborn Date: Sat, 12 Sep 2020 00:00:15 +0200 > These are never modified, so constify them to allow the compiler to > place them in read-only memory. This moves about 25kB to read-only > memory as seen by the output of the size command. > > Before: >textdata bss de

Re: [PATCH net-next v2 0/8] ethtool: add pause frame stats

2020-09-11 Thread Jakub Kicinski
On Sat, 12 Sep 2020 02:49:32 +0300 Vladimir Oltean wrote: > On Fri, Sep 11, 2020 at 04:28:45PM -0700, Jakub Kicinski wrote: > > Hi! > > > > This is the first (small) series which exposes some stats via > > the corresponding ethtool interface. Here (thanks to the > > excitability of netlink) we exp

Re: [PATCH net-next] drivers/net/wan/x25_asy: Remove an unused flag "SLF_OUTWAIT"

2020-09-11 Thread Xie He
On Fri, Sep 11, 2020 at 2:44 PM David Miller wrote: > > From: Xie He > Date: Thu, 10 Sep 2020 23:35:03 -0700 > > > The "SLF_OUTWAIT" flag defined in x25_asy.h is not actually used. > > It is only cleared at one place in x25_asy.c but is never read or set. > > So we can remove it. > > > > Signed-o

Re: [PATCH v2 net-next 3/4] net: dsa: tag_8021q: add a context structure

2020-09-11 Thread Florian Fainelli
On 9/10/2020 9:48 AM, Vladimir Oltean wrote: From: Vladimir Oltean While working on another tag_8021q driver implementation, some things became apparent: - It is not mandatory for a DSA driver to offload the tag_8021q VLANs by using the VLAN table per se. For example, it can add custom T

Re: [PATCH net-next v2 0/8] ethtool: add pause frame stats

2020-09-11 Thread Vladimir Oltean
On Fri, Sep 11, 2020 at 04:28:45PM -0700, Jakub Kicinski wrote: > Hi! > > This is the first (small) series which exposes some stats via > the corresponding ethtool interface. Here (thanks to the > excitability of netlink) we expose pause frame stats via > the same interfaces as ethtool -a / -A. >

Re: [PATCH net-next] net/packet: Fix a comment about hard_header_len and add a warning for it

2020-09-11 Thread Xie He
On Fri, Sep 11, 2020 at 7:32 AM Willem de Bruijn wrote: > > From a quick scan, a few device types that might trigger this > > net/atm/clip.c > drivers/net/wan/hdlc_fr.c > drivers/net/appletalk/ipddp.c > drivers/net/ppp/ppp_generic.c > drivers/net/net_failover.c I have recently fixed this problem

Re: [PATCH net-next] net/socket.c: Remove an unused header file

2020-09-11 Thread Xie He
On Fri, Sep 11, 2020 at 2:41 PM David Miller wrote: > > From: Xie He > Date: Thu, 10 Sep 2020 23:07:20 -0700 > > > This header file is not actually used in this file. Let's remove it. > > How did you test this assertion? As Jakub showed, the > dlci_ioctl_set() function needs to be declared becau

[PATCH net-next v2 4/8] selftests: add a test for ethtool pause stats

2020-09-11 Thread Jakub Kicinski
Make sure the empty nest is reported even without stats. Make sure reporting only selected stats works fine. Signed-off-by: Jakub Kicinski --- .../drivers/net/netdevsim/ethtool-pause.sh| 108 ++ 1 file changed, 108 insertions(+) create mode 100755 tools/testing/selftests/dr

[PATCH net-next v2 5/8] bnxt: add pause frame stats

2020-09-11 Thread Jakub Kicinski
These stats are already reported in ethtool -S. Michael confirms they are equivalent to standard stats. v2: - fix sparse warning about endian by using the macro - use u64 for pointer type Signed-off-by: Jakub Kicinski --- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 17

[PATCH net-next v2 3/8] netdevsim: add pause frame stats

2020-09-11 Thread Jakub Kicinski
Add minimal ethtool interface for testing ethtool pause stats. v2: add missing static on nsim_ethtool_ops Signed-off-by: Jakub Kicinski --- drivers/net/netdevsim/Makefile| 2 +- drivers/net/netdevsim/ethtool.c | 64 +++ drivers/net/netdevsim/netdev.c| 1 +

[PATCH net-next v2 6/8] ixgbe: add pause frame stats

2020-09-11 Thread Jakub Kicinski
Report standard pause frame stats. They are already aggregated in struct ixgbe_hw_stats. The combination of the registers is suggested as equivalent to PAUSEMACCtrlFramesTransmitted / PAUSEMACCtrlFramesReceived by the Intel 82576EB datasheet, I could not find any information in the HW actually sup

[PATCH net-next v2 2/8] docs: net: include the new ethtool pause stats in the stats doc

2020-09-11 Thread Jakub Kicinski
Tell people that there now is an interface for querying pause frames. A little bit of restructuring is needed given this is a first source of such statistics. Signed-off-by: Jakub Kicinski --- Documentation/networking/statistics.rst | 57 ++--- 1 file changed, 52 insertions(+

[PATCH net-next v2 8/8] mlx4: add pause frame stats

2020-09-11 Thread Jakub Kicinski
Check if the pause stats are reported by HW by checking the bitmap. Calculation is based on the order of strings in main_strings from ethtool -S. Hopefully the semantics of these stats match the standard.. Signed-off-by: Jakub Kicinski --- .../net/ethernet/mellanox/mlx4/en_ethtool.c | 19 +

[PATCH net-next v2 7/8] mlx5: add pause frame stats

2020-09-11 Thread Jakub Kicinski
Plumb through all the indirection and copy some code from ethtool -S. The names of the group indicate that these are the stats we are after (and Saeed confirms it). v2: - drop the ethool helper and call stats directly - don't pass 0 as initialized to in buffer - use local buffer Signed-off-by:

[PATCH net-next v2 0/8] ethtool: add pause frame stats

2020-09-11 Thread Jakub Kicinski
Hi! This is the first (small) series which exposes some stats via the corresponding ethtool interface. Here (thanks to the excitability of netlink) we expose pause frame stats via the same interfaces as ethtool -a / -A. In particular the following stats from the standard: - 30.3.4.2 aPAUSEMACCtr

[PATCH net-next v2 1/8] ethtool: add standard pause stats

2020-09-11 Thread Jakub Kicinski
Currently drivers have to report their pause frames statistics via ethtool -S, and there is a wide variety of names used for these statistics. Add the two statistics defined in IEEE 802.3x to the standard API. Create a new ethtool request header flag for including statistics in the response to GET

Re: [Intel-wired-lan] [RFC PATCH net-next v1 05/11] intel-ethernet: make W=1 build cleanly

2020-09-11 Thread Jesse Brandeburg
Vinicius Costa Gomes wrote: > > diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c > > b/drivers/net/ethernet/intel/e1000/e1000_hw.c > > index 4e7a0810eaeb..2120dacfd55c 100644 > > --- a/drivers/net/ethernet/intel/e1000/e1000_hw.c > > +++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c > > @

[PATCH net-next] __netif_receive_skb_core: don't untag vlan from skb on DSA master

2020-09-11 Thread Vladimir Oltean
A DSA master interface has upper network devices, each representing an Ethernet switch port attached to it. Demultiplexing the source ports and setting skb->dev accordingly is done through the catch-all ETH_P_XDSA packet_type handler. Catch-all because DSA vendors have various header implementation

[RESEND net 2/4] i40e: always propagate error value in i40e_set_vsi_promisc()

2020-09-11 Thread Tony Nguyen
From: Stefan Assmann The for loop in i40e_set_vsi_promisc() reports errors via dev_err() but does not propagate the error up the call chain. Instead it continues the loop and potentially overwrites the reported error value. This results in the error being recorded in the log buffer, but the calle

[RESEND net 4/4] igc: Fix not considering the TX delay for timestamps

2020-09-11 Thread Tony Nguyen
From: Vinicius Costa Gomes When timestamping a packet there's a delay between the start of the packet and the point where the hardware actually captures the timestamp. This difference needs to be considered if we want accurate timestamps. This was done on the RX side, but not on the TX side. Fi

[RESEND net 3/4] igc: Fix wrong timestamp latency numbers

2020-09-11 Thread Tony Nguyen
From: Vinicius Costa Gomes The previous timestamping latency numbers were obtained by interpolating the i210 numbers with the i225 crystal clock value. That calculation was wrong. Use the correct values from real measurements. Fixes: 81b055205e8b ("igc: Add support for RX timestamping") Signed-

[RESEND net 0/4][pull request] Intel Wired LAN Driver Updates 2020-09-09

2020-09-11 Thread Tony Nguyen
This series contains updates to i40e and igc drivers. Stefan Assmann changes num_vlans to u16 to fix may be used uninitialized error and propagates error in i40_set_vsi_promisc() for i40e. Vinicius corrects timestamping latency values for i225 devices and accounts for TX timestamping delay for ig

[RESEND net 1/4] i40e: fix return of uninitialized aq_ret in i40e_set_vsi_promisc

2020-09-11 Thread Tony Nguyen
From: Stefan Assmann drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c: In function ‘i40e_set_vsi_promisc’: drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:1176:14: error: ‘aq_ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] i40e_status aq_ret; In case the co

Re: [net 0/4][pull request] Intel Wired LAN Driver Updates 2020-09-09

2020-09-11 Thread Jakub Kicinski
On Fri, 11 Sep 2020 23:09:57 + Nguyen, Anthony L wrote: > > How are my patches? > > Sorry for the delay, we've had key people out on summer > vacations/sabbaticals. I'm working on pulling people back and engaging > others to get them tested/reviewed. Please give us a couple of weeks. Okay,

[PATCH net-next] net: bridge: pop vlan from skb if filtering is disabled but it's a pvid

2020-09-11 Thread Vladimir Oltean
Currently the bridge untags VLANs from its VLAN group in __allowed_ingress() only when VLAN filtering is enabled. When installing a pvid in egress-tagged mode, DSA switches have a problem: ip link add dev br0 type bridge vlan_filtering 0 ip link set swp0 master br0 bridge vlan del dev swp0 vid 1

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

2020-09-11 Thread Edward Cree
On 11/09/2020 23:26, Jakub Kicinski wrote: > "Toolchain" sounds a little grand in this context, the script that > parses kdoc does basic regexps to convert the standard kernel macros: > ... > IDK if we can expect it to understand random driver's macros.. I wasn't suggesting it should _understand_ t

Re: [net 0/4][pull request] Intel Wired LAN Driver Updates 2020-09-09

2020-09-11 Thread Nguyen, Anthony L
On Thu, 2020-09-10 at 07:48 -0700, Jakub Kicinski wrote: > On Wed, 9 Sep 2020 17:04:07 -0700 Tony Nguyen wrote: > > This series contains updates to i40e and igc drivers. > > > > Stefan Assmann changes num_vlans to u16 to fix may be used > > uninitialized > > error and propagates error in i40_set_

Yet another ethernet PHY LED control proposal

2020-09-11 Thread Marek Behun
Hello, I have been thinking about another way to implement ABI for HW control of ethernet PHY connected LEDs. This proposal is inspired by the fact that for some time there is a movement in the kernel to do transparent HW offloading of things (DSA is an example of that). So currently we have the

Re: [PATCH v2 net-next 0/7] sfc: encap offloads on EF10

2020-09-11 Thread Jakub Kicinski
On Fri, 11 Sep 2020 23:37:10 +0100 Edward Cree wrote: > EF10 NICs from the 8000 series onwards support TX offloads (checksumming, > TSO) on VXLAN- and NVGRE-encapsulated packets. This series adds driver > support for these offloads. > > Changes from v1: > * Fix 'no TXQ of type' error handling

Re: [PATCH net-next 5/8] bnxt: add pause frame stats

2020-09-11 Thread Jakub Kicinski
On Fri, 11 Sep 2020 15:53:24 -0700 Michael Chan wrote: > > > This will work, but the types on the 2 sides don't match. On the > > > right hand side, since you are casting to the hardware struct > > > rx_port_stats and tx_port_stats, the types are __le64. > > > > > > If rx_stats and tx_stats are *u

Re: [RFC PATCH net-next v1 08/11] drivers/net/ethernet: handle one warning explicitly

2020-09-11 Thread Jacob Keller
On 9/10/2020 6:23 PM, Jesse Brandeburg wrote: > While fixing the W=1 builds, this warning came up because the > developers used a very tricky way to get structures initialized > to a non-zero value, but this causes GCC to warn about an > override. In this case the override was intentional, so ju

Re: [PATCH net-next 5/8] bnxt: add pause frame stats

2020-09-11 Thread Michael Chan
On Fri, Sep 11, 2020 at 3:43 PM Jakub Kicinski wrote: > > On Fri, 11 Sep 2020 15:34:24 -0700 Michael Chan wrote: > > On Fri, Sep 11, 2020 at 12:53 PM Jakub Kicinski wrote: > > > > > > These stats are already reported in ethtool -S. > > > Hopefully they are equivalent to standard stats? > > > > Ye

Re: [PATCH net-next 5/8] bnxt: add pause frame stats

2020-09-11 Thread Jakub Kicinski
On Fri, 11 Sep 2020 15:43:43 -0700 Jakub Kicinski wrote: > > > + struct bnxt *bp = netdev_priv(dev); > > > + struct rx_port_stats *rx_stats; > > > + struct tx_port_stats *tx_stats; > > > + > > > + if (BNXT_VF(bp) || !(bp->flags & BNXT_FLAG_PORT_STATS)) > > > +

Re: [PATCH net-next 5/8] bnxt: add pause frame stats

2020-09-11 Thread Jakub Kicinski
On Fri, 11 Sep 2020 15:34:24 -0700 Michael Chan wrote: > On Fri, Sep 11, 2020 at 12:53 PM Jakub Kicinski wrote: > > > > These stats are already reported in ethtool -S. > > Hopefully they are equivalent to standard stats? > > Yes. > > > > > Signed-off-by: Jakub Kicinski > > --- > > .../net/et

Re: [RFC PATCH net-next v1 00/11] make drivers/net/ethernet W=1 clean

2020-09-11 Thread Vladimir Oltean
On Fri, Sep 11, 2020 at 02:34:05PM -0700, Jesse Brandeburg wrote: > Here is a list of driver files with sparse warnings from C=1, maybe we > can encourage some others to help me fix them? I can take care of drivers/net/ethernet/freescale, thanks for the effort so far! I'll try to send a patch tomo

[PATCH v2 net-next 7/7] sfc: advertise encapsulated offloads on EF10

2020-09-11 Thread Edward Cree
Necessitates an .ndo_features_check, as the EF10 datapath has several limitations on what it can handle. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 16 + drivers/net/ethernet/sfc/efx.c| 1 + drivers/net/ethernet/sfc/efx_common.c | 84

[PATCH v2 net-next 6/7] sfc: implement encapsulated TSO on EF10

2020-09-11 Thread Edward Cree
>From the 8000 series onwards, EF10 NICs with suitable firmware are able to perform TSO within VXLAN or NVGRE encapsulation. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 55 --- drivers/net/ethernet/sfc/net_driver.h | 5 +++ 2 files changed, 46

[PATCH v2 net-next 5/7] sfc: de-indirect TSO handling

2020-09-11 Thread Edward Cree
Remove the tx_queue->handle_tso function pointer, and just use tx_queue->tso_version to decide which function to call, thus removing an indirect call from the fast path. Instead of passing a tso_v2 flag to efx_mcdi_tx_init(), set the desired tx_queue->tso_version before calling it. In efx_mcdi_t

[PATCH v2 net-next 2/7] sfc: define inner/outer csum offload TXQ types

2020-09-11 Thread Edward Cree
Nothing yet creates inner csum TXQs; just change all references to EFX_TXQ_TYPE_OFFLOAD to the new EFX_TXQ_TYPE_OUTER_CSUM. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 4 ++-- drivers/net/ethernet/sfc/farch.c | 4 ++-- drivers/net/ethernet/sfc/mcdi_functi

[PATCH v2 net-next 1/7] sfc: decouple TXQ type from label

2020-09-11 Thread Edward Cree
Make it possible to have an arbitrary mapping from types to labels, because when we add inner-csum-offload TXQs there will no longer be a convenient nesting hierarchy of NIC types (EF10 will have inner-csum TXQs, while Siena will have HIGHPRI). Correct a misleading comment on efx_hard_start_xmit

[PATCH v2 net-next 3/7] sfc: create inner-csum queues on EF10 if supported

2020-09-11 Thread Edward Cree
If the MC reports the VXLAN_NVGRE datapath capability, then these queues can be used for checksum offload of encapsulated packets. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 23 --- drivers/net/ethernet/sfc/mcdi_functions.c | 16 --

[PATCH v2 net-next 4/7] sfc: select inner-csum-offload TX queues for skbs that need it

2020-09-11 Thread Edward Cree
Won't actually be exercised until we start advertising the corresponding offload features. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ptp.c | 3 ++- drivers/net/ethernet/sfc/tx.c | 2 +- drivers/net/ethernet/sfc/tx.h | 26 ++ 3 files changed, 29 insertio

[PATCH v2 net-next 0/7] sfc: encap offloads on EF10

2020-09-11 Thread Edward Cree
EF10 NICs from the 8000 series onwards support TX offloads (checksumming, TSO) on VXLAN- and NVGRE-encapsulated packets. This series adds driver support for these offloads. Changes from v1: * Fix 'no TXQ of type' error handling in patch #1 (and clear up the misleading comment that inspired

Re: [PATCH net-next 5/8] bnxt: add pause frame stats

2020-09-11 Thread Michael Chan
On Fri, Sep 11, 2020 at 12:53 PM Jakub Kicinski wrote: > > These stats are already reported in ethtool -S. > Hopefully they are equivalent to standard stats? Yes. > > Signed-off-by: Jakub Kicinski > --- > .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 19 +++ > 1 file changed,

[RESEND PATCH] Bluetooth: Only mark socket zapped after unlocking

2020-09-11 Thread Abhishek Pandit-Subedi
Since l2cap_sock_teardown_cb doesn't acquire the channel lock before setting the socket as zapped, it could potentially race with l2cap_sock_release which frees the socket. Thus, wait until the cleanup is complete before marking the socket as zapped. This race was reproduced on a JBL GO speaker af

[RESEND PATCH] bluetooth: Set ext scan response only when it exists

2020-09-11 Thread Abhishek Pandit-Subedi
Only set extended scan response only when it exists. Otherwise, clear the scan response data. Per the core spec v5.2, Vol 4, Part E, 7.8.55 If the advertising set is non-scannable and the Host uses this command other than to discard existing data, the Controller shall return the error code Invali

Re: [PATCH net-next 4/4] net: dsa: set configure_vlan_while_not_filtering to true by default

2020-09-11 Thread Vladimir Oltean
On Fri, Sep 11, 2020 at 12:48:37PM -0700, Florian Fainelli wrote: > > > I'm conflicted. So you prefer having the CPU port as egress-tagged? > > > > I do, because I realized that some of the switches we support are still > > configured in DSA_TAG_NONE mode because the CPU port they chose is not > >

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

2020-09-11 Thread Jakub Kicinski
On Fri, 11 Sep 2020 22:55:54 +0100 Edward Cree wrote: > On 11/09/2020 22:42, Jesse Brandeburg wrote: > > Thanks Ed, I think I might just remove the /** on that function then > > (removing it from kdoc processing) > I dunno, that means > a) kerneldoc won't generate html for this struct > b) new ad

Re: [RFC PATCH net-next v1 00/11] make drivers/net/ethernet W=1 clean

2020-09-11 Thread Jakub Kicinski
On Fri, 11 Sep 2020 14:34:05 -0700 Jesse Brandeburg wrote: > If I'm not mistaken *all* the warnings you had listed are from C=1 > (sparse) which would be best fixed with a second set of patches. This > set of patches only aimed to get rid of the W=1 (gcc warnings and kdoc > warnings from scripts/ke

Re: [PATCH net-next 7/8] ixgbe: add pause frame stats

2020-09-11 Thread Jakub Kicinski
On Fri, 11 Sep 2020 14:12:50 -0700 Alexander Duyck wrote: > On Fri, Sep 11, 2020 at 12:53 PM Jakub Kicinski wrote: > > @@ -3546,6 +3556,7 @@ static const struct ethtool_ops ixgbe_ethtool_ops = { > > .set_eeprom = ixgbe_set_eeprom, > > .get_ringparam = ixgbe_get

[PATCH net-next] octeontx2-af: Constify npc_kpu_profile_{action,cam}

2020-09-11 Thread Rikard Falkeborn
These are never modified, so constify them to allow the compiler to place them in read-only memory. This moves about 25kB to read-only memory as seen by the output of the size command. Before: textdata bss dec hex filename 296203 654641248 362915 589a3 drivers/net/eth

Re: [PATCH net-next 0/3] sfc: misc cleanups

2020-09-11 Thread David Miller
From: Jakub Kicinski Date: Fri, 11 Sep 2020 14:00:38 -0700 > On Fri, 11 Sep 2020 19:43:26 +0100 Edward Cree wrote: >> Clean up a few nits I noticed while working on TXQ stuff. > > Reviewed-by: Jakub Kicinski Series applied.

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

2020-09-11 Thread Edward Cree
On 11/09/2020 22:42, Jesse Brandeburg wrote: > Thanks Ed, I think I might just remove the /** on that function then > (removing it from kdoc processing) I dunno, that means a) kerneldoc won't generate html for this struct b) new additions to the struct without corresponding kerneldoc won't    gener

Re: [PATCH net-next] bridge: mcast: Fix incomplete MDB dump

2020-09-11 Thread David Miller
From: Ido Schimmel Date: Fri, 11 Sep 2020 16:24:47 +0300 > From: Ido Schimmel > > Each MDB entry is encoded in a nested netlink attribute called > 'MDBA_MDB_ENTRY'. In turn, this attribute contains another nested > attributed called 'MDBA_MDB_ENTRY_INFO', which encodes a single port > group ent

Re: [PATCH net-next 6/8] mlx5: add pause frame stats

2020-09-11 Thread Saeed Mahameed
On Fri, 2020-09-11 at 12:52 -0700, Jakub Kicinski wrote: > Plumb through all the indirection and copy some code from > ethtool -S. The names of the group indicate that these are > the stats we are after. > Yes they are. > Signed-off-by: Jakub Kicinski > --- > drivers/net/ethernet/mellanox/mlx5

Re: [PATCH] ipv6: remove redundant assignment to variable err

2020-09-11 Thread David Miller
From: Colin King Date: Fri, 11 Sep 2020 11:35:09 +0100 > From: Colin Ian King > > The variable err is being initialized with a value that is never read and > it is being updated later with a new value. The initialization is redundant > and can be removed. Also re-order variable declarations in

Re: [PATCH net] enetc: Fix mdio bus removal on PF probe bailout

2020-09-11 Thread David Miller
From: Claudiu Manoil Date: Fri, 11 Sep 2020 13:16:35 +0300 > This is the correct resolution for the conflict from > merging the "net" tree fix: > commit 26cb7085c898 ("enetc: Remove the mdio bus on PF probe bailout") > with the "net-next" new work: > commit 07095c025ac2 ("net: enetc: Use DT proto

Re: [PATCH v1 0/2] ag71xx: add ethtool and flow control support

2020-09-11 Thread David Miller
From: Oleksij Rempel Date: Fri, 11 Sep 2020 10:25:26 +0200 > The main target of this patches is to provide flow control support > for ag71xx driver. To be able to validate this functionality, I also > added ethtool support with HW counters. So, this patches was validated > with iperf3 and counter

RE: [net-next v5 3/5] devlink: introduce flash update overwrite mask

2020-09-11 Thread Keller, Jacob E
> -Original Message- > From: Jakub Kicinski > Sent: Thursday, September 10, 2020 6:34 PM > To: Keller, Jacob E > Cc: netdev@vger.kernel.org > Subject: Re: [net-next v5 3/5] devlink: introduce flash update overwrite mask > > On Thu, 10 Sep 2020 18:32:29 -0700 Jakub Kicinski wrote: > >

Re: [PATCH net-next] drivers/net/wan/x25_asy: Remove an unused flag "SLF_OUTWAIT"

2020-09-11 Thread David Miller
From: Xie He Date: Thu, 10 Sep 2020 23:35:03 -0700 > The "SLF_OUTWAIT" flag defined in x25_asy.h is not actually used. > It is only cleared at one place in x25_asy.c but is never read or set. > So we can remove it. > > Signed-off-by: Xie He Applied, it looks like this code wss based upon the s

Re: [RFC PATCH net-next v1 11/11] drivers/net/ethernet: clean up mis-targeted comments

2020-09-11 Thread Jesse Brandeburg
Edward Cree wrote: > On 11/09/2020 02:23, Jesse Brandeburg wrote: > > + * @MC_CMD_PTP_IN_TRANSMIT_LENMAX: hack to get W=1 to compile > I think I'd rather have a bogus warning than bogus kerneldocto suppress it; >  please drop this line (and encourage toolchain folks to figure out how to >  get ker

Re: [PATCH net-next] net/socket.c: Remove an unused header file

2020-09-11 Thread David Miller
From: Xie He Date: Thu, 10 Sep 2020 23:07:20 -0700 > This header file is not actually used in this file. Let's remove it. How did you test this assertion? As Jakub showed, the dlci_ioctl_set() function needs to be declared because socket.c references it. All of your visual scanning of the code

Re: [PATCH net-next] net: dsa: b53: Configure VLANs while not filtering

2020-09-11 Thread David Miller
From: Florian Fainelli Date: Fri, 11 Sep 2020 11:28:27 -0700 > > > On 9/10/2020 9:19 PM, Florian Fainelli wrote: >> Update the B53 driver to support VLANs while not filtering. This >> requires us to enable VLAN globally within the switch upon driver >> initial configuration (dev->vlan_enabled).

Re: [PATCH net-next] net: stmmac: set get_rx_header_len() as void for it didn't have any error code to return

2020-09-11 Thread David Miller
From: Luo Jiaxing Date: Fri, 11 Sep 2020 11:55:58 +0800 > We found the following warning when using W=1 to build kernel: > > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3634:6: warning: variable > ‘ret’ set but not used [-Wunused-but-set-variable] > int ret, coe = priv->hw->rx_csum; > >

Re: [RFC PATCH net-next v1 00/11] make drivers/net/ethernet W=1 clean

2020-09-11 Thread Jesse Brandeburg
Jakub Kicinski wrote: > Yeah, maybe you need COMPILE_TEST? (full list of the warnings triggered > by the last patch at the end of the email) Ah, good idea, I checked and I have that set, however, I understand what's going on now. > > but I'd like to target the actual job you're running and use

  1   2   3   >