Re: [PATCH iproute2] tc: flower: fix json output with mpls lse

2021-01-11 Thread Guillaume Nault
On Mon, Jan 11, 2021 at 08:30:32AM -0700, David Ahern wrote: > On 1/11/21 3:57 AM, Guillaume Nault wrote: > > Okay, but, in the end, should I repost this patch? > > I think your patches are covered, but you should check the repo to make > sure. This patch ("tc: flower: fix json output with mpls l

Re: [PATCH net-next 0/2] dsa: add MT7530 GPIO support

2021-01-11 Thread Marek Behún
Qingfang, what modes does the LED support? Does it support blinking on rx/tx? What about link status? I'd like to know because I am still working on patches which add ethernet PHY/switch LEDs, with transparent offloading of netdev trigger. Marek On Mon, 11 Jan 2021 13:44:26 +0800 DENG Qingfang

Re: [PATCH net-next v2 0/2] Dissect PTP L2 packet header

2021-01-11 Thread Andrew Lunn
On Mon, Jan 11, 2021 at 11:46:50AM +0200, Eran Ben Elisha wrote: > Hi Jakub, Dave, > > This series adds support for dissecting PTP L2 packet > header (EtherType 0x88F7). > > For packet header dissecting, skb->protocol is needed. Add protocol > parsing operation to vlan ops, to guarantee skb->prot

Re: [PATCH] Signed-off-by: giladreti

2021-01-11 Thread Marek Behún
The Signed-off-by line should be last in the commit message, not first. First line (which becomes e-mail subject) should describe what the commit does (in a short one liner) and where it does it. So for your patch it could be something like bpf: support pointer to mem register spilling in verifi

Re: [PATCH] Signed-off-by: giladreti

2021-01-11 Thread Daniel Borkmann
Hello Gilad, On 1/11/21 4:31 PM, giladreti wrote: Added support for pointer to mem register spilling, to allow the verifier to track pointer to valid memory addresses. Such pointers are returned for example by a successful call of the bpf_ringbuf_reserve helper. This patch was suggested as a so

Re: [QUESTION] build errors and warnings when make M=samples/bpf

2021-01-11 Thread Yonghong Song
On 1/11/21 12:17 AM, Tiezhu Yang wrote: Hi all, I found the following build errors and warnings when make M=samples/bpf on the Loongson 3A3000 platform which belongs to MIPS arch. Are theseknown issues? Should I submit patches to fix them? (1) fatal error: 'asm/rwonce.h' file not found Th

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-11 Thread Yonghong Song
On 1/11/21 2:17 AM, KP Singh wrote: On Mon, Jan 11, 2021 at 7:27 AM Yonghong Song wrote: On 1/8/21 3:19 PM, Song Liu wrote: To access per-task data, BPF program typically creates a hash table with pid as the key. This is not ideal because: 1. The use need to estimate requires size of

Re: [PATCH iproute2] tc: flower: fix json output with mpls lse

2021-01-11 Thread David Ahern
On 1/11/21 8:44 AM, Guillaume Nault wrote: > On Mon, Jan 11, 2021 at 08:30:32AM -0700, David Ahern wrote: >> On 1/11/21 3:57 AM, Guillaume Nault wrote: >>> Okay, but, in the end, should I repost this patch? >> >> I think your patches are covered, but you should check the repo to make >> sure. > >

Re: [PATCH] Signed-off-by: giladreti

2021-01-11 Thread Gilad Reti
On Mon, Jan 11, 2021, 17:55 Daniel Borkmann wrote: > > Hello Gilad, > > On 1/11/21 4:31 PM, giladreti wrote: > > Added support for pointer to mem register spilling, to allow the verifier > > to track pointer to valid memory addresses. Such pointers are returned > > for example by a successful call

Re: [PATCH iproute2] tc: flower: fix json output with mpls lse

2021-01-11 Thread Guillaume Nault
On Mon, Jan 11, 2021 at 09:02:04AM -0700, David Ahern wrote: > On 1/11/21 8:44 AM, Guillaume Nault wrote: > > On Mon, Jan 11, 2021 at 08:30:32AM -0700, David Ahern wrote: > >> On 1/11/21 3:57 AM, Guillaume Nault wrote: > >>> Okay, but, in the end, should I repost this patch? > >> > >> I think your

[PATCH bpf-next 2/2] bpf: extend bind v4/v6 selftests for mark/prio/bindtoifindex

2021-01-11 Thread Daniel Borkmann
Extend existing cgroup bind4/bind6 tests to add coverage for setting and retrieving SO_MARK, SO_PRIORITY and SO_BINDTOIFINDEX at the bind hook. Signed-off-by: Daniel Borkmann --- .../testing/selftests/bpf/progs/bind4_prog.c | 41 +-- .../testing/selftests/bpf/progs/bind6_prog.c

[PATCH bpf-next 1/2] bpf: allow to retrieve sol_socket opts from sock_addr progs

2021-01-11 Thread Daniel Borkmann
The _bpf_setsockopt() is able to set some of the SOL_SOCKET level options, however, _bpf_getsockopt() has little support to actually retrieve them. This small patch adds few misc options such as SO_MARK, SO_PRIORITY and SO_BINDTOIFINDEX. For the latter getter and setter are added. The mark and prio

Re: [PATCH net-next 1/2] net: move the hsize check to the else block in skb_segment

2021-01-11 Thread Alexander Duyck
On Mon, Jan 11, 2021 at 4:45 AM Xin Long wrote: > > After commit 89319d3801d1 ("net: Add frag_list support to skb_segment"), > it goes to process frag_list when !hsize in skb_segment(). However, when > using skb frag_list, sg normally should not be set. In this case, hsize > will be set with len r

Re: [PATCH net-next v14 1/6] dt-bindings: net: Add 5GBASER phy interface

2021-01-11 Thread Andrew Lunn
On Mon, Jan 11, 2021 at 02:21:51AM +0100, Marek Behún wrote: > From: Pavana Sharma > > Add 5gbase-r PHY interface mode. > > Signed-off-by: Pavana Sharma > Reviewed-by: Andrew Lunn > Reviewed-by: Marek Behún > Acked-by: Rob Herring Hi Marek Now that you are posting these patches, they need

Re: [PATCH v1 1/2] net: phy: Add 100 base-x mode

2021-01-11 Thread Russell King - ARM Linux admin
On Mon, Jan 11, 2021 at 02:06:56PM +0100, Bjarni Jonasson wrote: > Sparx-5 supports this mode and it is missing in the PHY core. > > Signed-off-by: Bjarni Jonasson Oh, I forgot - please can we have the new PHY mode documented in Documentation/networking/phy.rst under the "PHY interface modes" se

Re: [PATCH net-next v14 2/6] net: phy: Add 5GBASER interface mode

2021-01-11 Thread Russell King - ARM Linux admin
On Mon, Jan 11, 2021 at 02:21:52AM +0100, Marek Behún wrote: > From: Pavana Sharma > > Add 5GBASE-R phy interface mode > > Signed-off-by: Pavana Sharma > Reviewed-by: Andrew Lunn > Reviewed-by: Marek Behún Please document this in Documentation/networking/phy.rst under the "PHY interface mode

Re: [PATCHv2 net-next] ip_gre: remove CRC flag from dev features in gre_gso_segment

2021-01-11 Thread Alexander Duyck
On Mon, Jan 11, 2021 at 5:22 AM Xin Long wrote: > > This patch is to let it always do CRC checksum in sctp_gso_segment() > by removing CRC flag from the dev features in gre_gso_segment() for > SCTP over GRE, just as it does in Commit 527beb8ef9c0 ("udp: support > sctp over udp in skb_udp_tunnel_se

Re: [PATCH iproute2 v3 1/1] build: Fix link errors on some systems

2021-01-11 Thread Petr Machata
Roi Dayan writes: > diff --git a/lib/json_print_math.c b/lib/json_print_math.c > new file mode 100644 > index ..3d560defcd3e > --- /dev/null > +++ b/lib/json_print_math.c > @@ -0,0 +1,46 @@ > +/* > + * json_print_math.c "print regular or json output, based on > json_writer"

Re: [PATCH v3 net-next 02/10] net: mscc: ocelot: add ops for decoding watermark threshold and occupancy

2021-01-11 Thread Vladimir Oltean
On Sat, Jan 09, 2021 at 05:20:46PM -0800, Jakub Kicinski wrote: > On Fri, 8 Jan 2021 19:59:42 +0200 Vladimir Oltean wrote: > > + *inuse = (val & GENMASK(23, 12)) >> 12; > > FWIW FIELD_GET() Do you mind if I don't use it? I don't feel that: *inuse = FIELD_GET(GENMASK(23, 12), val); look

Re: [PATCH v3 net-next 04/10] net: dsa: felix: reindent struct dsa_switch_ops

2021-01-11 Thread Vladimir Oltean
On Sat, Jan 09, 2021 at 05:24:19PM -0800, Jakub Kicinski wrote: > On Fri, 8 Jan 2021 19:59:44 +0200 Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > The devlink function pointer names are super long, and they would break > > the alignment. So reindent the existing ops now by adding one ta

[PATCH net-next] dpaa2-eth: add support for Rx VLAN filtering

2021-01-11 Thread Ioana Ciornei
From: Ionut-robert Aron Declare Rx VLAN filtering as supported and user-changeable only when there are VLAN filtering entries available on the DPNI object. Even then, rx-vlan-filtering is by default disabled. Also, populate the .ndo_vlan_rx_add_vid() and .ndo_vlan_rx_kill_vid() callbacks for addi

[PATCH net] net: dcb: Accept RTM_GETDCB messages carrying set-like DCB commands

2021-01-11 Thread Petr Machata
In commit 826f328e2b7e ("net: dcb: Validate netlink message in DCB handler"), Linux started rejecting RTM_GETDCB netlink messages if they contained a set-like DCB_CMD_ command. The reason was that privileges were only verified for RTM_SETDCB messages, but the value that determined the action to be

Re: linux-next: Tree for Jan 11 (drivers/net/ipa/ipa_main.o)

2021-01-11 Thread Randy Dunlap
On 1/10/21 8:46 PM, Stephen Rothwell wrote: > Hi all, > > Changes since 20210108: > on x86_64: ld: drivers/net/ipa/ipa_main.o: in function `ipa_remove': ipa_main.c:(.text+0x20d): undefined reference to `rproc_put' ld: drivers/net/ipa/ipa_mem.o: in function `ipa_mem_init': ipa_mem.c:(.text+0x59f

Re: [PATCH v3 1/1] can: dev: add software tx timestamps

2021-01-11 Thread Richard Cochran
On Sun, Jan 10, 2021 at 09:49:03PM +0900, Vincent Mailhol wrote: > * The hardware rx timestamp of a local loopback message is the > hardware tx timestamp. This means that there are no needs to > implement SOF_TIMESTAMPING_TX_HARDWARE for CAN sockets. I can't agree with that statement. T

Re: [PATCH 1/6] ethernet: stmmac: remove redundant null check for ptp clock

2021-01-11 Thread Andrew Lunn
On Mon, Jan 11, 2021 at 07:35:33PM +0800, Joakim Zhang wrote: > Remove redundant null check for ptp clock. > > Fixes: 1c35cc9cf6a0 ("net: stmmac: remove redundant null check before > clk_disable_unprepare()") > Signed-off-by: Joakim Zhang Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v3 net-next 08/10] net: mscc: ocelot: register devlink ports

2021-01-11 Thread Vladimir Oltean
On Sat, Jan 09, 2021 at 05:44:39PM -0800, Jakub Kicinski wrote: > On Fri, 8 Jan 2021 19:59:48 +0200 Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > Add devlink integration into the mscc_ocelot switchdev driver. Only the > > probed interfaces are registered with devlink, because for conv

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-11 Thread Yonghong Song
On 1/8/21 3:19 PM, Song Liu wrote: To access per-task data, BPF program typically creates a hash table with pid as the key. This is not ideal because: 1. The use need to estimate requires size of the hash table, with may be inaccurate; 2. Big hash tables are slow; 3. To clean up the

[PATCH net-next] dpaa2-mac: fix the remove path for non-MAC interfaces

2021-01-11 Thread Ioana Ciornei
From: Ioana Ciornei Check if the interface is indeed connected to a MAC before trying to close the DPMAC object representing it. Without this check we end up working with a NULL pointer. Fixes: d87e606373f6 ("dpaa2-mac: export MAC counters even when in TYPE_FIXED") Signed-off-by: Ioana Ciornei

RE: Security issue with vmxnet3 and e100 for AMD SEV(-SNP) / Intel TDX

2021-01-11 Thread Kleen, Andi
>Let us know if you are interested in our fuzzing/static analysis setup. >We're planning to submit a paper soon and we will publish the source >code >along with the paper. We already have an own static analysis/fuzzing frame work, but it's not released yet. -Andi

Re: Kernel panic on shutdown (qede+bond+bridge) - KASAN: use-after-free in netif_skb_features+0x90a/0x9b0

2021-01-11 Thread Igor Russkikh
>> I've been trying out the latest CentOS 8 Stream kernel and found that I >> get kernel panic > (https://urldefense.proofpoint.com/v2/url?u=https-3A__bugzilla.redhat.com_ > show-5Fbug.cgi-3Fid-3D1913481&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=3kUjVPjr > PMvlbd3rzgP63W0eewvCq4D-kzQRqaXHOqU&m=5qgG2X2

Re: [PATCH 2/6] ethernet: stmmac: stop each tx channal independently

2021-01-11 Thread Florian Fainelli
On 1/11/21 3:35 AM, Joakim Zhang wrote: > If clear GMAC_CONFIG_TE bit, it would stop all tx channals, but users > may only want to stop secific tx channel. > > Fixes: 48863ce5940f ("stmmac: add DMA support for GMAC 4.xx") > Signed-off-by: Joakim Zhang You have a typo in your subject:channal vs.

Re: [PATCH 4/6] ethernet: stmmac: fix dma physical address of descriptor when display ring

2021-01-11 Thread Florian Fainelli
On 1/11/21 3:35 AM, Joakim Zhang wrote: > Driver uses dma_alloc_coherent to allocate dma memory for descriptors, > dma_alloc_coherent will return both the virtual address and physical > address. AFAIK, virt_to_phys could not convert virtual address to > physical address, for which memory is allocat

Re: [PATCH bpf-next 2/4] selftests/bpf: add non-BPF_LSM test for task local storage

2021-01-11 Thread Yonghong Song
On 1/8/21 3:19 PM, Song Liu wrote: Task local storage is enabled for tracing programs. Add a test for it without CONFIG_BPF_LSM. Signed-off-by: Song Liu --- .../bpf/prog_tests/test_task_local_storage.c | 34 + .../selftests/bpf/progs/task_local_storage.c | 37 +++

[RFC PATCH bpf-next 0/2] bpf, libbpf: share BTF data show functionality

2021-01-11 Thread Alan Maguire
The BPF Type Format (BTF) can be used in conjunction with the helper bpf_snprintf_btf() to display kernel data with type information. This series generalizes that support and shares it with libbpf so that libbpf can display typed data. BTF display functionality is factored out of kernel/bpf/btf.c

[RFC PATCH bpf-next 2/2] selftests/bpf: test libbpf-based type display

2021-01-11 Thread Alan Maguire
Test btf__snprintf with various base/kernel types and ensure display is as expected; tests are identical to those in snprintf_btf test save for the fact these run in userspace rather than BPF program context. Signed-off-by: Alan Maguire --- .../selftests/bpf/prog_tests/snprintf_btf_user.c | 19

[RFC PATCH bpf-next 1/2] bpf: share BTF "show" implementation between kernel and libbpf

2021-01-11 Thread Alan Maguire
libbpf already supports a "dumper" API for dumping type information, but there is currently no support for dumping typed _data_ via libbpf. However this functionality does exist in the kernel, in part to facilitate the bpf_snprintf_btf() helper which dumps a string representation of the pointer pas

Re: UBSAN: object-size-mismatch in wg_xmit

2021-01-11 Thread Jeffrey Walton
On Mon, Jan 11, 2021 at 12:20 PM Dmitry Vyukov wrote: > ... > FTR, I've disabled the following UBSAN configs: > UBSAN_MISC > UBSAN_DIV_ZERO > UBSAN_BOOL > UBSAN_OBJECT_SIZE > UBSAN_SIGNED_OVERFLOW > UBSAN_UNSIGNED_OVERFLOW > UBSAN_ENUM > UBSAN_ALIGNMENT > UBSAN_UNREACHABLE > > Only these are enabl

Re: [PATCH bpf-next 3/4] bpf: runqslower: prefer use local vmlinux

2021-01-11 Thread Yonghong Song
On 1/8/21 3:19 PM, Song Liu wrote: Update the Makefile to prefer using ../../../vmlinux, which has latest definitions for vmlinux.h Signed-off-by: Song Liu --- tools/bpf/runqslower/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/bpf/runqslower/Makefile

Re: [PATCH net 6/9] MAINTAINERS: mtk-eth: remove Felix

2021-01-11 Thread Jakub Kicinski
On Sun, 10 Jan 2021 21:45:46 -0800 Joe Perches wrote: > On Sun, 2021-01-10 at 21:27 -0800, Jakub Kicinski wrote: > > Drop Felix from Mediatek Ethernet driver maintainers. > > We haven't seen any tags since the initial submission. > [] > > diff --git a/MAINTAINERS b/MAINTAINERS > [] > > @@ -1116

[PATCH v4 net-next 06/10] net: mscc: ocelot: export NUM_TC constant from felix to common switch lib

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean We should be moving anything that isn't DSA-specific or SoC-specific out of the felix DSA driver, and into the common mscc_ocelot switch library. The number of traffic classes is one of the aspects that is common between all ocelot switches, so it belongs in the library. T

[PATCH v4 net-next 03/10] net: dsa: add ops for devlink-sb

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean Switches that care about QoS might have hardware support for reserving buffer pools for individual ports or traffic classes, and configuring their sizes and thresholds. Through devlink-sb (shared buffers), this is all configurable, as well as their occupancy being viewable.

[PATCH v4 net-next 04/10] net: dsa: felix: reindent struct dsa_switch_ops

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean The devlink function pointer names are super long, and they would break the alignment. So reindent the existing ops now by adding one tab. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- Changes in v4: None. Changes in v3: None. Changes in v2: None. d

[PATCH v4 net-next 05/10] net: dsa: felix: perform teardown in reverse order of setup

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean In general it is desirable that cleanup is the reverse process of setup. In this case I am not seeing any particular issue, but with the introduction of devlink-sb for felix, a non-obvious decision had to be made as to where to put its cleanup method. When there's a conventi

[PATCH v4 net-next 09/10] net: mscc: ocelot: initialize watermarks to sane defaults

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean This is meant to be a gentle introduction into the world of watermarks on ocelot. The code is placed in ocelot_devlink.c because it will be integrated with devlink, even if it isn't right now. My first step was intended to be to replicate the default configuration of the co

[PATCH v4 net-next 07/10] net: mscc: ocelot: delete unused ocelot_set_cpu_port prototype

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean This is a leftover of commit 69df578c5f4b ("net: mscc: ocelot: eliminate confusion between CPU and NPI port") which renamed that function. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- Changes in v4: None. Changes in v3: None. Changes in v2: None. d

[PATCH v4 net-next 08/10] net: mscc: ocelot: register devlink ports

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean Add devlink integration into the mscc_ocelot switchdev driver. All physical ports (i.e. the unused ones as well) except the CPU port module at ocelot->num_phys_ports are registered with devlink, and that requires keeping the devlink_port structure outside struct ocelot_port_

Re: [PATCH bpf-next 2/4] selftests/bpf: add non-BPF_LSM test for task local storage

2021-01-11 Thread KP Singh
On Mon, Jan 11, 2021 at 6:31 PM Yonghong Song wrote: > > > > On 1/8/21 3:19 PM, Song Liu wrote: > > Task local storage is enabled for tracing programs. Add a test for it > > without CONFIG_BPF_LSM. Can you also explain what the test does in the commit log? It would also be nicer to have a somewh

[PATCH v4 net-next 02/10] net: mscc: ocelot: add ops for decoding watermark threshold and occupancy

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean We'll need to read back the watermark thresholds and occupancy from hardware (for devlink-sb integration), not only to write them as we did so far in ocelot_port_set_maxlen. So introduce 2 new functions in struct ocelot_ops, similar to wm_enc, and implement them for the 3 su

[PATCH v4 net-next 10/10] net: mscc: ocelot: configure watermarks using devlink-sb

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean Using devlink-sb, we can configure 12/16 (the important 75%) of the switch's controlling watermarks for congestion drops, and we can monitor 50% of the watermark occupancies (we can monitor the reservation watermarks, but not the sharing watermarks, which are exposed as pool

[PATCH v4 net-next 00/10] Configuring congestion watermarks on ocelot switch using devlink-sb

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean In some applications, it is important to create resource reservations in the Ethernet switches, to prevent background traffic, or deliberate attacks, from inducing denial of service into the high-priority traffic. These patches give the user some knobs to turn. The ocelot s

[PATCH v4 net-next 01/10] net: mscc: ocelot: auto-detect packet buffer size and number of frame references

2021-01-11 Thread Vladimir Oltean
From: Vladimir Oltean Instead of reading these values from the reference manual and writing them down into the driver, it appears that the hardware gives us the option of detecting them dynamically. The number of frame references corresponds to what the reference manual notes, however it seems t

Re: [PATCH net-next v14 2/6] net: phy: Add 5GBASER interface mode

2021-01-11 Thread Marek Behún
On Mon, 11 Jan 2021 16:48:03 + Russell King - ARM Linux admin wrote: > Please document this in Documentation/networking/phy.rst under the > "PHY interface modes" section. Thanks. Should this documentation come in a separate patch? Or can it be embedded in this one?

Re: [PATCH bpf-next 4/4] bpf: runqslower: use task local storage

2021-01-11 Thread Yonghong Song
On 1/8/21 3:19 PM, Song Liu wrote: Replace hashtab with task local storage in runqslower. This improves the performance of these BPF programs. The following table summarizes average runtime of these programs, in nanoseconds: task-local hash-prealloc hash-no-prea

[PATCH v1 1/2] net: phy: Add 100 base-x mode

2021-01-11 Thread Bjarni Jonasson
Sparx-5 supports this mode and it is missing in the PHY core. Signed-off-by: Bjarni Jonasson --- include/linux/phy.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/phy.h b/include/linux/phy.h index 56563e5e0dc7..dce867222d58 100644 --- a/include/linux/phy.h +++ b/include/l

[PATCH v1 0/2] Add 100 base-x mode

2021-01-11 Thread Bjarni Jonasson
Adding support for 100 base-x in phylink. The Sparx5 switch supports 100 base-x pcs (IEEE 802.3 Clause 24) 4b5b encoded. These patches adds phylink support for that mode. Tested in Sparx5, using sfp modules: Axcen 100fx AXFE-1314-0521 Cisco GLC-FE-100LX HP SFP 100FX J9054C Excom SFP-SX-M1002 Bja

[PATCH v1 2/2] sfp: add support for 100 base-x SFPs

2021-01-11 Thread Bjarni Jonasson
Add support for 100Base-FX, 100Base-LX, 100Base-PX and 100Base-BX10 modules This is needed for Sparx-5 switch. Signed-off-by: Bjarni Jonasson --- drivers/net/phy/sfp-bus.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c index 580

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

2021-01-11 Thread Jakub Kicinski
On Mon, 11 Jan 2021 14:00:20 + Danielle Ratson wrote: > > > @@ -420,6 +423,7 @@ struct ethtool_pause_stats { > > > * of the generic netdev features interface. > > > */ > > > struct ethtool_ops { > > > + u32 capabilities; > > > > An appropriately named bitfield seems better. Alternat

[PATCH net-next 1/3] bus: mhi: core: Add helper API to return number of free TREs

2021-01-11 Thread Loic Poulain
From: Hemant Kumar Introduce mhi_get_free_desc_count() API to return number of TREs available to queue buffer. MHI clients can use this API to know before hand if ring is full without calling queue API. Signed-off-by: Hemant Kumar Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam -

[PATCH net-next 2/3] net: mhi: Get RX queue size from MHI core

2021-01-11 Thread Loic Poulain
The RX queue size can be determined at runtime by retrieving the number of available transfer descriptors. Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index b7f7f2e..

[PATCH net-next 3/3] net: mhi: Get rid of local rx queue count

2021-01-11 Thread Loic Poulain
Use the new mhi_get_free_desc_count helper to track queue usage instead of relying on the locally maintained rx_queued count. Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers/ne

Re: [PATCH net-next 1/2] udp: call udp_encap_enable for v6 sockets when enabling encap

2021-01-11 Thread kernel test robot
Hi Xin, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Xin-Long/net-enable-udp-v6-sockets-receiving-v4-packets-with-UDP-GRO/20210111-205115 base: https://git.kernel.org/pub/scm/linux/kernel/git

Re: [net-next 15/19] can: tcan4x5x: rework SPI access

2021-01-11 Thread Jakub Kicinski
On Mon, 11 Jan 2021 16:35:30 +0100 Ahmad Fatoum wrote: > Hello Jakub, > > On 08.01.21 17:32, Jakub Kicinski wrote: > > On Fri, 8 Jan 2021 11:07:26 +0100 Ahmad Fatoum wrote: > > +struct __packed tcan4x5x_map_buf { > > + struct tcan4x5x_buf_cmd cmd; > > + u8 data[256 * si

[PATCH] bpf: Hoise pahole version checks into Kconfig

2021-01-11 Thread Nathan Chancellor
After commit da5fb18225b4 ("bpf: Support pre-2.25-binutils objcopy for vmlinux BTF"), having CONFIG_DEBUG_INFO_BTF enabled but lacking a valid copy of pahole results in a kernel that will fully compile but fail to link. The user then has to either install pahole or disable CONFIG_DEBUG_INFO_BTF and

Re: [PATCH bpf 1/2] bpf: allow empty module BTFs

2021-01-11 Thread Yonghong Song
On 1/9/21 11:03 PM, Andrii Nakryiko wrote: Some modules don't declare any new types and end up with an empty BTF, containing only valid BTF header and no types or strings sections. This currently causes BTF validation error. There is nothing wrong with such BTF, so fix the issue by allowing mo

[PATCH net] i40e: fix potential NULL pointer dereferencing

2021-01-11 Thread Cristian Dumitrescu
Currently, the function i40e_construct_skb_zc only frees the input xdp buffer when the output skb is successfully built. On error, the function i40e_clean_rx_irq_zc does not commit anything for the current packet descriptor and simply exits the packet descriptor processing loop, with the plan to re

Re: [PATCH bpf 2/2] libbpf: allow loading empty BTFs

2021-01-11 Thread Yonghong Song
On 1/9/21 11:03 PM, Andrii Nakryiko wrote: Empty BTFs do come up (e.g., simple kernel modules with no new types and strings, compared to the vmlinux BTF) and there is nothing technically wrong with them. So remove unnecessary check preventing loading empty BTFs. Reported-by: Christopher Willi

Re: [PATCH net-next v2 0/2] Dissect PTP L2 packet header

2021-01-11 Thread Eran Ben Elisha
On 1/11/2021 5:49 PM, Andrew Lunn wrote: On Mon, Jan 11, 2021 at 11:46:50AM +0200, Eran Ben Elisha wrote: Hi Jakub, Dave, This series adds support for dissecting PTP L2 packet header (EtherType 0x88F7). For packet header dissecting, skb->protocol is needed. Add protocol parsing operation to

Re: UBSAN: object-size-mismatch in wg_xmit

2021-01-11 Thread Jeffrey Walton
On Mon, Jan 11, 2021 at 12:58 PM Dmitry Vyukov wrote: > > On Mon, Jan 11, 2021 at 6:35 PM Jeffrey Walton wrote: > > > > On Mon, Jan 11, 2021 at 12:20 PM Dmitry Vyukov wrote: > > > ... > > > FTR, I've disabled the following UBSAN configs: > > > UBSAN_MISC > > > UBSAN_DIV_ZERO > > > UBSAN_BOOL > >

[PATCH net-next v3 0/2] Dissect PTP L2 packet header

2021-01-11 Thread Eran Ben Elisha
Hi Jakub, Dave, This series adds support for dissecting PTP L2 packet header (EtherType 0x88F7). For packet header dissecting, skb->protocol is needed. Add protocol parsing operation to vlan ops, to guarantee skb->protocol is set, as EtherType 0x88F7 occasionally follows a vlan header. Changelog

[PATCH net-next v3 1/2] net: vlan: Add parse protocol header ops

2021-01-11 Thread Eran Ben Elisha
Add parse protocol header ops for vlan device. Before this patch, vlan tagged packet transmitted by af_packet had skb->protocol unset. Some kernel methods (like __skb_flow_dissect()) rely on this missing information for its packet processing. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Touk

[PATCH net-next v3 2/2] net: flow_dissector: Parse PTP L2 packet header

2021-01-11 Thread Eran Ben Elisha
Add support for parsing PTP L2 packet header. Such packet consists of an L2 header (with ethertype of ETH_P_1588), PTP header, body and an optional suffix. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan --- net/core/flow_dissector.c | 16 1 file changed, 16 insertions

[PATCH bpf-next 0/2] Allow attaching to bare tracepoints

2021-01-11 Thread Qais Yousef
Add some missing glue logic to teach bpf about bare tracepoints - tracepoints without any trace event associated with them. Bare tracepoints are declare with DECLARE_TRACE(). Full tracepoints are declare with TRACE_EVENT(). BPF can attach to these tracepoints as RAW_TRACEPOINT() only as there's n

[PATCH bpf-next 1/2] trace: bpf: Allow bpf to attach to bare tracepoints

2021-01-11 Thread Qais Yousef
Some subsystems only have bare tracepoints (a tracepoint with no associated trace event) to avoid the problem of trace events being an ABI that can't be changed. >From bpf presepective, bare tracepoints are what it calls RAW_TRACEPOINT(). Since bpf assumed there's 1:1 mapping, it relied on hookin

[PATCH bpf-next 2/2] selftests: bpf: Add a new test for bare tracepoints

2021-01-11 Thread Qais Yousef
Reuse module_attach infrastructure to add a new bare tracepoint to check we can attach to it as a raw tracepoint. Signed-off-by: Qais Yousef --- Andrii I was getting the error below when I was trying to run the test. I had to comment out all related fentry* code to be able to test the raw_tp st

[PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-11 Thread Alexander Lobakin
Inspired by cpu_map_kthread_run() and _kfree_skb_defer() logics. Currently, all sorts of skb allocation always do allocate skbuff_heads one by one via kmem_cache_alloc(). On the other hand, we have percpu napi_alloc_cache to store skbuff_heads queued up for freeing and flush them by bulks. We can

[PATCH net-next 1/5] skbuff: rename fields of struct napi_alloc_cache to be more intuitive

2021-01-11 Thread Alexander Lobakin
skb_cache and skb_count fields are used to store skbuff_heads queued for freeing to flush them by bulks, and aren't related to allocation path. Give them more obvious names to improve code understanding and allow to expand this struct with more allocation-related elements. Misc: indent struct napi

[PATCH net-next 2/5] skbuff: open-code __build_skb() inside __napi_alloc_skb()

2021-01-11 Thread Alexander Lobakin
In preparation for skbuff_heads caching and reusing, open-code __build_skb() inside __napi_alloc_skb() with factoring out the skbbuff_head allocation itself. Note that the return value of __build_skb_around() is not checked since it never returns anything except the given skb. Signed-off-by: Alexa

[PATCH net-next 3/5] skbuff: reuse skbuff_heads from flush_skb_cache if available

2021-01-11 Thread Alexander Lobakin
Instead of unconditional allocating a new skbuff_head and unconditional flushing of flush_skb_cache, reuse the ones queued up for flushing if there are any. skbuff_heads stored in flush_skb_cache are already unreferenced from any pages or extensions and almost ready for use. We perform zeroing in _

[PATCH net-next 5/5] skbuff: refill skb_cache early from deferred-to-consume entries

2021-01-11 Thread Alexander Lobakin
Instead of unconditional queueing of ready-to-consume skbuff_heads to flush_skb_cache, feed skb_cache with them instead if it's not full already. This greatly reduces the frequency of kmem_cache_alloc_bulk() calls. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 5 + 1 file changed,

[PATCH net-next 4/5] skbuff: allocate skbuff_heads by bulks instead of one by one

2021-01-11 Thread Alexander Lobakin
Use the same napi_alloc_cache struct and the same approach as used for bulk-freeing skbuff_heads to allocate them for new skbs. The new skb_cache will store up to NAPI_SKB_CACHE_SIZE (currently 64, which equals to NAPI_POLL_WEIGHT to be capable to serve one polling cycle) and will be refilled by bu

Re: [PATCH net-next] net: bareudp: simplify error paths calling dellink

2021-01-11 Thread Cong Wang
On Sun, Jan 10, 2021 at 9:29 PM Jakub Kicinski wrote: > > bareudp_dellink() only needs the device list to hand it to > unregister_netdevice_queue(). We can pass NULL in, and > unregister_netdevice_queue() will do the unregistering. > There is no chance for batching on the error path, anyway. > > S

Re: [PATCH net-next 1/5] skbuff: rename fields of struct napi_alloc_cache to be more intuitive

2021-01-11 Thread Jonathan Lemon
On Mon, Jan 11, 2021 at 06:28:21PM +, Alexander Lobakin wrote: > skb_cache and skb_count fields are used to store skbuff_heads queued > for freeing to flush them by bulks, and aren't related to allocation > path. Give them more obvious names to improve code understanding and > allow to expand t

Re: [PATCH 1/1] mwifiex: Fix possible buffer overflows in mwifiex_config_scan

2021-01-11 Thread Brian Norris
(Note: this is version 1; there's a later version posted, which does not have a v2 tag...) https://lore.kernel.org/linux-wireless/20201208150951.35866-1-ruc_zhangxiao...@163.com/ On Sat, Jan 9, 2021 at 7:11 AM Peter Seiderer wrote: > On Tue, 8 Dec 2020 20:45:23 +0800, Xiaohui Zhang > wrote: >

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-11 Thread Martin KaFai Lau
On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: [ ... ] > diff --git a/kernel/bpf/bpf_local_storage.c b/kernel/bpf/bpf_local_storage.c > index dd5aedee99e73..9bd47ad2b26f1 100644 > --- a/kernel/bpf/bpf_local_storage.c > +++ b/kernel/bpf/bpf_local_storage.c > @@ -140,17 +140,18 @@ static

Re: [PATCH 1/1] r8152: Add Lenovo Powered USB-C Travel Hub

2021-01-11 Thread Leon Schuermann
Jakub Kicinski writes: > On Sat, 09 Jan 2021 10:39:27 +0100 Leon Schuermann wrote: >> Jakub Kicinski writes: >> > On Fri, 8 Jan 2021 21:27:27 +0100 Leon Schuermann wrote: >> >> This USB-C Hub (17ef:721e) based on the Realtek RTL8153B chip used to >> >> work with the cdc_ether driver. >> > >>

[PATCH 1/2] r8152: Add Lenovo Powered USB-C Travel Hub

2021-01-11 Thread Leon Schuermann
This USB-C Hub (17ef:721e) based on the Realtek RTL8153B chip used to use the cdc_ether driver. However, using this driver, with the system suspended the device constantly sends pause-frames as soon as the receive buffer fills up. This causes issues with other devices, where some Ethernet switches

[PATCH 2/2] r8153_ecm: Add Lenovo Powered USB-C Hub as a fallback of r8152

2021-01-11 Thread Leon Schuermann
This commit enables the use of the r8153_ecm driver, introduced with commit c1aedf015ebdd0 ("net/usb/r8153_ecm: support ECM mode for RTL8153") for the Lenovo Powered USB-C Hub (17ef:721e) based on the Realtek RTL8153B chip. This results in the following driver preference: - if r8152 is available,

[PATCH iproute2-next] ip: don't use program name to select command

2021-01-11 Thread Matteo Croce
From: Matteo Croce ip has an ancient behaviour of looking at its program name to determine the command to run. If the name is longer than 2 characters, the first two letters are stripped and the others are interpreted as the command name: $ ln -s /sbin/ip iproute $ ln -s /sbin/ip ipa

Re: [PATCH v3 net-next 02/10] net: mscc: ocelot: add ops for decoding watermark threshold and occupancy

2021-01-11 Thread Jakub Kicinski
On Mon, 11 Jan 2021 18:53:21 +0200 Vladimir Oltean wrote: > On Sat, Jan 09, 2021 at 05:20:46PM -0800, Jakub Kicinski wrote: > > On Fri, 8 Jan 2021 19:59:42 +0200 Vladimir Oltean wrote: > > > + *inuse = (val & GENMASK(23, 12)) >> 12; > > > > FWIW FIELD_GET() > > Do you mind if I don't use i

Re: [PATCH v3 net-next 04/10] net: dsa: felix: reindent struct dsa_switch_ops

2021-01-11 Thread Jakub Kicinski
On Mon, 11 Jan 2021 19:01:58 +0200 Vladimir Oltean wrote: > On Sat, Jan 09, 2021 at 05:24:19PM -0800, Jakub Kicinski wrote: > > On Fri, 8 Jan 2021 19:59:44 +0200 Vladimir Oltean wrote: > > > From: Vladimir Oltean > > > > > > The devlink function pointer names are super long, and they would brea

[PATCH] bpf: Prevent double bpf_prog_put call from bpf_tracing_prog_attach

2021-01-11 Thread Jiri Olsa
The bpf_tracing_prog_attach error path calls bpf_prog_put on prog, which causes refcount underflow when it's called from link_create function. link_create prog = bpf_prog_get <-- get ... tracing_bpf_link_attach(prog.. bpf_tracing_prog_attach(prog.. out_put_

Re: [PATCH v3 net-next 08/10] net: mscc: ocelot: register devlink ports

2021-01-11 Thread Jakub Kicinski
On Mon, 11 Jan 2021 19:13:44 +0200 Vladimir Oltean wrote: > On Sat, Jan 09, 2021 at 05:44:39PM -0800, Jakub Kicinski wrote: > > On Fri, 8 Jan 2021 19:59:48 +0200 Vladimir Oltean wrote: > > > From: Vladimir Oltean > > > > > > Add devlink integration into the mscc_ocelot switchdev driver. Only t

Re: [PATCH net 6/9] MAINTAINERS: mtk-eth: remove Felix

2021-01-11 Thread Felix Fietkau
On 2021-01-11 18:41, Jakub Kicinski wrote: > On Sun, 10 Jan 2021 21:45:46 -0800 Joe Perches wrote: >> On Sun, 2021-01-10 at 21:27 -0800, Jakub Kicinski wrote: >> > Drop Felix from Mediatek Ethernet driver maintainers. >> > We haven't seen any tags since the initial submission. >> [] >> > diff -

Re: [PATCH net 6/9] MAINTAINERS: mtk-eth: remove Felix

2021-01-11 Thread Joe Perches
On Mon, 2021-01-11 at 09:41 -0800, Jakub Kicinski wrote: > On Sun, 10 Jan 2021 21:45:46 -0800 Joe Perches wrote: > > On Sun, 2021-01-10 at 21:27 -0800, Jakub Kicinski wrote: > > > Drop Felix from Mediatek Ethernet driver maintainers. > > > We haven't seen any tags since the initial submission. >

Re: [PATCH] bpf: Hoise pahole version checks into Kconfig

2021-01-11 Thread Masahiro Yamada
On Tue, Jan 12, 2021 at 3:06 AM Nathan Chancellor wrote: > > After commit da5fb18225b4 ("bpf: Support pre-2.25-binutils objcopy for > vmlinux BTF"), having CONFIG_DEBUG_INFO_BTF enabled but lacking a valid > copy of pahole results in a kernel that will fully compile but fail to > link. The user th

Re: [PATCH mlx5-next v1 1/5] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs

2021-01-11 Thread Alexander Duyck
On Sun, Jan 10, 2021 at 7:12 AM Leon Romanovsky wrote: > > From: Leon Romanovsky > > Extend PCI sysfs interface with a new callback that allows configure > the number of MSI-X vectors for specific SR-IO VF. This is needed > to optimize the performance of newly bound devices by allocating > the nu

Re: [PATCH mlx5-next v1 2/5] PCI: Add SR-IOV sysfs entry to read number of MSI-X vectors

2021-01-11 Thread Alexander Duyck
On Sun, Jan 10, 2021 at 7:10 AM Leon Romanovsky wrote: > > From: Leon Romanovsky > > Some SR-IOV capable devices provide an ability to configure specific > number of MSI-X vectors on their VF prior driver is probed on that VF. > > In order to make management easy, provide new read-only sysfs file

Re: KMSAN: kernel-infoleak in move_addr_to_user (4)

2021-01-11 Thread Jakub Kicinski
Looks like a AF_CAN socket: r0 = socket(0x1d, 0x2, 0x6) getsockname$packet(r0, &(0x7f000100)={0x11, 0x0, 0x0, 0x1, 0x0, 0x6, @broadcast}, &(0x7f00)=0x14) On Sun, 10 Jan 2021 02:19:15 -0800 syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:73d62e81

Re: [PATCH 2/7] ibmvnic: update reset function prototypes

2021-01-11 Thread Jakub Kicinski
On Sun, 10 Jan 2021 19:12:21 -0800 Sukadev Bhattiprolu wrote: > Jakub Kicinski [k...@kernel.org] wrote: > > On Thu, 7 Jan 2021 23:12:31 -0800 Sukadev Bhattiprolu wrote: > > > The reset functions need just the 'reset reason' parameter and not > > > the ibmvnic_rwi list element. Update the functio

Re: [PATCH] bpf: Hoise pahole version checks into Kconfig

2021-01-11 Thread Nathan Chancellor
On Tue, Jan 12, 2021 at 04:19:01AM +0900, Masahiro Yamada wrote: > On Tue, Jan 12, 2021 at 3:06 AM Nathan Chancellor > wrote: > > > > After commit da5fb18225b4 ("bpf: Support pre-2.25-binutils objcopy for > > vmlinux BTF"), having CONFIG_DEBUG_INFO_BTF enabled but lacking a valid > > copy of pahol

<    1   2   3   4   >