Summary: | DAHLIN-00382: Broken build for Linux ≥ 4.7 with netdev support enabled | ||
Reporter: | Alexei A Smekalkine (ikle) | Labels: | patch |
Date Opened: | 2020-08-30 12:49:27 | Date Closed: | |
Priority: | Major | Regression? | |
Status: | Triage/New | Components: | dahdi (the module) |
Versions: | 3.0.0 3.1.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) 0001-dahdi-base-fix-build-with-Linux-4.7-and-netdev-suppo.patch | |
Description: | Transaction start time field [removed from net_device structure in Linux 4.7|https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9b36627acecd5792e81daf1a3bff8eab39ed45fb].
To fix this use netif_trans_update helper from <linux/netdevice.h>. P.S. [The attached patch|^0001-dahdi-base-fix-build-with-Linux-4.7-and-netdev-suppo.patch] has beed tested with Linux 4.19. | ||
Comments: | By: Alexei A Smekalkine (ikle) 2020-08-30 12:55:28.346-0500 # Use case #1: Linux < 4.7: nothing really chaged. # Use case #2: Linux ≥ 4.7: used new netif_trans_update helper. P.S. "Not" in last paragraph of patch description is a typo. By: Harald Welte (laforge) 2020-09-06 06:50:37.077-0500 Heh, I just independently fixed that bug and sent a patch as pull request to github: https://github.com/asterisk/dahdi-linux/pull/5 I decided to use github (before finding this bug report here) as the dahdi-linux project is not managed by the asterisk.org gerrit and I couldn't find any description anywhere (like the dahdi-linux README) on how patch submissions are supposed to work. By: Alexei A Smekalkine (ikle) 2020-09-06 09:42:07.681-0500 bq. I couldn't find any description anywhere Me too.This is why the patch from January 2019 only appeared here a week ago. Projects dahdi-linux and dahdi-tools are almost not supported or developed. Repositories on GitHub are mirrors of such on git.asterisk.org, changes to which arrive with a delay of several months: even a release is not a reason for mirroring. So you can wait even longer on GitHub then here. P.S. I have a whole series of fixes to work netdev on DAHDI accumulated over the past four years and used in production. (Plus HDLC fixes, netdev over hard HDLC support, PPP fixes, added single span device support to wct4xxp (supported previously by removed now wct1xxp), et cetera.) By: Harald Welte (laforge) 2020-09-06 11:04:48.930-0500 Alexei, is your git tree somewhere public? I'm happy to contribute towards a dahdi-linux fork with more active maintenance in terms of DAHDI_NET support. By: Alexei A Smekalkine (ikle) 2020-09-06 12:55:04.581-0500 Most of our work is in a closed OE-based repository and the changes are added as a set of patches. I posted most of it right now for you: https://github.com/ikle/dahdi-linux/commits/work — This changeset is being used in production with Linux 4.4 on top of commit 6667f1c8d8fadc29ef95dce4f8b025f38d3d3084 (pre-3.0). (Also builds for Linux 4.19, but not as thoroughly tested at the moment.) In this case, I did a rebase on next branch of upstream (without conflicts). * commit fa2addaad403c63b426bed4938b5055d88871bfd (uncomment netdev flag definition) seems to have been added by mistake a long time ago when trying to port version 2.11 to new kernels: I don't see any use of this definition anywhere in the code today. In any case, this change is safe and will not break anything. * commit a0f79fe3a08f428687c157584c78fd14fbfd8378: add support for hard HDLC netdev — It might make sense to split to two patches and call the open and close methods not only for hard HDLC. * commit ff1d8ba22c717a3a4901ade5041bf424b957e903: wct4xxp: add support for OpenVox D115/D130 — Needs to be divided to two patches: adding single span devices support and adding OpenVox single span devices support. In the second case, it may be necessary to add a mechanism for loading alternative firmware for OpenVox: We do not have Wildcard devices and we have not tested the ability of OpenVox devices to work with firmware from Wildcard. (OpenVox devices seems to be clone of Wildcard devices.) Most of the fixes have not yet been submitted here at the moment. https://github.com/ikle/dahdi-tools/commits/work — Same as for dahdi-linux, used in production. * Support unframed E1 — need support from device driver, as an example: https://github.com/ikle/ds (good sample for DAHDI development and tests: this driver can work without a real hardware in "fake" mode). * tools/sethdlc: support Cisco HDLC ethernet — support for https://github.com/ikle/ds/blob/master/linux/hdlc_cisco_eth.c, In a good way, we need to send it upstream first. Used in production, triggers DAHLIN-381. * dahdi_cfg: fix HDLC channels aggregation — required for proper PPPoHDLC support (used dchan with pppd to support authentication) and for hard HDLC. P.S. Let's not litter this task with unrelated comments anymore: use email directly. |