Re: [PATCH net-next v5] net: x25: Queue received packets in the drivers instead of per-CPU queues

2021-04-06 Thread Martin Schiller
On 2021-04-05 21:34, Xie He wrote: Hi Martin, Could you ack? Thanks! Acked-by: Martin Schiller Just for the record: I'm certainly not always the fastest, but I don't work holidays or weekends. So you also need to have some patience.

Re: [PATCH net-next v4] net: x25: Queue received packets in the drivers instead of per-CPU queues

2021-04-01 Thread Martin Schiller
On 2021-03-31 20:41, Xie He wrote: Hi Martin, Could you ack this patch again? The only change from the RFC version (that you previously acked) is the addition of the "__GFP_NOMEMALLOC" flag in "dev_alloc_skb". This is because I want to prevent pfmemalloc skbs (which can't be handled by

Re: [PATCH net] net: lapbether: Prevent racing when checking whether the netif is running

2021-03-16 Thread Martin Schiller
On 2021-03-14 02:59, Xie He wrote: Hi Martin, Could you ack? Thanks! Acked-by: Martin Schiller

Re: [PATCH net] net: lapbether: Remove netif_start_queue / netif_stop_queue

2021-03-09 Thread Martin Schiller
tatic int lapbeth_open(struct net_device *dev) return -ENODEV; } - netif_start_queue(dev); return 0; } @@ -300,8 +299,6 @@ static int lapbeth_close(struct net_device *dev) { int err; - netif_stop_queue(dev); - if ((err = lapb_unregister(dev)) != LAPB_OK) pr_err("lapb_unregister error: %d\n", err); Seems reasonable to me. Acked-by: Martin Schiller

Re: [PATCH net-next RFC] net: x25: Queue received packets in the drivers instead of per-CPU queues

2021-03-09 Thread Martin Schiller
he patch also documents this requirement in the "x25-iface" documentation. I've tested the hdlc_x25 driver. Looks good to me. Acked-by: Martin Schiller

Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames

2021-03-03 Thread Martin Schiller
On 2021-03-03 00:30, Jakub Kicinski wrote: On Tue, 02 Mar 2021 08:04:20 +0100 Martin Schiller wrote: On 2021-03-01 09:56, Xie He wrote: > On Sun, Feb 28, 2021 at 10:56 PM Martin Schiller wrote: >> I mean the change from only one hdlc interface to both hdlc and >> hdlc_x25

Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames

2021-03-02 Thread Martin Schiller
On 2021-03-01 09:56, Xie He wrote: On Sun, Feb 28, 2021 at 10:56 PM Martin Schiller wrote: >> Also, I have a hard time assessing if such a wrap is really >> enforceable. > > Sorry. I don't understand what you mean. What "wrap" are you referring > to? I mea

Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames

2021-02-28 Thread Martin Schiller
On 2021-02-27 00:03, Xie He wrote: On Fri, Feb 26, 2021 at 6:21 AM Martin Schiller wrote: I have now had a look at it. It works as expected. I just wonder if it would not be more appropriate to call the lapb_register() already in x25_hdlc_open(), so that the layer2 (lapb) can already "

Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames

2021-02-26 Thread Martin Schiller
On 2021-02-22 09:56, Xie He wrote: On Sun, Feb 21, 2021 at 11:14 PM Martin Schiller wrote: I'm not really happy with this change because it breaks compatibility. We then suddenly have 2 interfaces; the X.25 routings are to be set via the "new" hdlc_x25 interfaces instead o

Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames

2021-02-21 Thread Martin Schiller
break backward compatibility. Users with old scripts will find them no longer working. However, it's hard for me to find a better way to solve the problem described in the commit message. So I sent this as an RFC to see what people think about this. (Martin Schiller seems to be OK with this.) W

Re: [PATCH net-next RFC v2] net: hdlc_x25: Queue outgoing LAPB frames

2021-02-14 Thread Martin Schiller
it. Cc: Martin Schiller Signed-off-by: Xie He --- Change from RFC v1: Properly initialize state(hdlc)->x25_dev and state(hdlc)->x25_dev_lock. --- drivers/net/wan/hdlc_x25.c | 158 ++--- 1 file changed, 129 insertions(+), 29 deletions(-) diff --git a

Re: [PATCH net] net: hdlc_x25: Return meaningful error code in x25_open

2021-02-03 Thread Martin Schiller
rable") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Martin Schiller Signed-off-by: Xie He --- drivers/net/wan/hdlc_x25.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index bb164805804e.

Re: [PATCH net] net: hdlc_x25: Use qdisc to queue outgoing LAPB frames

2021-02-01 Thread Martin Schiller
On 2021-02-01 12:38, Xie He wrote: On Mon, Feb 1, 2021 at 1:18 AM Martin Schiller wrote: I have thought about this issue again. I also have to say that I have never noticed any problems in this area before. So again for (my) understanding: When a hardware driver calls netif_stop_queue

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Martin Schiller
On 2021-02-01 11:49, Xie He wrote: On Mon, Feb 1, 2021 at 2:05 AM Martin Schiller wrote: What kind of packages do you mean are corrupted? ETH_P_X25 or ETH_P_HDLC? I mean ETH_P_X25. I was using "lapbether.c" to test so there was no ETH_P_HDLC. I have also sent a patch here i

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Martin Schiller
ied before removing the pseudo header (as I did in my patch)? Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Martin Schiller Signed-off-by: Xie He --- net/lapb/lapb_out.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/lapb/lapb_out.c b/net/lapb/lapb_out.c

Re: [PATCH net] net: hdlc_x25: Use qdisc to queue outgoing LAPB frames

2021-02-01 Thread Martin Schiller
On 2021-01-31 04:16, Xie He wrote: On Sat, Jan 30, 2021 at 11:16 AM Jakub Kicinski wrote: Sounds like too much afford for a sub-optimal workaround. The qdisc semantics are borken in the proposed scheme (double counting packets) - both in term of statistics and if user decides to add a

Re: [PATCH net] net: hdlc_x25: Use qdisc to queue outgoing LAPB frames

2021-01-28 Thread Martin Schiller
On 2021-01-28 23:06, Xie He wrote: On Thu, Jan 28, 2021 at 11:47 AM Jakub Kicinski wrote: Noob question - could you point at or provide a quick guide to layering here? I take there is only one netdev, and something maintains an internal queue which is not stopped when HW driver stops the

Re: [PATCH net] net: hdlc_x25: Use qdisc to queue outgoing LAPB frames

2021-01-27 Thread Martin Schiller
On 2021-01-27 21:29, Xie He wrote: On Wed, Jan 27, 2021 at 2:14 AM David Laight wrote: If I read this correctly it adds a (potentially big) queue between the LAPB code that adds the sequence numbers to the frames and the hardware that actually sends them. Yes. The actual number of

Re: [PATCH net v5] net: lapb: Add locking to the lapb module

2021-01-24 Thread Martin Schiller
On 2021-01-24 05:45, Jakub Kicinski wrote: On Fri, 22 Jan 2021 10:07:05 +0100 Martin Schiller wrote: On 2021-01-21 01:21, Xie He wrote: > In the lapb module, the timers may run concurrently with other code in > this module, and there is currently no locking to prevent the code from &g

Re: [PATCH net v5] net: lapb: Add locking to the lapb module

2021-01-22 Thread Martin Schiller
;, "lapb_start_t2timer". 3. Let lapb_unregister wait for other API functions and running timers to stop. 4. The lapb_device_event function calls lapb_disconnect_request. In order to avoid trying to hold the lock twice, add a new function named "__lapb_disconnect_request" wh

Re: [PATCH net v4] net: lapb: Add locking to the lapb module

2021-01-20 Thread Martin Schiller
disconnect_request" which assumes the lock is held, and make it called by lapb_disconnect_request and lapb_device_event. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Martin Schiller Signed-off-by: Xie He Can you please add a Changelog. What was changed in v4? --- include/n

Re: [PATCH net v2] net: lapb: Add locking to the lapb module

2021-01-19 Thread Martin Schiller
should move the actual functionality from lapb_disconnect_request() to a __lapb_disconnect_request(), and in lapb_disconnect_request() call this function including locking around it and also in lapb_device_event (without locking). Calling lapb_start_t1timer() on a "NETDEV_GOING_DOWN" event doe

Re: [PATCH net] net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event

2021-01-05 Thread Martin Schiller
he pointer. This patch fixes this problem. Fixes: a4989fa91110 ("net/lapb: support netdev events") Cc: Martin Schiller Signed-off-by: Xie He --- net/lapb/lapb_iface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 213ea7abc9ab.

Re: [PATCH AUTOSEL 5.4 075/130] net/lapb: fix t1 timer handling for LAPB_STATE_0

2021-01-05 Thread Martin Schiller
On 2020-12-24 10:49, Xie He wrote: On Wed, Dec 23, 2020 at 9:01 AM Xie He wrote: I don't think this patch is suitable for stable branches. This patch is part of a patch series that changes the lapb module from "establishing the L2 connection only when needed by L3", to "establishing the L2

Re: [PATCH net-next] net: lapbether: Consider it successful if (dis)connecting when already (dis)connected

2020-12-09 Thread Martin Schiller
driver do this, too. Looks good to me. Acked-by: Martin Schiller Cc: Martin Schiller Signed-off-by: Xie He --- drivers/net/wan/lapbether.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index b6

Re: [PATCH net-next] net: x25: Fix handling of Restart Request and Restart Confirmation

2020-12-09 Thread Martin Schiller
On 2020-12-09 21:16, Xie He wrote: On Wed, Dec 9, 2020 at 2:31 AM Martin Schiller wrote: >> 1. When the x25 module gets loaded, layer 2 may already be running and >> connected. In this case, although we are in X25_LINK_STATE_0, we still >> need to handle the Restart Reques

Re: [PATCH net-next v7 4/5] net/x25: fix restart request/confirm handling

2020-12-09 Thread Martin Schiller
On 2020-12-09 23:11, Xie He wrote: On Wed, Dec 9, 2020 at 1:47 AM Xie He wrote: On Wed, Dec 9, 2020 at 1:41 AM Martin Schiller wrote: > > Right. > By the way: A "Restart Collision" is in practice a very common event to > establish the Layer 3. Oh, I see. Thanks!

Re: [PATCH net-next] net: x25: Fix handling of Restart Request and Restart Confirmation

2020-12-09 Thread Martin Schiller
On 2020-12-09 10:52, Martin Schiller wrote: On 2020-12-09 09:16, Xie He wrote: 1. When the x25 module gets loaded, layer 2 may already be running and connected. In this case, although we are in X25_LINK_STATE_0, we still need to handle the Restart Request received, rather than ignore it. Hmm

Re: [PATCH net-next] net: x25: Fix handling of Restart Request and Restart Confirmation

2020-12-09 Thread Martin Schiller
are in State 2. So we don't need to check x25_t20timer_pending again. Yeah, you're right, we can actually leave that out. Acked-by: Martin Schiller

Re: [PATCH net-next v7 4/5] net/x25: fix restart request/confirm handling

2020-12-09 Thread Martin Schiller
On 2020-12-09 10:17, Xie He wrote: On Wed, Dec 9, 2020 at 1:01 AM Xie He wrote: On Wed, Nov 25, 2020 at 10:36 PM Martin Schiller wrote: > > switch (nb->state) { > case X25_LINK_STATE_0: > - nb->state = X25_LINK_STATE_2; > -

[PATCH net-next v7 5/5] net/x25: remove x25_kill_by_device()

2020-11-25 Thread Martin Schiller
Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 16 1 file changed, 16 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 313a6222ded9..1432a05805ab 100644 --- a/net/x25/af_x25.c

[PATCH net-next v7 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-25 Thread Martin Schiller
1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller --- net/lapb/lapb_timer.c | 11 +-- 1 file changed, 9

[PATCH net-next v7 4/5] net/x25: fix restart request/confirm handling

2020-11-25 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 41 + 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/x25/x25_link.c b/net/x25

[PATCH net-next v7 1/5] net/x25: handle additional netdev events

2020-11-25 Thread Martin Schiller
, as these will be handled in layer 2 (LAPB) and layer3 (X.25) will be informed by layer2 when layer2 link is established and layer3 link should be initiated. Signed-off-by: Martin Schiller --- net/x25/af_x25.c| 22 -- net/x25/x25_link.c | 6 +++--- net/x25

[PATCH net-next v7 2/5] net/lapb: support netdev events

2020-11-25 Thread Martin Schiller
and stop all timers. In case of Carrier Detection, we start timer t1 on a DCE interface, and on a DTE interface we change to state LAPB_STATE_1 and start sending SABM(E). Signed-off-by: Martin Schiller --- net/lapb/lapb_iface.c | 82 ++- 1 file

[PATCH net-next v7 0/5] net/x25: netdev event handling

2020-11-25 Thread Martin Schiller
handling this may need fixes/cleanup and will be resubmitted later. Changes to v1: o fix 'subject_prefix' and 'checkpatch' warnings --- Martin Schiller (5): net/x25: handle additional netdev events net/lapb: support netdev events net/lapb: fix t1 timer handling for LAPB_STATE_0 net/x25: fix

Re: [PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-25 Thread Martin Schiller
On 2020-11-26 01:08, Xie He wrote: Hi Martin, Since we are going to assume lapb->state would remain in LAPB_STATE_0 when the carrier is down (as understood by me. Right?), could we add a check in lapb_connect_request to reject the upper layer's "connect" instruction when the carrier is

Re: [PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-25 Thread Martin Schiller
On 2020-11-25 22:49, Jakub Kicinski wrote: On Tue, 24 Nov 2020 10:39:35 +0100 Martin Schiller wrote: This patch allows layer2 (LAPB) to react to netdev events itself and avoids the detour via layer3 (X.25). 1. Establish layer2 on NETDEV_UP events, if the carrier is already up. 2. Call

Re: [PATCH net-next v5 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-24 Thread Martin Schiller
On 2020-11-24 12:43, David Laight wrote: From: Martin Schiller Sent: 24 November 2020 09:36 1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime

[PATCH net-next v6 4/5] net/x25: fix restart request/confirm handling

2020-11-24 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 41 + 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/x25/x25_link.c b/net/x25

[PATCH net-next v6 5/5] net/x25: remove x25_kill_by_device()

2020-11-24 Thread Martin Schiller
Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 16 1 file changed, 16 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 313a6222ded9..1432a05805ab 100644 --- a/net/x25/af_x25.c

[PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-24 Thread Martin Schiller
and stop all timers. In case of Carrier Detection, we start timer t1 on a DCE interface, and on a DTE interface we change to state LAPB_STATE_1 and start sending SABM(E). Signed-off-by: Martin Schiller --- net/lapb/lapb_iface.c | 94 +++ 1 file

[PATCH net-next v6 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-24 Thread Martin Schiller
1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller --- net/lapb/lapb_timer.c | 11 +-- 1 file changed, 9

[PATCH net-next v6 1/5] net/x25: handle additional netdev events

2020-11-24 Thread Martin Schiller
, as these will be handled in layer 2 (LAPB) and layer3 (X.25) will be informed by layer2 when layer2 link is established and layer3 link should be initiated. Signed-off-by: Martin Schiller --- net/x25/af_x25.c| 22 -- net/x25/x25_link.c | 6 +++--- net/x25

[PATCH net-next v6 0/5] net/x25: netdev event handling

2020-11-24 Thread Martin Schiller
. Changes to v1: o fix 'subject_prefix' and 'checkpatch' warnings --- Martin Schiller (5): net/x25: handle additional netdev events net/lapb: support netdev events net/lapb: fix t1 timer handling for LAPB_STATE_0 net/x25: fix restart request/confirm handling net/x25: remove x25_kill_by_device

[PATCH net-next v5 5/5] net/x25: remove x25_kill_by_device()

2020-11-24 Thread Martin Schiller
Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 16 1 file changed, 16 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 313a6222ded9..1432a05805ab 100644 --- a/net/x25/af_x25.c

[PATCH net-next v5 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-24 Thread Martin Schiller
1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller --- net/lapb/lapb_timer.c | 11 +-- 1 file changed, 9

[PATCH net-next v5 4/5] net/x25: fix restart request/confirm handling

2020-11-24 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 41 + 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/x25/x25_link.c b/net/x25

[PATCH net-next v5 2/5] net/lapb: support netdev events

2020-11-24 Thread Martin Schiller
and stop all timers. In case of Carrier Detection, we start timer t1 on a DCE interface, and on a DTE interface we change to state LAPB_STATE_1 and start sending SABM(E). Signed-off-by: Martin Schiller --- net/lapb/lapb_iface.c | 94 +++ 1 file

[PATCH net-next v5 1/5] net/x25: handle additional netdev events

2020-11-24 Thread Martin Schiller
, as these will be handled in layer 2 (LAPB) and layer3 (X.25) will be informed by layer2 when layer2 link is established and layer3 link should be initiated. Signed-off-by: Martin Schiller --- net/x25/af_x25.c| 22 -- net/x25/x25_link.c | 6 +++--- net/x25

[PATCH net-next v5 0/5] net/x25: netdev event handling

2020-11-24 Thread Martin Schiller
--- Martin Schiller (5): net/x25: handle additional netdev events net/lapb: support netdev events net/lapb: fix t1 timer handling for LAPB_STATE_0 net/x25: fix restart request/confirm handling net/x25: remove x25_kill_by_device() net/lapb/lapb_iface.c | 94

Re: [PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-23 Thread Martin Schiller
On 2020-11-23 23:09, Xie He wrote: On Mon, Nov 23, 2020 at 11:36 AM Jakub Kicinski wrote: > > From this point of view it will be the best to handle the NETDEV_UP in > > the lapb event handler and establish the link analog to the > > NETDEV_CHANGE event if the carrier is UP. > > Thanks! This

Re: [PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-23 Thread Martin Schiller
On 2020-11-23 11:08, Xie He wrote: On Mon, Nov 23, 2020 at 1:36 AM Xie He wrote: Some drivers don't support carrier status and will never change it. Their carrier status will always be UP. There will not be a NETDEV_CHANGE event. Well, one could argue that we would have to repair these

Re: [PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-23 Thread Martin Schiller
On 2020-11-23 09:31, Xie He wrote: On Sun, Nov 22, 2020 at 10:55 PM Martin Schiller wrote: No, they aren't independent. The carrier can only be up if the device / interface is UP. And as far as I can see a NETDEV_CHANGE event will also only be generated on interfaces that are UP. So you

Re: [PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-22 Thread Martin Schiller
On 2020-11-21 00:50, Xie He wrote: On Fri, Nov 20, 2020 at 3:11 PM Xie He wrote: Should we also handle the NETDEV_UP event here? In previous versions of this patch series you seemed to want to establish the L2 connection on device-up. But in this patch, you didn't handle NETDEV_UP. Maybe on

Re: [PATCH net-next v5] net/tun: Call netdev notifiers

2020-11-22 Thread Martin Schiller
On 2020-11-20 19:28, Jakub Kicinski wrote: On Wed, 18 Nov 2020 07:39:19 +0100 Martin Schiller wrote: Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller This is a fix, right? Can you give an example of something that goes wrong without this patch

[PATCH net-next v4 5/5] net/x25: remove x25_kill_by_device()

2020-11-19 Thread Martin Schiller
Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 16 1 file changed, 16 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 313a6222ded9..1432a05805ab 100644 --- a/net/x25/af_x25.c

[PATCH net-next v4 4/5] net/x25: fix restart request/confirm handling

2020-11-19 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 41 + 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/x25/x25_link.c b/net/x25

[PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-19 Thread Martin Schiller
sending SABM(E). Signed-off-by: Martin Schiller --- net/lapb/lapb_iface.c | 72 +++ 1 file changed, 72 insertions(+) diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 3c03f6512c5f..52d59984fbe6 100644 --- a/net/lapb/lapb_iface.c +++ b/net

[PATCH net-next v4 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-19 Thread Martin Schiller
1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller --- net/lapb/lapb_timer.c | 11 +-- 1 file changed, 9

[PATCH net-next v4 1/5] net/x25: handle additional netdev events

2020-11-19 Thread Martin Schiller
, as these will be handled in layer 2 (LAPB) and layer3 (X.25) will be informed by layer2 when layer2 link is established and layer3 link should be initiated. Signed-off-by: Martin Schiller --- net/x25/af_x25.c| 22 -- net/x25/x25_link.c | 6 +++--- net/x25

[PATCH net-next v4 0/5] net/x25: netdev event handling

2020-11-19 Thread Martin Schiller
carrier loss correctly in lapb o drop patch for x25_neighbour param handling this may need fixes/cleanup and will be resubmitted later. Changes to v1: o fix 'subject_prefix' and 'checkpatch' warnings --- Martin Schiller (5): net/x25: handle additional netdev events net/lapb: support netdev events

Re: [PATCH net-next v3 0/6] net/x25: netdev event handling

2020-11-18 Thread Martin Schiller
On 2020-11-18 15:47, Xie He wrote: On Wed, Nov 18, 2020 at 5:59 AM Martin Schiller wrote: --- Changes to v2: o restructure complete patch-set o keep netdev event handling in layer3 (X.25) But... Won't it be better to handle L2 connections in L2 code? For example, if we are running X.25

[PATCH net-next v3 5/6] net/x25: fix restart request/confirm handling

2020-11-18 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Also, the T20 timer needs to be stopped, if the link is terminated. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 45 + 1 file changed, 37

[PATCH net-next v3 6/6] net/x25: remove x25_kill_by_device()

2020-11-18 Thread Martin Schiller
Remove unnecessary function x25_kill_by_device(). Replace the call to x25_kill_by_device() by x25_kill_by_neigh(). Therefore, also remove the call to x25_clear_forward_by_dev() in x25_route_device_down(), as this is already called by x25_kill_by_neigh(). Signed-off-by: Martin Schiller --- net

[PATCH net-next v3 4/6] net/lapb: fix t1 timer handling for DCE

2020-11-18 Thread Martin Schiller
fix t1 timer handling for DCE in LAPB_STATE_0: o DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). o DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller --- net/lapb

[PATCH net-next v3 3/6] net/lapb: handle carrier loss correctly

2020-11-18 Thread Martin Schiller
In case of carrier loss, clear all queues, enter state LABB_STATE_0 and stop all timers. By setting rc = LAPB_NOTCONNECTED, the upper layer is informed about the disconnect. Signed-off-by: Martin Schiller --- net/lapb/lapb_iface.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH net-next v3 2/6] net/lapb: fix lapb_connect_request() for DCE

2020-11-18 Thread Martin Schiller
For a DTE interface we should change to state LAPB_STATE_1 and start sending SABM(E). But for DCE interfaces, we simply should start the timer t1. Signed-off-by: Martin Schiller --- net/lapb/lapb_iface.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/lapb

[PATCH net-next v3 1/6] net/x25: handle additional netdev events

2020-11-18 Thread Martin Schiller
in an upcomming commit, where x25 params of an neighbour will get configurable through ioctls. Additionally the NETDEV_CHANGE event makes it possible to handle carrier loss and detection. Signed-off-by: Martin Schiller --- include/net/x25.h | 2 ++ net/x25/af_x25.c | 44

[PATCH net-next v3 0/6] net/x25: netdev event handling

2020-11-18 Thread Martin Schiller
and will be resubmitted later. Changes to v1: o fix 'subject_prefix' and 'checkpatch' warnings --- Martin Schiller (6): net/x25: handle additional netdev events net/lapb: fix lapb_connect_request() for DCE net/lapb: handle carrier loss correctly net/lapb: fix t1 timer handling for DCE net/x25: fix restart

Re: [PATCH net-next v2 5/6] net/lapb: support netdev events

2020-11-18 Thread Martin Schiller
On 2020-11-18 14:46, Xie He wrote: On Wed, Nov 18, 2020 at 5:03 AM Xie He wrote: On Wed, Nov 18, 2020 at 12:49 AM Martin Schiller wrote: > > I also have a patch here that implements an "on demand" link feature, > which we used for ISDN dialing connections. > As

Re: [PATCH net-next v2 5/6] net/lapb: support netdev events

2020-11-18 Thread Martin Schiller
On 2020-11-17 19:28, Xie He wrote: On Tue, Nov 17, 2020 at 5:26 AM Martin Schiller wrote: On 2020-11-17 12:32, Xie He wrote: > > I think for a DCE, it doesn't need to initiate the L2 > connection on device-up. It just needs to wait for a connection to > come. But L3 seems

Re: [PATCH net-next v2 3/6] net/x25: replace x25_kill_by_device with x25_kill_by_neigh

2020-11-18 Thread Martin Schiller
On 2020-11-17 20:50, Xie He wrote: On Mon, Nov 16, 2020 at 6:00 AM Martin Schiller wrote: Remove unnecessary function x25_kill_by_device. -/* - * Kill all bound sockets on a dropped device. - */ -static void x25_kill_by_device(struct net_device *dev) -{ - struct sock *s

[PATCH net-next v5] net/tun: Call netdev notifiers

2020-11-17 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Changes to v4: * Fix copy'n'paste error Changes to v3: * Handle return value of call_netdevice_notifiers() Changes to v2: * Use subject_prefix 'net-next' to fix 'fixes_present' issue Changes

[PATCH net-next v4] net/tun: Call netdev notifiers

2020-11-17 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Changes to v3: * Handle return value of call_netdevice_notifiers() Changes to v2: * Use subject_prefix 'net-next' to fix 'fixes_present' issue Changes to v1: * Fix 'subject_prefix

Re: [PATCH net-next v3] net/tun: Call netdev notifiers

2020-11-17 Thread Martin Schiller
On 2020-11-18 01:32, Jakub Kicinski wrote: On Mon, 16 Nov 2020 11:41:21 +0100 Martin Schiller wrote: Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Change from v2: use subject_prefix 'net-next' to fix 'fixes_present' issue Change from v1

Re: [PATCH net-next v2 5/6] net/lapb: support netdev events

2020-11-17 Thread Martin Schiller
On 2020-11-17 12:32, Xie He wrote: On Tue, Nov 17, 2020 at 1:53 AM Martin Schiller wrote: On 2020-11-16 21:16, Xie He wrote: > Do you mean we will now automatically establish LAPB connections > without upper layers instructing us to do so? Yes, as soon as the physical link is estab

Re: [PATCH net-next v2 4/6] net/x25: support NETDEV_CHANGE notifier

2020-11-17 Thread Martin Schiller
On 2020-11-17 12:41, Xie He wrote: On Mon, Nov 16, 2020 at 6:00 AM Martin Schiller wrote: This makes it possible to handle carrier lost and detection. In case of carrier lost, we shutdown layer 3 and flush all sessions. @@ -275,6 +275,19 @@ static int x25_device_event(struct notifier_block

Re: [PATCH net-next v2 5/6] net/lapb: support netdev events

2020-11-17 Thread Martin Schiller
On 2020-11-16 21:16, Xie He wrote: Do you mean we will now automatically establish LAPB connections without upper layers instructing us to do so? Yes, as soon as the physical link is established, the L2 and also the L3 layer (restart handshake) is established. In this context I also noticed

[PATCH net-next v2 5/6] net/lapb: support netdev events

2020-11-16 Thread Martin Schiller
This makes it possible to handle carrier loss and detection. In case of Carrier Loss, layer 2 is terminated In case of Carrier Detection, we start timer t1 on a DCE interface, and on a DTE interface we change to state LAPB_STATE_1 and start sending SABM(E). Signed-off-by: Martin Schiller

[PATCH net-next v2 6/6] net/lapb: fix t1 timer handling

2020-11-16 Thread Martin Schiller
fix t1 timer handling in LAPB_STATE_0: o DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). o DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller --- Change from v1: fix

[PATCH net-next v2 2/6] net/x25: make neighbour params configurable

2020-11-16 Thread Martin Schiller
handling to select the next lc (DCE=from bottom / DTE=from top) o DTE/DCE handling to set correct clear/reset/restart cause o take default facilities from neighbour settings Signed-off-by: Martin Schiller --- Change from v1: o fix 'subject_prefix' and 'checkpatch' warnings o fix

[PATCH net-next v2 3/6] net/x25: replace x25_kill_by_device with x25_kill_by_neigh

2020-11-16 Thread Martin Schiller
Remove unnecessary function x25_kill_by_device. Signed-off-by: Martin Schiller --- Change from v1: fix 'subject_prefix' warning --- net/x25/af_x25.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index

[PATCH net-next v2 4/6] net/x25: support NETDEV_CHANGE notifier

2020-11-16 Thread Martin Schiller
This makes it possible to handle carrier lost and detection. In case of carrier lost, we shutdown layer 3 and flush all sessions. Signed-off-by: Martin Schiller --- Change from v1: fix 'subject_prefix' and 'checkpatch' warnings --- net/x25/af_x25.c | 13 + 1 file changed, 13

[PATCH net-next v2 0/6] netdev event handling + neighbour config

2020-11-16 Thread Martin Schiller
Martin Schiller (6): net/x25: handle additional netdev events net/x25: make neighbour params configurable net/x25: replace x25_kill_by_device with x25_kill_by_neigh net/x25: support NETDEV_CHANGE notifier net/lapb: support netdev events net/lapb: fix t1 timer handling include/net/x25

[PATCH net-next v2 1/6] net/x25: handle additional netdev events

2020-11-16 Thread Martin Schiller
in the next commit, where x25 params of an neighbour will get configurable through ioctls. Signed-off-by: Martin Schiller --- Change from v1: fix 'subject_prefix' and 'checkpatch' warnings --- include/net/x25.h | 2 ++ net/x25/af_x25.c | 26 ++ net/x25/x25_link.c

[PATCH net-next v3] net/tun: Call netdev notifiers

2020-11-16 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Change from v2: use subject_prefix 'net-next' to fix 'fixes_present' issue Change from v1: fix 'subject_prefix' and 'checkpatch' warnings --- drivers/net/tun.c | 4 1 file changed, 4

[PATCH net v2] net/tun: Call netdev notifiers

2020-11-16 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Change from v1: fix 'subject_prefix' and 'checkpatch' warnings --- drivers/net/tun.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index

Re: [PATCH 1/6] net/x25: add/remove x25_link_device by NETDEV_REGISTER/UNREGISTER

2020-11-16 Thread Martin Schiller
On 2020-11-16 09:45, Xie He wrote: Hi Martin, Thanks for the series. To get the series applied faster, could you address the warnings and failures shown on this page? https://patchwork.kernel.org/project/netdevbpf/list/?submitter=174539 Thanks! To let the netdev robot know which tree this

Re: [PATCH net-next] MAINTAINERS: Add Martin Schiller as a maintainer for the X.25 stack

2020-11-16 Thread Martin Schiller
On 2020-11-14 12:10, Xie He wrote: Martin Schiller is an active developer and reviewer for the X.25 code. His company is providing products based on the Linux X.25 stack. So he is a good candidate for maintainers of the X.25 code. The original maintainer of the X.25 network layer (Andrew Hendry

[PATCH] net/tun: Call notifiers before and after changing device type

2020-11-15 Thread Martin Schiller
Signed-off-by: Martin Schiller --- drivers/net/tun.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index be69d272052f..8253c5b03105 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -3124,9 +3124,11 @@ static long __tun_chr_ioctl(struct file

[PATCH 6/6] net/lapb: fix t1 timer handling

2020-11-15 Thread Martin Schiller
fix t1 timer handling in LAPB_STATE_0: o DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). o DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller --- net/lapb

[PATCH 1/6] net/x25: add/remove x25_link_device by NETDEV_REGISTER/UNREGISTER

2020-11-15 Thread Martin Schiller
will get configurable through ioctls. Signed-off-by: Martin Schiller --- include/net/x25.h | 2 ++ net/x25/af_x25.c | 19 + net/x25/x25_link.c | 51 -- 3 files changed, 66 insertions(+), 6 deletions(-) diff --git a/include/net/x25.h b

[PATCH 5/6] net/lapb: support netdev events

2020-11-15 Thread Martin Schiller
This makes it possible to handle carrier loss and detection. In case of Carrier Loss, layer 2 is terminated In case of Carrier Detection, we start timer t1 on a DCE interface, and on a DTE interface we change to state LAPB_STATE_1 and start sending SABM(E). Signed-off-by: Martin Schiller

[PATCH 3/6] net/x25: replace x25_kill_by_device with x25_kill_by_neigh

2020-11-15 Thread Martin Schiller
Remove unnecessary function x25_kill_by_device. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 439ae65ab7a8..d98d1145500e 100644 --- a/net/x25/af_x25.c

[PATCH 4/6] net/x25: support NETDEV_CHANGE notifier

2020-11-15 Thread Martin Schiller
This makes it possible to handle carrier lost and detection. In case of carrier lost, we shutdown layer 3 and flush all sessions. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index

[PATCH 2/6] net/x25: make neighbour params configurable

2020-11-15 Thread Martin Schiller
handling to select the next lc (DCE=from bottom / DTE=from top) o DTE/DCE handling to set correct clear/reset/restart cause o take default facilities from neighbour settings Signed-off-by: Martin Schiller --- include/net/x25.h| 7 ++- include/uapi/linux/x25.h | 54

Re: linux-x25 mail list not working

2020-11-12 Thread Martin Schiller
it seems to work again. - Martin On 11/12/2020 10:27 AM, Xie He wrote: Hi Linux maintainers, The linux-x25 mail list doesn't seem to be working. We sent a lot of emails to linux-x25 but Martin Schiller as a subscriber hasn't received a single email from the mail list. Looking at the mail list

Re: [PATCH net-next RFC] MAINTAINERS: Add Martin Schiller as a maintainer for the X.25 stack

2020-11-11 Thread Martin Schiller
On 2020-11-11 22:36, Xie He wrote: Hi Martin Schiller, would you like to be a maintainer for the X.25 stack? As we know the linux-x25 mail list has stopped working for a long time. Adding you as a maintainer may make you be Cc'd for new patches so that you can review them. About 1 year ago I

Re: [PATCH net] net: x25: Fix kernel crashes due to x25_disconnect releasing x25_neigh

2020-11-11 Thread Martin Schiller
disconnect") Cc: Martin Schiller Signed-off-by: Xie He --- net/x25/af_x25.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 0bbb283f23c9..8e59f9ecbeab 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -826,1

  1   2   >