[PATCH net v2] net: mscc: ocelot: Fix multicast to the CPU port

2021-01-19 Thread Alban Bedel
backporting easier. Signed-off-by: Alban Bedel Fixes: 9403c158b872 ("net: mscc: ocelot: support IPv4, IPv6 and plain Ethernet mdb entries") --- Changelog: v2: - Fix inside ocelot_mact_learn() as suggested by Vladimir Oltean to avoid changing the callers and making backport easier.

Re: [PATCH] net: mscc: ocelot: Fix multicast to the CPU port

2021-01-19 Thread Bedel, Alban
On Mon, 2021-01-18 at 18:55 +, Vladimir Oltean wrote: > Hi Alban, > > On Mon, Jan 18, 2021 at 05:03:17PM +0100, Alban Bedel wrote: > > Multicast entries in the MAC table use the high bits of the MAC > > address to encode the ports that should get the packets. But this &

[PATCH] net: mscc: ocelot: Fix multicast to the CPU port

2021-01-18 Thread Alban Bedel
problem add a new `flags` parameter to ocelot_mact_learn() and set MAC_CPU_COPY when the CPU port is in the port set. We still leave the CPU port in the bitfield as it doesn't seems to hurt. Signed-off-by: Alban Bedel Fixes: 9403c158 (net: mscc: ocelot: support IPv4, IPv6 and plain Etherne

Re: [PATCH v2 bpf-next 7/7] docs/bpf: add BPF ring buffer design notes

2020-05-25 Thread Alban Crequy
after a crash). If BPF_MAP_TYPE_RINGBUF implements the same features, then I would be able to switch and use less memory. Do you think it will be possible to implement that in BPF_MAP_TYPE_RINGBUF? Cheers, Alban

Re: bpf-next is OPEN

2019-03-19 Thread Alban Crequy
miss something? Cheers, Alban

Re: [PATCH bpf-next v1] tools/bpftool: create map of maps

2019-03-07 Thread Alban Crequy
ue, Mar 5, 2019 at 6:32 PM Jakub Kicinski wrote: > > On Tue, 5 Mar 2019 17:38:03 +0100, Alban Crequy wrote: > > From: Alban Crequy > > > > Before this patch, there was no way to fill attr.inner_map_fd, necessary > > for array_of_maps or hash_of_maps. > > >

[PATCH bpf-next v1] tools/bpftool: create map of maps

2019-03-05 Thread Alban Crequy
From: Alban Crequy Before this patch, there was no way to fill attr.inner_map_fd, necessary for array_of_maps or hash_of_maps. This patch adds keyword 'innermap' to pass the innermap, either as an id or as a pinned map. Example of commands: $ sudo bpftool map create /sys/fs/bpf/inn

Re: [PATCH bpf v2] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-22 Thread Alban Crequy
f6b425f932 On Fri, Feb 22, 2019 at 2:19 PM Alban Crequy wrote: > > From: Alban Crequy > > trie_delete_elem() was deleting an entry even though it was not matching > if the prefixlen was correct. This patch adds a check on matchlen. > > Reproducer: > > $ sudo bpftool map c

[PATCH bpf v2] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-22 Thread Alban Crequy
From: Alban Crequy trie_delete_elem() was deleting an entry even though it was not matching if the prefixlen was correct. This patch adds a check on matchlen. Reproducer: $ sudo bpftool map create /sys/fs/bpf/mylpm type lpm_trie key 8 value 1 entries 128 name mylpm flags 1 $ sudo bpftool map

Re: [PATCH bpf-next v1] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-22 Thread Alban Crequy
On Thu, Feb 21, 2019 at 11:24 PM Martin Lau wrote: > > On Thu, Feb 21, 2019 at 05:39:26PM +0100, Alban Crequy wrote: > > From: Alban Crequy > > > > trie_delete_elem() was deleting an entry even though it was not matching > > if the prefixlen was correct. This

[PATCH bpf-next v1] bpf, lpm: fix lookup bug in map_delete_elem

2019-02-21 Thread Alban Crequy
From: Alban Crequy trie_delete_elem() was deleting an entry even though it was not matching if the prefixlen was correct. This patch adds a check on matchlen. Reproducer: $ sudo bpftool map create /sys/fs/bpf/mylpm type lpm_trie key 8 value 1 entries 128 name mylpm flags 1 $ sudo bpftool map

[PATCH bpf-next v2] bpf: bpftool, fix documentation for attach types

2019-02-19 Thread Alban Crequy
From: Alban Crequy bpftool has support for attach types "stream_verdict" and "stream_parser" but the documentation was referring to them as "skb_verdict" and "skb_parse". The inconsistency comes from commit b7d3826c2ed6 ("bpf: bpftool, add support

Re: [PATCH] bpf: bpftool, fix documentation for attach types

2019-02-19 Thread Alban Crequy
On Mon, Feb 11, 2019 at 2:26 PM Quentin Monnet wrote: > > 2019-02-11 13:54 UTC+0100 ~ Alban Crequy > > From: Alban Crequy > > > > bpftool has support for attach types "stream_verdict" and > > "stream_parser" but the documentation was referring t

[PATCH] bpf: bpftool, fix documentation for attach types

2019-02-11 Thread Alban Crequy
From: Alban Crequy bpftool has support for attach types "stream_verdict" and "stream_parser" but the documentation was referring to them with "skb_verdict" and "skb_parse". The inconsistency comes from commit b7d3826c2ed6 ("bpf: bpftool, add support

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-25 Thread Alban Crequy
bytes = 8, handle_type = 1 > cgroup_id = 0x106b2 > // the below command to get cgroup_id from the kernel for the > // process compiled with t.c and ran under /home/yhs/tmp/yhs: > $ sudo ./trace.py -p 4067 '__x64_sys_nanosleep "cgid = %llx", $cgid' > PID TID COMMFUNC

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-21 Thread Alban Crequy
On Mon, May 14, 2018 at 9:38 PM, Y Song wrote: > > On Sun, May 13, 2018 at 10:33 AM, Alban Crequy wrote: > > From: Alban Crequy > > > > bpf_get_current_cgroup_ino() allows BPF trace programs to get the inode > > of the cgroup where the current process resides.

[PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-13 Thread Alban Crequy
From: Alban Crequy bpf_get_current_cgroup_ino() allows BPF trace programs to get the inode of the cgroup where the current process resides. My use case is to get statistics about syscalls done by a specific Kubernetes container. I have a tracepoint on raw_syscalls/sys_enter and a BPF map

Re: [PATCH net-next] tcp: add tracepoint trace_tcp_retransmit_synack()

2017-10-27 Thread Alban Crequy
d the inode of the network namespace that owns the socket? (along with the major/minor of the nsfs) If the kernel later gains tracepoints for TCP connect, accept, close including the netns ino, then I might be able to replace some ebpf-kprobes code by ebpf-tracepoints code :) > [...] Thanks, Alban

Re: [PATCH net-next v7 08/10] bpf: Add a Landlock sandbox example

2017-09-01 Thread Alban Crequy
the code checks for "character device". Thanks! Alban

[PATCH] net: core: Fix slab-out-of-bounds in netdev_stats_to_stats64

2017-07-02 Thread Alban Browaeys
f8801be248c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc 8801be248c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc == Signed-off-by: Alban Browaeys --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH v3] tracing/kprobes: expose maxactive for kretprobe in kprobe_events

2017-04-03 Thread Alban Crequy
From: Alban Crequy When a kretprobe is installed on a kernel function, there is a maximum limit of how many calls in parallel it can catch (aka "maxactive"). A kernel module could call register_kretprobe() and initialize maxactive (see example in samples/kprobes/kretprobe_example.c).

[PATCH v2] tracing/kprobes: expose maxactive for kretprobe in kprobe_events

2017-03-31 Thread Alban Crequy
nsupported: 0 > # of xfailed: 0 > # of undefined(test bug): 0 BugLink: https://github.com/iovisor/bcc/issues/1072 Signed-off-by: Alban Crequy --- Changes since v1: - Remove "(*)" from documentation. (Review from Masami Hiramatsu) - Fix support for "r100" without th

Re: [RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count

2017-03-31 Thread Alban Crequy
d-off-by: Masami Hiramatsu I tested this patch with my kretprobe on "inet_csk_accept" when there are many processes waiting in the accept() syscall. I can now successfully see the nmissed counter in /sys/kernel/debug/tracing/kprobe_profile being incremented when the kretprobe

Re: [RFC PATCH tip/master 2/3] kprobes: Allocate kretprobe instance if its free list is empty

2017-03-30 Thread Alban Crequy
the network card receives a packet. > I mean, think about it, a kretprobe can be installed in a lot of places, and > now > we want to call get_free_pages() from it?? This would add a massive amount of > fragility. > > Instrumentation must be _simple_, every patch that adds more complexity to the > most fundamental code path of it should raise a red flag ... > > So let's make this more robust, ok? > > Thanks, > > Ingo Thanks, Alban

Re: [PATCH v1] tracing/kprobes: expose maxactive for kretprobe in kprobe_events

2017-03-28 Thread Alban Crequy
Thanks for the review, On Tue, Mar 28, 2017 at 5:23 PM, Masami Hiramatsu wrote: > On Tue, 28 Mar 2017 15:52:22 +0200 > Alban Crequy wrote: > >> When a kretprobe is installed on a kernel function, there is a maximum >> limit of how many calls in parallel it can catch

[PATCH v1] tracing/kprobes: expose maxactive for kretprobe in kprobe_events

2017-03-28 Thread Alban Crequy
ovisor/bcc/issues/1072 Signed-off-by: Alban Crequy --- Documentation/trace/kprobetrace.txt | 4 +++- kernel/trace/trace_kprobe.c | 34 +- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Documentation/trace/kprobetrace.txt b/Documenta

Re: [PATCH 1/7] Documentation: dt: net: Update the ath9k binding for SoC devices

2017-03-28 Thread Alban
On Mon, 27 Mar 2017 18:11:15 +0200 Christian Lamparter wrote: > On Monday, March 13, 2017 10:05:09 PM CEST Alban wrote: > > The current binding only cover PCI devices so extend it for SoC devices. > > > > Most SoC platforms use an MTD partition for the calibration data >

Re: [PATCH 3/7] ath9k: Add support for reading the EEPROM data using the nvmem API

2017-03-23 Thread Alban
On Tue, 14 Mar 2017 00:53:55 +0100 Christian Lamparter wrote: > On Monday, March 13, 2017 10:05:11 PM CET Alban wrote: > > Currently SoC platforms use a firmware request to get the EEPROM data. > > This is mostly a hack and rely on using a user-helper scripts which is > >

[PATCH 7/7] ath9k: hw: Reset the device with the external reset before init

2017-03-13 Thread Alban
On the SoC platform the board code often manually reset the device before registering it. To allow the same to happen on DT platforms let the driver call the reset before init. Signed-off-by: Alban --- drivers/net/wireless/ath/ath9k/hw.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 3/7] ath9k: Add support for reading the EEPROM data using the nvmem API

2017-03-13 Thread Alban
as such devices will generally use this method for loading the EEPROM data. Signed-off-by: Alban --- drivers/net/wireless/ath/ath9k/Kconfig | 1 + drivers/net/wireless/ath/ath9k/eeprom.c | 10 ++ drivers/net/wireless/ath/ath9k/hw.h | 2 ++ drivers/net/wireless/ath/ath9k/init.c

[PATCH 5/7] ath9k: of: Use the clk API to get the reference clock rate

2017-03-13 Thread Alban
If a clock named "ref" exists use it to get the reference clock rate. Signed-off-by: Alban --- drivers/net/wireless/ath/ath9k/init.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 36b51a

[PATCH 6/7] ath9k: Allow using the reset API for the external reset

2017-03-13 Thread Alban
From: Alban Bedel Allow using the reset API instead of a platform specific callback to reset the device. Signed-off-by: Alban Bedel --- drivers/net/wireless/ath/ath9k/hw.c | 26 +- drivers/net/wireless/ath/ath9k/hw.h | 1 + drivers/net/wireless/ath/ath9k/init.c

[PATCH 4/7] ath9k: Add support for reading the MAC address with nvmem

2017-03-13 Thread Alban
On embedded platforms the MAC address is often stored in flash, use nvmem to read it if the platform data or DT didn't specify one. Signed-off-by: Alban --- drivers/net/wireless/ath/ath9k/init.c | 33 + 1 file changed, 33 insertions(+) diff --git a/driver

[PATCH 2/7] ath9k: ahb: Add OF support

2017-03-13 Thread Alban
Allow registering ath9k AHB devices defined in DT. This just add the compatible strings to allow matching the driver and setting the proper device ID. Signed-off-by: Alban --- drivers/net/wireless/ath/ath9k/ahb.c | 47 +--- 1 file changed, 43 insertions(+), 4

[PATCH 1/7] Documentation: dt: net: Update the ath9k binding for SoC devices

2017-03-13 Thread Alban
NVMEM cells, so we also mark the qca,no-eeprom property as deprecated in case anyone ever used it. Signed-off-by: Alban --- .../devicetree/bindings/net/wireless/qca,ath9k.txt | 41 -- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree

[PATCH] drivers: net: xgene: Fix crash on DT systems

2017-02-28 Thread Alban Bedel
On DT systems the driver require a clock, but the probe just print a warning and continue, leading to a crash when resetting the device. To fix this crash and properly handle probe deferals only ignore the missing clock if DT isn't used or if the clock doesn't exist. Signed-off-by: A

[PATCH v2] netfilter: xt_hashlimit: Fix integer divide round to zero.

2017-02-06 Thread Alban Browaeys
ives: 0 as user2creds output Setting burst to "1" typically solve the issue ... but setting it to "40" does too ! This is on 32bit arch calling into revision 2 of hashlimit. Signed-off-by: Alban Browaeys --- v2: - fix missing conditional statement in revision 1 case .

Re: [PATCH] netfilter: xt_hashlimit: Fix integer divide round to zero.

2017-02-06 Thread Alban Browaeys
Le lundi 06 février 2017 à 14:04 +0100, Pablo Neira Ayuso a écrit : > On Sat, Feb 04, 2017 at 11:47:31PM +0100, Alban Browaeys wrote: > > diff --git a/net/netfilter/xt_hashlimit.c > > b/net/netfilter/xt_hashlimit.c > > index 10063408141d..df75ad643eef 100644 > > --- a/n

[PATCH] netfilter: xt_hashlimit: Fix integer divide round to zero.

2017-02-04 Thread Alban Browaeys
ives: 0 as user2creds output Setting burst to "1" typically solve the issue ... but setting it to "40" does too ! This is on 32bit arch calling into revision 2 of hashlimit. Signed-off-by: Alban Browaeys --- net/netfilter/xt_hashlimit.c | 18 -- 1 fil

[RFC v2 2/2] proc connector: add a "get feature" op

2016-10-15 Thread Alban Crequy
From: Alban Crequy As more kinds of events are being added in the proc connector, userspace needs a way to detect whether the kernel supports those new events. When a kind of event is not supported, userspace should report an error propertly, or fallback to other methods (regular polling of

[RFC v2 1/2] proc connector: add namespace events

2016-10-15 Thread Alban Crequy
From: Alban Crequy The act of a process creating or joining a namespace via clone(), unshare() or setns() is a useful signal for monitoring applications. I am working on a monitoring application that keeps track of all the containers and all processes inside each container. The current way of

[RFC v2 0/2] proc connector: get namespace events

2016-10-15 Thread Alban Crequy
://github.com/kinvolk/linux.git alban/proc_ns_connector-v2-5 Alban Crequy (2): proc connector: add namespace events proc connector: add a "get feature" op drivers/connector/cn_proc.c | 163 --- include/linux/cn_proc.h | 25 +++ include/

Re: [PATCH] [RFC] proc connector: add namespace events

2016-09-13 Thread Alban Crequy
On 12 September 2016 at 23:39, Evgeniy Polyakov wrote: > Hi everyone > > 08.09.2016, 18:39, "Alban Crequy" : >> The act of a process creating or joining a namespace via clone(), >> unshare() or setns() is a useful signal for monitoring applications. > >>

[PATCH] [RFC] proc connector: add namespace events

2016-09-08 Thread Alban Crequy
From: Alban Crequy The act of a process creating or joining a namespace via clone(), unshare() or setns() is a useful signal for monitoring applications. I am working on a monitoring application that keeps track of all the containers and all processes inside each container. The current way of

Re: [PATCH] usbnet: ax88179_178a: Add support for writing the EEPROM

2016-08-25 Thread Alban Bedel
On Thu, 25 Aug 2016 11:16:36 +0200 Oliver Neukum wrote: > On Wed, 2016-08-24 at 16:40 +0200, Alban Bedel wrote: > > On Wed, 24 Aug 2016 16:30:39 +0200 > > Oliver Neukum wrote: > > > > > On Wed, 2016-08-24 at 15:52 +0200, Alban Bedel wrote: >

Re: [PATCH] usbnet: ax88179_178a: Add support for writing the EEPROM

2016-08-24 Thread Alban Bedel
On Wed, 24 Aug 2016 16:30:39 +0200 Oliver Neukum wrote: > On Wed, 2016-08-24 at 15:52 +0200, Alban Bedel wrote: > > Implement the .set_eeprom callback to allow setting the MAC address > > as well as a few other parameters. Note that the EEPROM must have a > > correct

[PATCH] usbnet: ax88179_178a: Add support for writing the EEPROM

2016-08-24 Thread Alban Bedel
Implement the .set_eeprom callback to allow setting the MAC address as well as a few other parameters. Note that the EEPROM must have a correct PID/VID checksum set otherwise the SROM is used and reads return the SROM content. Signed-off-by: Alban Bedel --- drivers/net/usb/ax88179_178a.c | 57

Re: [PATCH 8/8] netfilter: implement xt_cgroup cgroup2 path match

2016-02-11 Thread Alban Crequy
in tc? I wonder if it will be possible to use cgroup to classify packets in tc without net_cls.class_id in cgroup2. Thanks! Alban

[PATCH v3] MIPS: Remove all the uses of custom gpio.h

2015-08-04 Thread Alban Bedel
driver. A few more fixes are need in some drivers as they rely on linux/gpio.h to provides some machine specific definitions, or used asm/gpio.h instead of linux/gpio.h for the gpio API. Signed-off-by: Alban Bedel --- This patch is based on my previous serie: "MIPS: ath79: Move the GPIO driv

[PATCH v2] MIPS: Remove all the uses of custom gpio.h

2015-08-02 Thread Alban Bedel
driver. A few more fixes are need in some drivers as they rely on linux/gpio.h to provides some machine specific definitions, or used asm/gpio.h instead of linux/gpio.h for the gpio API. Signed-off-by: Alban Bedel --- This patch is based on my previous serie: "MIPS: ath79: Move the GPIO driv

[PATCH] MIPS: Remove all the uses of custom gpio.h

2015-07-30 Thread Alban Bedel
driver. A few more fixes are need in some drivers as they rely on linux/gpio.h to provides some machine specific definitions, or used asm/gpio.h instead of linux/gpio.h for the gpio API. Signed-off-by: Alban Bedel --- This patch is based on my previous serie: "MIPS: ath79: Move the GPIO driv

Re: [PATCH] MIPS: Remove most of the custom gpio.h

2015-07-23 Thread Alban
On Wed, 22 Jul 2015 19:47:18 +0200 Manuel Lauss wrote: > On Wed, Jul 22, 2015 at 7:33 PM, Alban Bedel wrote: > > Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS > > machines, and each machine type provides its own gpio.h. However > > only the Alchemy m

[PATCH] MIPS: Remove most of the custom gpio.h

2015-07-22 Thread Alban Bedel
as the custom wrappers if some exists. A few more fixes are need in a few drivers as they rely on linux/gpio.h to provides some machine specific definitions, or used asm/gpio.h instead of linux/gpio.h for the gpio API. Signed-off-by: Alban Bedel --- This patch is based on my previous serie