Re: [PATCH nf-next v4 5/5] af_packet: Introduce egress hook

2021-01-30 Thread Lukas Wunner
On Sun, Jan 24, 2021 at 11:18:00AM -0500, Willem de Bruijn wrote: > On Sun, Jan 24, 2021 at 6:14 AM Lukas Wunner wrote: > > On Fri, Jan 22, 2021 at 11:13:19AM -0500, Willem de Bruijn wrote: > > > On Fri, Jan 22, 2021 at 4:44 AM Lukas Wunner wrote: > > > > Add egr

Re: [PATCH nf-next v4 1/5] net: sched: Micro-optimize egress handling

2021-01-30 Thread Lukas Wunner
On Tue, Jan 26, 2021 at 11:58:17AM +0300, Dan Carpenter wrote: > On Mon, Jan 25, 2021 at 11:39:08AM -0800, Jakub Kicinski wrote: > > On Sun, 24 Jan 2021 11:33:01 +0100 Lukas Wunner wrote: > > > On Fri, Jan 22, 2021 at 10:40:05AM +0100, Eric Dumazet wrote: > > > > O

Re: [PATCH nf-next v4 5/5] af_packet: Introduce egress hook

2021-01-24 Thread Lukas Wunner
On Fri, Jan 22, 2021 at 11:13:19AM -0500, Willem de Bruijn wrote: > On Fri, Jan 22, 2021 at 4:44 AM Lukas Wunner wrote: > > Add egress hook for AF_PACKET sockets that have the PACKET_QDISC_BYPASS > > socket option set to on, which allows packets to escape without being > > f

Re: [PATCH nf-next v4 1/5] net: sched: Micro-optimize egress handling

2021-01-24 Thread Lukas Wunner
On Sat, Jan 23, 2021 at 07:26:24PM -0800, Jakub Kicinski wrote: > On Fri, 22 Jan 2021 09:47:01 +0100 Lukas Wunner wrote: > > sch_handle_egress() returns either the skb or NULL to signal to its > > caller __dev_queue_xmit() whether a packet should continue to be > > processed

Re: [PATCH nf-next v4 1/5] net: sched: Micro-optimize egress handling

2021-01-24 Thread Lukas Wunner
On Fri, Jan 22, 2021 at 10:40:05AM +0100, Eric Dumazet wrote: > On Fri, Jan 22, 2021 at 9:55 AM Lukas Wunner wrote: > > sch_handle_egress() returns either the skb or NULL to signal to its > > caller __dev_queue_xmit() whether a packet should continue to be > > processed. >

[PATCH nf-next v4 4/5] netfilter: Introduce egress hook

2021-01-22 Thread Lukas Wunner
ors in dmesg: https://lore.kernel.org/netdev/a73dda33-57f4-95d8-ea51-ed483abd6...@iogearbox.net/ Signed-off-by: Pablo Neira Ayuso Signed-off-by: Lukas Wunner Cc: Laura García Liébana Cc: John Fastabend Cc: Daniel Borkmann Cc: Alexei Starovoitov Cc: Eric Dumazet Cc: Thomas Graf --- in

[PATCH nf-next v4 5/5] af_packet: Introduce egress hook

2021-01-22 Thread Lukas Wunner
infrastructure has a chance to bypass Netfilter. Signed-off-by: Pablo Neira Ayuso [lukas: acquire rcu_read_lock, fix typos, rebase] Signed-off-by: Lukas Wunner --- net/packet/af_packet.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/net/packet/af_packet.c b/net

[PATCH nf-next v4 2/5] netfilter: Rename ingress hook include file

2021-01-22 Thread Lukas Wunner
Prepare for addition of a netfilter egress hook by renaming to . The egress hook also necessitates a refactoring of the include file, but that is done in a separate commit to ease reviewing. No functional change intended. Signed-off-by: Lukas Wunner --- include/linux/{netfilter_ingress.h

[PATCH nf-next v4 1/5] net: sched: Micro-optimize egress handling

2021-01-22 Thread Lukas Wunner
ev foo type dummy ip link set dev foo up tc qdisc add dev foo clsact tc filter add dev foo egress bpf da bytecode '1,6 0 0 0,' modprobe pktgen echo "add_device foo" > /proc/net/pktgen/kpktgend_3 samples/pktgen/pktgen_bench_xmit_mode_queue_xmit.sh -i foo -n 40000 -m "

[PATCH nf-next v4 3/5] netfilter: Generalize ingress hook include file

2021-01-22 Thread Lukas Wunner
Prepare for addition of a netfilter egress hook by generalizing the ingress hook include file. No functional change intended. Signed-off-by: Lukas Wunner --- include/linux/netfilter_netdev.h | 20 +++- net/core/dev.c | 2 +- 2 files changed, 12 insertions

[PATCH nf-next v4 0/5] Netfilter egress hook

2021-01-22 Thread Lukas Wunner
w and test. Thanks! Link to previous version: https://lore.kernel.org/netfilter-devel/cover.1598517739.git.lu...@wunner.de/ Lukas Wunner (4): net: sched: Micro-optimize egress handling netfilter: Rename ingress hook include file netfilter: Generalize ingress hook include file netfilter:

Re: [PATCH net-next V2] net: ks8851: Fix mixed module/builtin build

2021-01-16 Thread Lukas Wunner
On Sat, Jan 16, 2021 at 08:26:22PM +0100, Arnd Bergmann wrote: > On Sat, Jan 16, 2021 at 6:56 PM Marek Vasut wrote: > > On 1/16/21 6:04 PM, Arnd Bergmann wrote: > > > On Sat, Jan 16, 2021 at 5:48 PM Marek Vasut wrote: > > > > > I don't really like this version, as it does not actually solve the

Re: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-11-23 Thread Lukas Wunner
On Mon, Nov 23, 2020 at 07:34:22PM -0800, Alexei Starovoitov wrote: > It's a missing hook for out-of-tree module. That's why it stinks so much. As I've said before, the motivation for these patches has pivoted away from the original use case (which was indeed an out-of-tree module by a company for

Re: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-10-11 Thread Lukas Wunner
On Tue, Sep 15, 2020 at 12:02:03AM +0200, Daniel Borkmann wrote: > today it is possible and > perfectly fine to e.g. redirect to a host-facing veth from tc ingress which > then goes into container. Only traffic that goes up the host stack is seen > by nf ingress hook in that case. Likewise, reply t

Re: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-10-11 Thread Lukas Wunner
On Tue, Sep 08, 2020 at 02:55:36PM +0200, Daniel Borkmann wrote: > I would strongly prefer something where nf integrates into existing > tc hook, not only due to the hook reuse which would be better, > but also to allow for a more flexible interaction between tc/BPF > use cases [...] > one option t

Re: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-09-28 Thread Lukas Wunner
On Sat, Sep 19, 2020 at 05:54:05PM +0200, Pablo Neira Ayuso wrote: > Would you redo these numbers using this ruleset to address Daniel's > comments regarding performance? > > Moreover, Daniel also suggested dev_direct_xmit() path from AF_PACKET > allows packets to escape from policy, it seems this

Re: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-09-04 Thread Lukas Wunner
On Fri, Sep 04, 2020 at 11:14:37PM +0200, Daniel Borkmann wrote: > On 9/4/20 6:21 PM, Lukas Wunner wrote: > > nft and tc are orthogonal, i.e. filtering/mangling versus queueing. > > However tc has gained the ability to filter packets as well, hence > > there's som

Re: [PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-09-04 Thread Lukas Wunner
On Wed, Sep 02, 2020 at 10:00:32PM -0700, John Fastabend wrote: > Lukas Wunner wrote: > > * Before: 4730418pps 2270Mb/sec (2270600640bps) > > * After:4759206pps 2284Mb/sec (2284418880bps) > > I used a 10Gbps ixgbe nic to measure the performance after the dumm

[PATCH nf-next v3 2/3] netfilter: Generalize ingress hook

2020-08-27 Thread Lukas Wunner
hat they can be reused for an egress hook. No functional change intended. Signed-off-by: Lukas Wunner Cc: Daniel Borkmann --- include/linux/netfilter_netdev.h | 45 ++-- net/core/dev.c | 2 +- 2 files changed, 32 insertions(+), 15 deletions(-) diff

[PATCH nf-next v3 1/3] netfilter: Rename ingress hook include file

2020-08-27 Thread Lukas Wunner
Prepare for addition of a netfilter egress hook by renaming to . The egress hook also necessitates a refactoring of the include file, but that is done in a separate commit to ease reviewing. No functional change intended. Signed-off-by: Lukas Wunner Cc: Daniel Borkmann --- include/linux

[PATCH nf-next v3 3/3] netfilter: Introduce egress hook

2020-08-27 Thread Lukas Wunner
\{ type filter hook egress device foo priority 0 \; \} nft add rule netdev t co ip daddr 4.3.2.1/32 drop Signed-off-by: Lukas Wunner Cc: Daniel Borkmann Cc: Alexei Starovoitov Cc: Eric Dumazet Cc: Thomas Graf --- include/linux/netdevice.h| 8 + include/linux/netfilter_ne

[PATCH nf-next v3 0/3] Netfilter egress hook

2020-08-27 Thread Lukas Wunner
kernel.org/netfilter-devel/d6b6896fdd8408e4ddbd66ab524709e5cf82ea32.1583929080.git.lu...@wunner.de/ Thanks! Lukas Wunner (3): netfilter: Rename ingress hook include file netfilter: Generalize ingress hook netfilter: Introduce egress hook include/linux/netdevice.h |

Re: [PATCH nf-next 3/3] netfilter: Introduce egress hook

2020-08-20 Thread Lukas Wunner
On Thu, Aug 20, 2020 at 12:37:01PM +0200, Lukas Wunner wrote: > I need a few more days to update the commit messages, perform further > testing and apply polish, so I plan to dump the patches to the list > next week. Just thought I'd ask for your opinion, I'm aware this is &

Re: [PATCH nf-next 3/3] netfilter: Introduce egress hook

2020-08-20 Thread Lukas Wunner
On Tue, Apr 28, 2020 at 10:11:19PM +0200, Daniel Borkmann wrote: > > https://lore.kernel.org/netdev/bbdee6355234e730ef686f9321bd072bcf4bb232.1584523237.git.dan...@iogearbox.net/ > > > > In the ensuing discussion it turned out that the performance argument > > may be addressed by a rearrangement of

[PATCH] appletalk: Fix atalk_proc_init() return path

2020-08-01 Thread Lukas Wunner
wndougbrown.com/2020/08/hacking-up-a-fix-for-the-broken-appletalk-kernel-module-in-linux-5-1-and-newer/ Reported-by: Christopher KOBAYASHI Reported-by: Doug Brown Signed-off-by: Vincent Duvert [lukas: add missing tags] Signed-off-by: Lukas Wunner Cc: sta...@vger.kernel.org # v5.1+ Cc: Yue Ha

Re: [PATCH V6 00/20] net: ks8851: Unify KS8851 SPI and MLL drivers

2020-05-17 Thread Lukas Wunner
On Sat, May 16, 2020 at 07:02:25PM -0700, David Miller wrote: > > The KS8851SNL/SNLI and KS8851-16MLL/MLLI/MLLU are very much the same pieces > > of silicon, except the former has an SPI interface, while the later has a > > parallel bus interface. Thus far, Linux has two separate drivers for each >

[PATCH 5/6] net: ks8851: Fix register macro misnomers

2019-03-20 Thread Lukas Wunner
.pdf The misnomers have no negative consequences so far because the macros aren't used by ks8851.c, but that's about to change. Signed-off-by: Lukas Wunner Cc: Frank Pavlic Cc: Ben Dooks Cc: Tristram Ha --- drivers/net/ethernet/micrel/ks8851.h | 52 +++- 1 fi

[PATCH 4/6] net: ks8851: Set initial carrier state to down

2019-03-20 Thread Lukas Wunner
ting the carrier state to down if the cable was detached while the interface was closed. Signed-off-by: Lukas Wunner Cc: Frank Pavlic Cc: Ben Dooks Cc: Tristram Ha --- drivers/net/ethernet/micrel/ks8851.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/micrel/ks8851.c b

[PATCH 1/6] net: ks8851: Dequeue RX packets explicitly

2019-03-20 Thread Lukas Wunner
chip's documentation suggests auto-dequeuing and uses the RRXEF flag only to dequeue error frames which the driver doesn't want to retrieve. But that seems to be a fair-weather approach. Signed-off-by: Lukas Wunner Cc: Frank Pavlic Cc: Ben Dooks Cc: Tristram Ha --- drivers/net/ethernet

[PATCH 2/6] net: ks8851: Reassert reset pin if chip ID check fails

2019-03-20 Thread Lukas Wunner
However the commit misplaced reassertion of the reset pin in the error path such that it is not performed if the check of the Chip ID and Enable Register (CIDER) fails. The error path is therefore slightly asymmetrical to the probe routine's body. Fix it. Signed-off-by: Lukas Wunner Cc: Frank Pav

[PATCH 3/6] net: ks8851: Delay requesting IRQ until opened

2019-03-20 Thread Lukas Wunner
uesting the IRQ until the net_device is opened. Do the same. The driver doesn't enable interrupts on the chip before opening the net_device and disables them when closing it, so there doesn't seem to be a need to request the IRQ already on probe. Signed-off-by: Lukas Wunner Cc: Frank

[PATCH 0/6] ks8851 fixes & cleanups

2019-03-20 Thread Lukas Wunner
ven though we've tested them extensively on our Revolution Pi open source PLCs. Thanks, Lukas Lukas Wunner (6): net: ks8851: Dequeue RX packets explicitly net: ks8851: Reassert reset pin if chip ID check fails net: ks8851: Delay requesting IRQ until opened net: ks8851: Set initial c

[PATCH 6/6] net: ks8851: Deduplicate register macros

2019-03-20 Thread Lukas Wunner
is a duplication of the RXFCTR_RXFCT_MASK macro, rename it where it's used. Same for P1MBCR_FORCE_FDX, which duplicates the BMCR_FULLDPLX macro and OBCR_ODS_16MA, which duplicates OBCR_ODS_16mA. Signed-off-by: Lukas Wunner Cc: Frank Pavlic Cc: Ben Dooks Cc: Tristram Ha --- drivers/net

Re: [PATCH 09/28] thunderbolt: Cache adapter specific capability offset into struct port

2019-01-31 Thread Lukas Wunner
On Tue, Jan 29, 2019 at 06:01:24PM +0300, Mika Westerberg wrote: > --- a/drivers/thunderbolt/tb.h > +++ b/drivers/thunderbolt/tb.h > @@ -124,6 +124,8 @@ struct tb_switch { > * @remote: Remote port (%NULL if not connected) > * @xdomain: Remote host (%NULL if not connected) > * @cap_phy: Offset

[PATCH] can: hi311x: Use level-triggered interrupt

2018-10-27 Thread Lukas Wunner
c: Casey Fitzpatrick Signed-off-by: Lukas Wunner --- Documentation/devicetree/bindings/net/can/holt_hi311x.txt | 2 +- drivers/net/can/spi/hi311x.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/ca

Re: [PATCH] can: hi311x: Work around TX complete interrupt erratum

2018-05-09 Thread Lukas Wunner
On Wed, May 09, 2018 at 02:43:43PM +0200, Lukas Wunner wrote: > When sending packets as fast as possible using "cangen -g 0 -i -x", the > HI-3110 occasionally latches the interrupt pin high on completion of a > packet, but doesn't set the TXCPLT bit in the INTF regist

[PATCH] can: hi311x: Work around TX complete interrupt erratum

2018-05-09 Thread Lukas Wunner
itzpatrick Cc: sta...@vger.kernel.org # v4.12+ Signed-off-by: Lukas Wunner --- drivers/net/can/spi/hi311x.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/can/spi/hi311x.c b/drivers/net/can/spi/hi311x.c index c2cf254e4e95..53e320c92a8b 100644 --- a/driv

[PATCH] can: hi311x: Acquire SPI lock on ->do_get_berr_counter

2018-05-09 Thread Lukas Wunner
Cc: Mathias Duckeck Cc: Akshay Bhat Cc: Casey Fitzpatrick Cc: Stef Walter Cc: Karel Zak Cc: sta...@vger.kernel.org # v4.12+ Signed-off-by: Lukas Wunner --- drivers/net/can/spi/hi311x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/can/spi/hi311x.c b/drivers/net/can/spi/hi311x.c

[PATCH] net: ks8851: Support DT-provided MAC address

2017-12-18 Thread Lukas Wunner
Allow the boot loader to specify the MAC address in the device tree to override the EEPROM, or in case no EEPROM is present. Cc: Ben Dooks Cc: Tristram Ha Cc: David J. Choi Signed-off-by: Lukas Wunner --- We're using this small patch on the "Revolution Pi" family of open sou

[PATCH] net: ethernet: davinci_emac: Deduplicate bus_find_device() by name matching

2017-11-25 Thread Lukas Wunner
No need to reinvent the wheel, we have bus_find_device_by_name(). Cc: Grygorii Strashko Signed-off-by: Lukas Wunner --- drivers/net/ethernet/ti/davinci_emac.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net

Re: [PATCH v5 5/8] thunderbolt: Networking state machine

2016-07-28 Thread Lukas Wunner
On Thu, Jul 28, 2016 at 11:15:18AM +0300, Amir Levy wrote: > +static void nhi_handle_notification_msg(struct tbt_nhi_ctxt *nhi_ctxt, > + const u8 *msg) > +{ > + struct port_net_dev *port; > + u8 port_num; > + > +#define INTER_DOMAIN_LINK_SHIFT 0 > +#defin

Re: [PATCH v4 5/7] thunderbolt: Networking state machine

2016-07-24 Thread Lukas Wunner
On Mon, Jul 18, 2016 at 01:00:38PM +0300, Amir Levy wrote: > + const unique_id_be proto_uuid = APPLE_THUNDERBOLT_IP_PROTOCOL_UUID; > + > + if (memcmp(proto_uuid, hdr->apple_tbt_ip_proto_uuid, > +sizeof(proto_uuid)) != 0) { You may want to use the uuid_be data type provided