Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

2020-10-11 Thread Ira Weiny
On Fri, Oct 09, 2020 at 06:30:36PM -0700, Eric Biggers wrote: > On Sat, Oct 10, 2020 at 01:39:54AM +0100, Matthew Wilcox wrote: > > On Fri, Oct 09, 2020 at 02:34:34PM -0700, Eric Biggers wrote: > > > On Fri, Oct 09, 2020 at 12:49:57PM -0700, ira.we...@intel.com wrote: > > > > The kmap() calls in th

[PATCH net-next V2] cxgb4/ch_ipsec: Replace the module name to ch_ipsec from chcr

2020-10-11 Thread Ayush Sawal
This patch changes the module name to "ch_ipsec" and prepends "ch_ipsec" string instead of "chcr" in all debug messages and function names. V1->V2: -Removed inline keyword from functions. -Removed CH_IPSEC prefix from pr_debug. -Used proper indentation for the continuation line of the function arg

Re: [PATCH net-next 04/12] net: usb: qmi_wwan: use new function dev_fetch_sw_netstats

2020-10-11 Thread Bjørn Mork
Heiner Kallweit writes: > Simplify the code by using new function dev_fetch_sw_netstats(). > > Signed-off-by: Heiner Kallweit Acked-by: Bjørn Mork

Re: [PATCH net-next] mlx4: handle non-napi callers to napi_poll

2020-10-11 Thread Tariq Toukan
On Mon, 12 Oct 2020 at 05:47, Jakub Kicinski wrote: > > On Thu, 8 Oct 2020 11:45:26 -0700 Jonathan Lemon wrote: > > From: Jonathan Lemon > > > > netcons calls napi_poll with a budget of 0 to transmit packets. > > Handle this by: > > - skipping RX processing > > - do not try to recycle TX packet

Re: [PATCH iproute2] lib: ignore invalid mounts in cg_init_map

2020-10-11 Thread Stephen Hemminger
On Thu, 8 Oct 2020 20:59:27 +0300 Dmitry Yakunin wrote: > In case of bad entries in /proc/mounts just skip cgroup cache initialization. > Cgroups in output will be shown as "unreachable:cgroup_id". > > Fixes: d5e6ee0dac64 ("ss: introduce cgroup2 cache and helper functions") > Signed-off-by: Dmi

Re: [PATCHv3] selftests: rtnetlink: load fou module for kci_test_encap_fou() test

2020-10-11 Thread Po-Hsu Lin
Hello, Is there any update on this patch? Thanks! PHLin On Fri, Sep 18, 2020 at 6:39 PM Po-Hsu Lin wrote: > > Hello folks, > > any thoughts on this patch? > It can make the test pass and reduce the failure numbers in > kselftests, it will be great to have this applied. > > Thanks > PHLin > > > On

Re: [PATCH RFC PKS/PMEM 57/58] nvdimm/pmem: Stray access protection for pmem->virt_addr

2020-10-11 Thread Ira Weiny
On Fri, Oct 09, 2020 at 07:53:07PM -0700, John Hubbard wrote: > On 10/9/20 12:50 PM, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > The pmem driver uses a cached virtual address to access its memory > > directly. Because the nvdimm driver is well aware of the special > > protections it h

Re: PHY reset question

2020-10-11 Thread Oleksij Rempel
Hi all, thank you for the feedback! On Fri, Oct 09, 2020 at 04:25:49PM +0200, Bruno Thomsen wrote: > Hi Fabio and Oleksij > > Den ons. 7. okt. 2020 kl. 11.50 skrev Fabio Estevam : > > > > Hi Oleksij, > > > > On Tue, Oct 6, 2020 at 5:05 AM Oleksij Rempel > > wrote: > > > > > > Hello PHY experts

Re: [PATCH net-next 1/2] dt-bindings: net: dsa: b53: Add YAML bindings

2020-10-11 Thread Kurt Kanzenbach
On Sun Oct 11 2020, Florian Fainelli wrote: > On 10/11/2020 1:32 AM, Kurt Kanzenbach wrote: >> How should we proceed? Adding the missing compatible strings and ports >> to the DTS files? Or adjusting the include files? > > The include is correct as it provides the fallback family string which > is

Re: [PATCH net-next v6 2/7] net: dsa: Add DSA driver for Hirschmann Hellcreek switches

2020-10-11 Thread Kurt Kanzenbach
On Sun Oct 11 2020, Vladimir Oltean wrote: > On Sun, Oct 11, 2020 at 02:29:08PM +0200, Kurt Kanzenbach wrote: >> On Tue Oct 06 2020, Vladimir Oltean wrote: >> > It would be interesting to see if you could simply turn off VLAN >> > awareness in standalone mode, and still use unique pvids per port. >

Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread()

2020-10-11 Thread Ira Weiny
On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > The

Re: [PATCH net-next v3] virtio-net: ethtool configurable RXCSUM

2020-10-11 Thread Jason Wang
On 2020/10/12 上午9:58, xiangxia.m@gmail.com wrote: From: Tonghao Zhang Allow user configuring RXCSUM separately with ethtool -K, reusing the existing virtnet_set_guest_offloads helper that configures RXCSUM for XDP. This is conditional on VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. If Rx checksum i

Re: [PATCH RFC PKS/PMEM 10/58] drivers/rdma: Utilize new kmap_thread()

2020-10-11 Thread Ira Weiny
On Sat, Oct 10, 2020 at 11:36:49AM +, Bernard Metzler wrote: > -ira.we...@intel.com wrote: - > [snip] > >@@ -505,7 +505,7 @@ static int siw_tx_hdt(struct siw_iwarp_tx *c_tx, > >struct socket *s) > > page_array[seg] = p; > > > >

[PATCH net] net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid

2020-10-11 Thread Anant Thazhemadam
In p9_fd_create_unix, checking is performed to see if the addr (passed as an argument) is NULL or not. However, no check is performed to see if addr is a valid address, i.e., it doesn't entirely consist of only 0's. The initialization of sun_server.sun_path to be equal to this faulty addr value lea

Re: [External] Re: [PATCH] mm: proc: add Sock to /proc/meminfo

2020-10-11 Thread Muchun Song
On Mon, Oct 12, 2020 at 2:39 AM Cong Wang wrote: > > On Sat, Oct 10, 2020 at 3:39 AM Muchun Song wrote: > > > > The amount of memory allocated to sockets buffer can become significant. > > However, we do not display the amount of memory consumed by sockets > > buffer. In this case, knowing where

Re: [RFC 1/1] net/tls(TLS_SW): Handle -ENOSPC error return from device/AES-NI

2020-10-11 Thread Herbert Xu
On Fri, Oct 09, 2020 at 09:48:30AM -0700, Jakub Kicinski wrote: > > Are you saying that if we set CRYPTO_TFM_REQ_MAY_BACKLOG we should > never see ENOSPC with a correctly functioning driver? Or do we need > to handle both errors, regardless? Correct, you will never see ENOSPC if you request MAY_B

Re: [PATCH net-next 9/9] bnxt_en: Add stored FW version info to devlink info_get cb.

2020-10-11 Thread Vasundhara Volam
On Mon, Oct 12, 2020 at 4:01 AM Michael Chan wrote: > > On Sun, Oct 11, 2020 at 3:02 PM Jakub Kicinski wrote: > > > > On Sun, 11 Oct 2020 06:23:01 -0400 Michael Chan wrote: > > > + rc = bnxt_hwrm_nvm_get_dev_info(bp, &nvm_dev_info); > > > + if (rc) > > > + return rc; > > > > T

Re: [PATCH bpf-next v6 2/6] bpf: add redirect_peer helper

2020-10-11 Thread David Ahern
On 10/11/20 10:16 AM, Daniel Borkmann wrote: >> >> This is awesome results and great work Daniel! :-) +1 >> >> I wonder if we can also support this from XDP, which can also native >> redirect into veth.  Originally I though we could add the peer netdev >> in the devmap, but AFAIK Toke showed me t

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

2020-10-11 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/mptcp/protocol.h between commit: d582484726c4 ("mptcp: fix fallback for MP_JOIN subflows") from the net tree and commit: d0876b2284cf ("mptcp: add the incoming RM_ADDR support") from the net-next tree. I fixe

Re: [PATCH RFC PKS/PMEM 26/58] fs/zonefs: Utilize new kmap_thread()

2020-10-11 Thread Damien Le Moal
On 2020/10/10 4:52, ira.we...@intel.com wrote: > From: Ira Weiny > > The kmap() calls in this FS are localized to a single thread. To avoid > the over head of global PKRS updates use the new kmap_thread() call. > > Cc: Damien Le Moal > Cc: Naohiro Aota > Signed-off-by: Ira Weiny > --- > fs/

Re: [PATCH] rtw88: fix fw_fifo_addr check

2020-10-11 Thread Nathan Chancellor
On Sun, Oct 11, 2020 at 08:54:38AM -0700, t...@redhat.com wrote: > From: Tom Rix > > The clang build reports this warning > > fw.c:1485:21: warning: address of array 'rtwdev->chip->fw_fifo_addr' > will always evaluate to 'true' > if (!rtwdev->chip->fw_fifo_addr) { > > fw_fifo_addr is

Re: [PATCH 3/3] selinux: Add SELinux GTP support

2020-10-11 Thread Paul Moore
On Wed, Sep 30, 2020 at 9:39 AM Harald Welte wrote: > Hi Richard, > > On Wed, Sep 30, 2020 at 01:25:27PM +0100, Richard Haines wrote: > > > As in the reply to Pablo, I did it for no particular reason other than > > idle curiosity, and given the attempted move to Open 5G I thought > > adding MAC su

Re: [PATCH v3] genl: ctrl: print op -> policy idx mapping

2020-10-11 Thread David Ahern
On 10/3/20 1:45 AM, Johannes Berg wrote: > Newer kernels can dump per-op policies, so print out the new > mapping attribute to indicate which op has which policy. > > v2: > * print out both do/dump policy idx > v3: > * fix userspace API which renumbered after patch rebasing > applied to iprout

Re: [PATCH iproute2-next 0/6] bridge: mdb: add support for IGMPv3/MLDv2 attributes

2020-10-11 Thread David Ahern
On 10/8/20 6:50 AM, Nikolay Aleksandrov wrote: > From: Nikolay Aleksandrov > > Hi, > This set adds support for IGMPv3/MLDv2 attributes, they're mostly > read-only at the moment. The only new "set" option is the source address > for S,G entries. It is added in patch 01 (see the patch commit messag

[PATCH net-next v3] virtio-net: ethtool configurable RXCSUM

2020-10-11 Thread xiangxia . m . yue
From: Tonghao Zhang Allow user configuring RXCSUM separately with ethtool -K, reusing the existing virtnet_set_guest_offloads helper that configures RXCSUM for XDP. This is conditional on VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. If Rx checksum is disabled, LRO should also be disabled. Cc: Michael S. T

Re: [PATCH net-next 08/12] net: dsa: use new function dev_fetch_sw_netstats

2020-10-11 Thread Florian Fainelli
On 10/11/2020 12:41 PM, Heiner Kallweit wrote: Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli -- Florian

[PATCH 0/6] Netfilter/IPVS updates for net-next

2020-10-11 Thread Pablo Neira Ayuso
Hi, The following patchset contains Netfilter/IPVS updates for net-next: 1) Inspect the reply packets coming from DR/TUN and refresh connection state and timeout, from longguang yue and Julian Anastasov. 2) Series to add support for the inet ingress chain type in nf_tables. Please, pull thes

[PATCH 3/6] netfilter: add nf_ingress_hook() helper function

2020-10-11 Thread Pablo Neira Ayuso
Add helper function to check if this is an ingress hook. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/core.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net/netfilter/core.c b/net/netfilter/core.c index b9ec8ecf7e30..c82f779a587e 100644 --- a/net/netfilter/

[PATCH 1/6] ipvs: inspect reply packets from DR/TUN real servers

2020-10-11 Thread Pablo Neira Ayuso
From: "longguang.yue" Just like for MASQ, inspect the reply packets coming from DR/TUN real servers and alter the connection's state and timeout according to the protocol. It's ipvs's duty to do traffic statistic if packets get hit, no matter what mode it is. Signed-off-by: longguang.yue Signe

[PATCH 2/6] netfilter: add nf_static_key_{inc,dec}

2020-10-11 Thread Pablo Neira Ayuso
Add helper functions increment and decrement the hook static keys. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/core.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 3ac7c8c1548d..b9ec8ecf7e30 1

[PATCH 4/6] netfilter: add inet ingress support

2020-10-11 Thread Pablo Neira Ayuso
This patch adds the NF_INET_INGRESS pseudohook for the NFPROTO_INET family. This is a mapping this new hook to the existing NFPROTO_NETDEV and NF_NETDEV_INGRESS hook. The hook does not guarantee that packets are inet only, users must filter out non-ip traffic explicitly. This infrastructure makes

[PATCH 6/6] netfilter: flowtable: reduce calls to pskb_may_pull()

2020-10-11 Thread Pablo Neira Ayuso
Make two unfront calls to pskb_may_pull() to linearize the network and transport header. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_flow_table_core.c | 12 +++- net/netfilter/nf_flow_table_ip.c | 45 +- 2 files changed, 30 insertions(+), 27 deletions(

[PATCH 5/6] netfilter: nf_tables: add inet ingress support

2020-10-11 Thread Pablo Neira Ayuso
This patch adds a new ingress hook for the inet family. The inet ingress hook emulates the IP receive path code, therefore, unclean packets are drop before walking over the ruleset in this basechain. This patch also introduces the nft_base_chain_netdev() helper function to check if this hook is bo

RE: [PATCH] bpf: Avoid allocing memory on memoryless numa node

2020-10-11 Thread Tianxianting
Thanks Alexei for your suggestion, I will try to do it. -Original Message- From: Alexei Starovoitov [mailto:alexei.starovoi...@gmail.com] Sent: Monday, October 12, 2020 9:21 AM To: tianxianting (RD) Cc: Alexei Starovoitov ; Daniel Borkmann ; David S. Miller ; Jakub Kicinski ; Jesper Da

Re: [PATCH v2 4/4] dt-bindings: usb: use preferred license tag

2020-10-11 Thread Chunfeng Yun
On Sat, 2020-10-10 at 11:50 +0200, Greg Kroah-Hartman wrote: > On Sat, Oct 10, 2020 at 04:43:14PM +0800, Chunfeng Yun wrote: > > This is used to fix the checkpach.pl WARNING:SPDX_LICENSE_TAG > > > > See bindings/submitting-patches.rst: > > "DT binding files should be dual licensed. The preferred l

Re: [PATCH] bpf: Avoid allocing memory on memoryless numa node

2020-10-11 Thread Alexei Starovoitov
On Sat, Oct 10, 2020 at 1:55 AM Xianting Tian wrote: > > In architecture like powerpc, we can have cpus without any local memory > attached to it. In such cases the node does not have real memory. > > Use local_memory_node(), which is guaranteed to have memory. > local_memory_node is a noop in oth

Re: [bpf-next PATCH 0/4] bpf, sockmap: allow verdict only sk_skb progs

2020-10-11 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (refs/heads/master): On Sat, 10 Oct 2020 22:08:29 -0700 you wrote: > This allows a sockmap sk_skb verdict programs to run without a parser. For > some use cases, such as verdict program that support streaming data or a > l3/l4 proxy that does not

Re: [bpf-next PATCH v2 0/6] sockmap/sk_skb program memory acct fixes

2020-10-11 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (refs/heads/master): On Fri, 09 Oct 2020 11:35:53 -0700 you wrote: > Users of sockmap and skmsg trying to build proxys and other tools > have pointed out to me the error handling can be problematic. If > the proxy is under-provisioned and/or the

Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today

2020-10-11 Thread Masahiro Yamada
On Fri, Oct 2, 2020 at 9:21 PM Arnd Bergmann wrote: > > I do care about the tree as a whole, and I'm particularly interested in > having -Wmissing-declarations/-Wmissing-prototypes enabled globally > at some point in the future. > > Arnd BTW, if possible, please educate me about the diff

merge window is open. bpf-next is still open.

2020-10-11 Thread Alexei Starovoitov
Hi BPF developers, The merge window has just opened. Which would typically mean that bpf-next is closing, but things are going to be a little bit different this time. We're stopping to accept new features into bpf-next/master. The few pending patches might get applied and imminent pull-req into ne

RE: [PATCH] net: Avoid allocing memory on memoryless numa node

2020-10-11 Thread Tianxianting
Hi Jakub, Thanks for your suggestion, Let me try it :-) -Original Message- From: Jakub Kicinski [mailto:k...@kernel.org] Sent: Monday, October 12, 2020 3:18 AM To: tianxianting (RD) Cc: da...@davemloft.net; netdev@vger.kernel.org; linux-ker...@vger.kernel.org Subject: Re: [PATCH] net: Av

Re: ip rule iif oif and vrf

2020-10-11 Thread David Ahern
On 9/30/20 7:23 PM, Stephen Suryaputra wrote: > On Thu, Sep 24, 2020 at 08:41:54AM -0600, David Ahern wrote: >>> We have multiple options on the table right now. One that can be done >>> without writing any code is to use an nft prerouting rule to mark >>> the packet with iif equals the tunnel and

Re: [RFC PATCH 0/3] l3mdev icmp error route lookup fixes

2020-10-11 Thread David Ahern
On 10/5/20 9:30 AM, David Ahern wrote: > On 9/25/20 1:04 PM, Mathieu Desnoyers wrote: >> Hi, >> >> Here is an updated series of fixes for ipv4 and ipv6 which which ensure >> the route lookup is performed on the right routing table in VRF >> configurations when sending TTL expired icmp errors (usefu

Re: [PATCH bpf-next V3 0/6] bpf: New approach for BPF MTU handling

2020-10-11 Thread Jakub Kicinski
On Sat, 10 Oct 2020 16:52:48 -0700 John Fastabend wrote: > Jakub Kicinski wrote: > > FWIW I took a quick swing at testing it with the HW I have and it did > > exactly what hardware should do. The TX unit entered an error state > > and then the driver detected that and reset it a few seconds later.

Re: [PATCH v2] net: korina: fix kfree of rx/tx descriptor array

2020-10-11 Thread Willem de Bruijn
On Sun, Oct 11, 2020 at 6:04 PM Valentin Vidic wrote: > > kmalloc returns KSEG0 addresses so convert back from KSEG1 > in kfree. Also make sure array is freed when the driver is > unloaded from the kernel. > > Fixes: ef11291bcd5f ("Add support the Korina (IDT RC32434) Ethernet MAC") > Signed-off-b

Re: [PATCH 1/2] cx82310_eth: re-enable ethernet mode after router reboot

2020-10-11 Thread Jakub Kicinski
On Sat, 10 Oct 2020 16:00:46 +0200 Ondrej Zary wrote: > When the router is rebooted without a power cycle, the USB device > remains connected but its configuration is reset. This results in > a non-working ethernet connection with messages like this in syslog: > usb 2-2: RX packet too long: 6

Re: [PATCH net-next 8/9] bnxt_en: Refactor bnxt_dl_info_get().

2020-10-11 Thread Michael Chan
On Sun, Oct 11, 2020 at 2:59 PM Jakub Kicinski wrote: > > On Sun, 11 Oct 2020 06:23:00 -0400 Michael Chan wrote: > > +static int bnxt_dl_info_put(struct bnxt *bp, struct devlink_info_req *req, > > + enum bnxt_dl_version_type type, const char *key, > > +

Re: [Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly

2020-10-11 Thread Xie He
On Sun, Oct 11, 2020 at 12:11 PM Cong Wang wrote: > > @@ -626,8 +626,7 @@ static netdev_tx_t ipgre_xmit(struct sk_buff *skb, > > if (dev->header_ops) { > /* Need space for new headers */ > - if (skb_cow_head(skb, dev->needed_headroom - > -

Re: [PATCH net-next 00/12] net: add and use function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

2020-10-11 Thread Jakub Kicinski
On Mon, 12 Oct 2020 00:29:52 +0200 Heiner Kallweit wrote: > On 12.10.2020 00:10, Jakub Kicinski wrote: > > On Sun, 11 Oct 2020 21:34:58 +0200 Heiner Kallweit wrote: > >> In several places the same code is used to populate rtnl_link_stats64 > >> fields with data from pcpu_sw_netstats. Therefore fa

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-11 Thread Jakub Kicinski
On Sat, 10 Oct 2020 18:41:14 +0300 Ido Schimmel wrote: > From: Danielle Ratson > > Currently, when auto negotiation is on, the user can advertise all the > linkmodes which correspond to a specific speed, but does not have a > similar selector for the number of lanes. This is significant when a >

Re: [PATCH net-next 9/9] bnxt_en: Add stored FW version info to devlink info_get cb.

2020-10-11 Thread Michael Chan
On Sun, Oct 11, 2020 at 3:02 PM Jakub Kicinski wrote: > > On Sun, 11 Oct 2020 06:23:01 -0400 Michael Chan wrote: > > + rc = bnxt_hwrm_nvm_get_dev_info(bp, &nvm_dev_info); > > + if (rc) > > + return rc; > > This will not cause an error to be returned for the entire operation on

Re: [PATCH net-next 00/12] net: add and use function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

2020-10-11 Thread Heiner Kallweit
On 12.10.2020 00:10, Jakub Kicinski wrote: > On Sun, 11 Oct 2020 21:34:58 +0200 Heiner Kallweit wrote: >> In several places the same code is used to populate rtnl_link_stats64 >> fields with data from pcpu_sw_netstats. Therefore factor out this code >> to a new function dev_fetch_sw_netstats(). >

Re: [PATCH RFC] net: add helper eth_set_protocol

2020-10-11 Thread Heiner Kallweit
On 12.10.2020 00:13, Jakub Kicinski wrote: > On Tue, 6 Oct 2020 22:10:00 +0200 Heiner Kallweit wrote: >> In all cases I've seen eth_type_trans() is used as in the new helper. >> Biggest benefit is improved readability when replacing statements like >> the following: >> desc->skb->protocol = eth_typ

Re: [PATCH net-next 3/9] bnxt_en: Set driver default message level.

2020-10-11 Thread Michael Chan
On Sun, Oct 11, 2020 at 2:53 PM Jakub Kicinski wrote: > > I'm talking about bnxt_dbg_dump_states specifically. > > I'm looking at net-next: > > bnxt_rx_pkt >bnxt_sched_reset > set_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event); > > > bnxt_sp_task >bnxt_reset > bnxt_reset_task >

Re: [PATCH v2] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-11 Thread Stephen Rothwell
Hi Greg, On Sun, 11 Oct 2020 23:00:30 +0530 Anant Thazhemadam wrote: > > In set_ethernet_addr(), if get_registers() succeeds, the ethernet address > that was read must be copied over. Otherwise, a random ethernet address > must be assigned. > > get_registers() returns 0 if successful, and negat

Re: [PATCH RFC] net: add helper eth_set_protocol

2020-10-11 Thread Jakub Kicinski
On Tue, 6 Oct 2020 22:10:00 +0200 Heiner Kallweit wrote: > In all cases I've seen eth_type_trans() is used as in the new helper. > Biggest benefit is improved readability when replacing statements like > the following: > desc->skb->protocol = eth_type_trans(desc->skb, priv->dev); > > Coccinelle te

Re: [PATCH net-next 00/12] net: add and use function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

2020-10-11 Thread Jakub Kicinski
On Sun, 11 Oct 2020 21:34:58 +0200 Heiner Kallweit wrote: > In several places the same code is used to populate rtnl_link_stats64 > fields with data from pcpu_sw_netstats. Therefore factor out this code > to a new function dev_fetch_sw_netstats(). FWIW probably fine to convert nfp_repr_get_host_st

Re: [PATCH net-next 01/12] net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

2020-10-11 Thread Jakub Kicinski
On Sun, 11 Oct 2020 21:36:43 +0200 Heiner Kallweit wrote: > In several places the same code is used to populate rtnl_link_stats64 > fields with data from pcpu_sw_netstats. Therefore factor out this code > to a new function dev_fetch_sw_netstats(). > > Signed-off-by: Heiner Kallweit > +/** > + *

Re: [Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly

2020-10-11 Thread Xie He
On Sun, Oct 11, 2020 at 2:01 PM Willem de Bruijn wrote: > > There is agreement that hard_header_len should be the length of link > layer headers visible to the upper layers, needed_headroom the > additional room required for headers that are not exposed, i.e., those > pushed inside ndo_start_xmit.

[PATCH v2] net: korina: fix kfree of rx/tx descriptor array

2020-10-11 Thread Valentin Vidic
kmalloc returns KSEG0 addresses so convert back from KSEG1 in kfree. Also make sure array is freed when the driver is unloaded from the kernel. Fixes: ef11291bcd5f ("Add support the Korina (IDT RC32434) Ethernet MAC") Signed-off-by: Valentin Vidic --- v2: convert kfree address back to KSEG0 dr

Re: [PATCH net-next 9/9] bnxt_en: Add stored FW version info to devlink info_get cb.

2020-10-11 Thread Jakub Kicinski
On Sun, 11 Oct 2020 06:23:01 -0400 Michael Chan wrote: > + rc = bnxt_hwrm_nvm_get_dev_info(bp, &nvm_dev_info); > + if (rc) > + return rc; This will not cause an error to be returned for the entire operation on older FW or HW, right? > + if (!(nvm_dev_info.flags & NVM_GET_D

Re: [PATCH net-next 8/9] bnxt_en: Refactor bnxt_dl_info_get().

2020-10-11 Thread Jakub Kicinski
On Sun, 11 Oct 2020 06:23:00 -0400 Michael Chan wrote: > +static int bnxt_dl_info_put(struct bnxt *bp, struct devlink_info_req *req, > + enum bnxt_dl_version_type type, const char *key, > + char *buf) > +{ > + if (!strlen(buf)) > + ret

Re: [PATCH net-next 3/9] bnxt_en: Set driver default message level.

2020-10-11 Thread Jakub Kicinski
On Sun, 11 Oct 2020 14:13:04 -0700 Michael Chan wrote: > On Sun, Oct 11, 2020 at 12:34 PM Jakub Kicinski wrote: > > > > On Sun, 11 Oct 2020 06:22:55 -0400 Michael Chan wrote: > > > Currently, bp->msg_enable has default value of 0. It is more useful > > > to have the commonly used NETIF_MSG_DRV

Re: [Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly

2020-10-11 Thread Xie He
On Sun, Oct 11, 2020 at 2:07 PM Willem de Bruijn wrote: > > On Sun, Oct 11, 2020 at 4:42 PM Xie He wrote: > > > > Hi, thanks for attempting to fix this tunnel. Are we still considering > > removing header_ops->create? > > > > As said in my email sent previously today, I want to remove > > header_

Re: [Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly

2020-10-11 Thread Willem de Bruijn
On Sun, Oct 11, 2020 at 5:00 PM Willem de Bruijn wrote: > > On Sun, Oct 11, 2020 at 3:11 PM Cong Wang wrote: > > > > GRE tunnel has its own header_ops, ipgre_header_ops, and sets it > > conditionally. When it is set, it assumes the outer IP header is > > already created before ipgre_xmit(). > > >

[PATCH] e1000: drop unneeded assignment in e1000_set_itr()

2020-10-11 Thread Sudip Mukherjee
The variable 'current_itr' is assigned to 0 before jumping to 'set_itr_now' but it has not been used after the jump. So, remove the unneeded assignement. Signed-off-by: Sudip Mukherjee --- drivers/net/ethernet/intel/e1000/e1000_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/ne

Re: [PATCH] net: korina: free array used for rx/tx descriptors

2020-10-11 Thread Valentin Vidić
On Sun, Oct 11, 2020 at 02:37:33PM -0400, Willem de Bruijn wrote: > Slightly off-topic, but I don't fully fathom what goes on with this > pointer straight after the initial kmalloc. > > lp->td_ring = (struct dma_desc *)KSEG1ADDR(lp->td_ring); KSEG1ADDR should rewrite the memory address in

Re: [PATCH net-next 3/9] bnxt_en: Set driver default message level.

2020-10-11 Thread Michael Chan
On Sun, Oct 11, 2020 at 12:34 PM Jakub Kicinski wrote: > > On Sun, 11 Oct 2020 06:22:55 -0400 Michael Chan wrote: > > Currently, bp->msg_enable has default value of 0. It is more useful > > to have the commonly used NETIF_MSG_DRV and NETIF_MSG_HW enabled by > > default. > > > > Reviewed-by: Edwin

Re: [Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly

2020-10-11 Thread Willem de Bruijn
On Sun, Oct 11, 2020 at 4:42 PM Xie He wrote: > > On Sun, Oct 11, 2020 at 12:11 PM Cong Wang wrote: > > > > GRE tunnel has its own header_ops, ipgre_header_ops, and sets it > > conditionally. When it is set, it assumes the outer IP header is > > already created before ipgre_xmit(). > > > > This i

Re: [Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly

2020-10-11 Thread Willem de Bruijn
On Sun, Oct 11, 2020 at 3:11 PM Cong Wang wrote: > > GRE tunnel has its own header_ops, ipgre_header_ops, and sets it > conditionally. When it is set, it assumes the outer IP header is > already created before ipgre_xmit(). > > This is not true when we send packets through a raw packet socket, > w

Re: [Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly

2020-10-11 Thread Xie He
On Sun, Oct 11, 2020 at 12:11 PM Cong Wang wrote: > > GRE tunnel has its own header_ops, ipgre_header_ops, and sets it > conditionally. When it is set, it assumes the outer IP header is > already created before ipgre_xmit(). > > This is not true when we send packets through a raw packet socket, >

Re: [PATCH net-next 01/12] net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

2020-10-11 Thread Heiner Kallweit
On 11.10.2020 21:54, Stephen Hemminger wrote: > On Sun, 11 Oct 2020 21:36:43 +0200 > Heiner Kallweit wrote: > >> +void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, >> + struct pcpu_sw_netstats __percpu *netstats) > > netstats is unmodified, should it be const? > >> +

Re: [PATCH net-next 08/12] net: dsa: use new function dev_fetch_sw_netstats

2020-10-11 Thread Vladimir Oltean
On Sun, Oct 11, 2020 at 09:41:27PM +0200, Heiner Kallweit wrote: > Simplify the code by using new function dev_fetch_sw_netstats(). > > Signed-off-by: Heiner Kallweit > --- Tested-by: Vladimir Oltean

Re: [PATCH v2] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-11 Thread Joe Perches
On Sun, 2020-10-11 at 22:31 +0300, Petko Manolov wrote: > On 20-10-11 11:33:00, Joe Perches wrote: > > On Sun, 2020-10-11 at 10:59 -0700, Jakub Kicinski wrote: > > > On Sun, 11 Oct 2020 23:00:30 +0530 Anant Thazhemadam wrote: > > > > In set_ethernet_addr(), if get_registers() succeeds, the ethernet

[PATCH] ptp: ptp_clockmatrix: initialize variables

2020-10-11 Thread trix
From: Tom Rix Clang static analysis reports this representative problem ptp_clockmatrix.c:1852:2: warning: 5th function call argument is an uninitialized value snprintf(idtcm->version, sizeof(idtcm->version), "%u.%u.%u", ^

Re: [PATCH bpf-next] bpf: Migrate from patchwork.ozlabs.org to patchwork.kernel.org.

2020-10-11 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (refs/heads/master): On Sun, 11 Oct 2020 13:01:49 -0700 you wrote: > From: Alexei Starovoitov > > Move the bpf/bpf-next patch processing queue to patchwork.kernel.org. > > Signed-off-by: Alexei Starovoitov > --- > > [...] Here is the summary

Re: [PATCH 4/5] net/ipv6: use semicolons rather than commas to separate statements

2020-10-11 Thread Paul Moore
On Sun, Oct 11, 2020 at 7:18 AM Julia Lawall wrote: > > Replace commas with semicolons. Commas introduce unnecessary > variability in the code structure and are hard to see. What is done > is essentially described by the following Coccinelle semantic patch > (http://coccinelle.lip6.fr/): > > //

Re: [PATCH bpf-next v2] bpf_fib_lookup: optionally skip neighbour lookup

2020-10-11 Thread Daniel Borkmann
On 10/10/20 3:42 PM, Toke Høiland-Jørgensen wrote: Daniel Borkmann writes: On 10/9/20 11:28 PM, David Ahern wrote: On 10/9/20 11:42 AM, Toke Høiland-Jørgensen wrote: David Ahern writes: On 10/9/20 3:13 AM, Toke Høiland-Jørgensen wrote: The bpf_fib_lookup() helper performs a neighbour looku

[PATCH bpf-next] bpf: Migrate from patchwork.ozlabs.org to patchwork.kernel.org.

2020-10-11 Thread Alexei Starovoitov
From: Alexei Starovoitov Move the bpf/bpf-next patch processing queue to patchwork.kernel.org. Signed-off-by: Alexei Starovoitov --- Hi All BPF developers, we've migrated bpf patchwork to kernel.org. Please monitor the bpf queue at https://patchwork.kernel.org/project/netdevbpf/list/?delegate

Re: [PATCH net-next 01/12] net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

2020-10-11 Thread Stephen Hemminger
On Sun, 11 Oct 2020 21:36:43 +0200 Heiner Kallweit wrote: > +void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, > +struct pcpu_sw_netstats __percpu *netstats) netstats is unmodified, should it be const? > +{ > + int cpu; > + > + if (IS_ERR_OR_NULL(netstats))

[PATCH net-next 03/12] net: macsec: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- drivers/net/macsec.c | 25 + 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index 2b0c8f01d..e74483279 100644 ---

[PATCH net-next 10/12] mac80211: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- net/mac80211/iface.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 240862a74..1be775979 100644 --- a

[PATCH net-next 06/12] qtnfmac: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- drivers/net/wireless/quantenna/qtnfmac/core.c | 27 +-- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/w

[PATCH net-next 05/12] net: usbnet: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- drivers/net/usb/usbnet.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 963d260d1..6062dc278

[PATCH net-next 02/12] IB/hfi1: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- drivers/infiniband/hw/hfi1/ipoib_main.c | 34 + 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/ipoib_main.c b/drivers/infiniband/

[PATCH net-next 09/12] iptunnel: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_tunnel_core.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index b2ea1a8c5..25f1caf

[PATCH net-next 11/12] net: openvswitch: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- net/openvswitch/vport-internal_dev.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal

[PATCH net-next 08/12] net: dsa: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- net/dsa/slave.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index e7c1d62fd..3bc5ca40c 100644 --- a/net/dsa/slave.c

[PATCH net-next 07/12] net: bridge: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- net/bridge/br_device.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 9a2fb4aa1..6f742fee8 100644 -

[PATCH net-next 04/12] net: usb: qmi_wwan: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- drivers/net/usb/qmi_wwan.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 5ca1356b8..a32

[PATCH net-next 12/12] xfrm: use new function dev_fetch_sw_netstats

2020-10-11 Thread Heiner Kallweit
Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- net/xfrm/xfrm_interface.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c index 5b120936d..aa4cdcf6

[PATCH net-next 01/12] net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

2020-10-11 Thread Heiner Kallweit
In several places the same code is used to populate rtnl_link_stats64 fields with data from pcpu_sw_netstats. Therefore factor out this code to a new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit --- include/linux/netdevice.h | 2 ++ net/core/dev.c| 36 +++

[PATCH net-next 00/12] net: add and use function dev_fetch_sw_netstats for fetching pcpu_sw_netstats

2020-10-11 Thread Heiner Kallweit
In several places the same code is used to populate rtnl_link_stats64 fields with data from pcpu_sw_netstats. Therefore factor out this code to a new function dev_fetch_sw_netstats(). Heiner Kallweit (12): net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats IB/hfi1:

Re: [PATCH net-next 3/9] bnxt_en: Set driver default message level.

2020-10-11 Thread Jakub Kicinski
On Sun, 11 Oct 2020 06:22:55 -0400 Michael Chan wrote: > Currently, bp->msg_enable has default value of 0. It is more useful > to have the commonly used NETIF_MSG_DRV and NETIF_MSG_HW enabled by > default. > > Reviewed-by: Edwin Peer > Reviewed-by: Vasundhara Volam > Signed-off-by: Michael Chan

Re: [PATCH v2] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-11 Thread Petko Manolov
On 20-10-11 11:33:00, Joe Perches wrote: > On Sun, 2020-10-11 at 10:59 -0700, Jakub Kicinski wrote: > > On Sun, 11 Oct 2020 23:00:30 +0530 Anant Thazhemadam wrote: > > > In set_ethernet_addr(), if get_registers() succeeds, the ethernet address > > > that was read must be copied over. Otherwise, a r

Re: [PATCH net-next] cxgb4/ch_ipsec: Replace the module name to ch_ipsec from chcr

2020-10-11 Thread Jakub Kicinski
On Thu, 8 Oct 2020 19:30:15 +0530 Ayush Sawal wrote: > @@ -140,8 +141,8 @@ static int ch_ipsec_uld_state_change(void *handle, enum > cxgb4_state new_state) > return 0; > } > > -static inline int chcr_ipsec_setauthsize(struct xfrm_state *x, > - struct

Re: [PATCH] net: Avoid allocing memory on memoryless numa node

2020-10-11 Thread Jakub Kicinski
On Sun, 11 Oct 2020 12:11:40 +0800 Xianting Tian wrote: > In architecture like powerpc, we can have cpus without any local memory > attached to it. In such cases the node does not have real memory. > > Use local_memory_node(), which is guaranteed to have memory. > local_memory_node is a noop in ot

Re: BUG: unable to handle kernel paging request in tcf_action_dump_terse

2020-10-11 Thread Cong Wang
#syz fix: net_sched: check error pointer in tcf_dump_walker()

[Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly

2020-10-11 Thread Cong Wang
GRE tunnel has its own header_ops, ipgre_header_ops, and sets it conditionally. When it is set, it assumes the outer IP header is already created before ipgre_xmit(). This is not true when we send packets through a raw packet socket, where L2 headers are supposed to be constructed by user. Packet

Re: [Linux-kernel-mentees] [PATCH net] ethtool: strset: Fix out of bound read in strset_parse_request()

2020-10-11 Thread Anmol karn
Hello sir, On Sun, Oct 11, 2020 at 10:24 PM Jakub Kicinski wrote: > > On Sun, 11 Oct 2020 02:39:29 +0530 Anmol Karn wrote: > > Flag ``ETHTOOL_A_STRSET_COUNTS_ONLY`` tells the kernel to only return the > > string > > counts of the sets, but, when req_info->counts_only tries to read the > > tb[ETHT

  1   2   >