package/hostapd: add debug information options
PATCH v2 1/1 package/hostapd: add debug information options
From: Jared Bents <[email protected]>
hostapd 2.7 added compile time options to include redirecting the output from stdout to a file or syslog like wpa_supplicant
--- package/hostapd/Config.in | 5 +++++ package/hostapd/hostapd.mk | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-)
package/hostapd/Config.in +5 -0
@@ -81,6 +81,11 @@ config BR2_PACKAGE_HOSTAPD_WPS help Enable support for Wi-Fi Protected Setup. +config BR2_PACKAGE_HOSTAPD_DEBUG_SYSLOG + bool "Enable syslog support" + help + Enable support for sending debug messages to syslog. + config BR2_PACKAGE_HOSTAPD_VLAN bool "Enable VLAN support" default y
package/hostapd/hostapd.mk +7 -1
@@ -31,7 +31,9 @@ HOSTAPD_LICENSE = BSD-3-Clause HOSTAPD_LICENSE_FILES = README HOSTAPD_CONFIG_SET = -HOSTAPD_CONFIG_ENABLE = CONFIG_INTERNAL_LIBTOMMATH +HOSTAPD_CONFIG_ENABLE = \ + CONFIG_INTERNAL_LIBTOMMATH \ + CONFIG_DEBUG_FILE HOSTAPD_CONFIG_DISABLE =
@@ -98,6 +100,10 @@ ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y) HOSTAPD_CONFIG_ENABLE += CONFIG_WPS endif +ifeq ($(BR2_PACKAGE_HOSTAPD_DEBUG_SYSLOG),y) +HOSTAPD_CONFIG_ENABLE += CONFIG_DEBUG_SYSLOG +endif + ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN),) HOSTAPD_CONFIG_ENABLE += CONFIG_NO_VLAN endif
Signature · 1 line
2.18.0
PATCH v2 1/1 package/hostapd: add debug information options
Hello,
Quoted 33 lines · On Mon, 17 Jun 2019 10:35:33 -0500 jared.bents at rockwellcollins.com wrote:
From: Jared Bents <[email protected]>
hostapd 2.7 added compile time options to include redirecting the output from stdout to a file or syslog like
wpa_supplicantSigned-off-by Jared Bents <[email protected]>--- package/hostapd/Config.in | 5 +++++ package/hostapd/hostapd.mk | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-)package/hostapd/Config.in +5
-0@@ -81,6 +81,11 @@ config BR2_PACKAGE_HOSTAPD_WPS help Enable support for Wi-Fi Protected Setup. +config BR2_PACKAGE_HOSTAPD_DEBUG_SYSLOG + bool "Enable syslog support" + help + Enable support for sending debug messages to syslog. + config BR2_PACKAGE_HOSTAPD_VLAN bool "Enable VLAN support" default ypackage/hostapd/hostapd.mk +0
-0
package/hostapd/hostapd.mk HOSTAPD_LICENSE = BSD-3-Clause · line 36
Quoted 7 lines
package/hostapd/hostapd.mk +3
-1@@ -31,7 +31,9 @@ HOSTAPD_LICENSE = BSD-3-Clause HOSTAPD_LICENSE_FILES = README HOSTAPD_CONFIG_SET = -HOSTAPD_CONFIG_ENABLE = CONFIG_INTERNAL_LIBTOMMATH +HOSTAPD_CONFIG_ENABLE = \ + CONFIG_INTERNAL_LIBTOMMATH \ + CONFIG_DEBUG_FILE
So you're now enabling this unconditionally, while syslog logging is conditional.
Could you explain what CONFIG_DEBUG_FILE is doing compared to CONFIG_DEBUG_SYSLOG, and why one is conditional and not the other ? Do we really want CONFIG_DEBUG_FILE unconditionally ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Hi Thomas
Quoted 50 lines · Thomas Petazzoni
Hello,
Quoted 33 lines · On Mon, 17 Jun 2019 10:35:33 -0500 jared.bents at rockwellcollins.com wrote:
From: Jared Bents <[email protected]>
hostapd 2.7 added compile time options to include redirecting the output from stdout to a file or syslog like
wpa_supplicantSigned-off-by Jared Bents <[email protected]>--- package/hostapd/Config.in | 5 +++++ package/hostapd/hostapd.mk | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-)package/hostapd/Config.in +5
-0@@ -81,6 +81,11 @@ config BR2_PACKAGE_HOSTAPD_WPS help Enable support for Wi-Fi Protected Setup. +config BR2_PACKAGE_HOSTAPD_DEBUG_SYSLOG + bool "Enable syslog support" + help + Enable support for sending debug messages to syslog. + config BR2_PACKAGE_HOSTAPD_VLAN bool "Enable VLAN support" default ypackage/hostapd/hostapd.mk +0
-0package/hostapd/hostapd.mk HOSTAPD_LICENSE = BSD-3-Clause · line 36
Quoted 7 lines
package/hostapd/hostapd.mk +3
-1@@ -31,7 +31,9 @@ HOSTAPD_LICENSE = BSD-3-Clause HOSTAPD_LICENSE_FILES = README HOSTAPD_CONFIG_SET = -HOSTAPD_CONFIG_ENABLE = CONFIG_INTERNAL_LIBTOMMATH +HOSTAPD_CONFIG_ENABLE = \ + CONFIG_INTERNAL_LIBTOMMATH \ + CONFIG_DEBUG_FILESo you're now enabling this unconditionally, while syslog logging is conditional.
Quoted 3 lines
Could you explain what
CONFIG_DEBUG_FILEis doing compared toCONFIG_DEBUG_SYSLOG, and why one is conditional and not the other ? Do we really wantCONFIG_DEBUG_FILEunconditionally ?
I based it off of wpa_supplicant's implementation for each. In wpa_supplicant, CONFIG_DEBUG_FILE is turned on unconditionally while CONFIG_DEBUG_SYSLOG is optional. CONFIG_DEBUG_FILE enables a runtime option (-f) to specify a file to direct the hostapd output to instead of stdout. CONFIG_DEBUG_SYSLOG enables a runtime option (-s) to have the output go to syslog instead of stdout. These are purely optional at runtime as if neither of the -f or -s command line arguments are used, the output will go to stdout as before.
Quoted 12 lines
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://urldefense.proofpoint.com/v2/url?u=https-3A__bootlin.com&d=DwICAg&c=ilBQI1lupc9Y65XwNblLtw&r=04jwxyh4njdMBVpO4oXKRLEInKSiF8pfOjV75AsF1bU&m=z5QbCYjVAa1WSSiRX6UTcQMhQ9cm6gf6pMNwqFX6bwo&s=_2gcAZgIP5VPAyjBu9TaBaGgGX_QpkqjkPDfYxXBLY8&e=
_______________________________________________
buildroot mailing list
buildroot at busybox.net
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.busybox.net_mailman_listinfo_buildroot&d=DwICAg&c=ilBQI1lupc9Y65XwNblLtw&r=04jwxyh4njdMBVpO4oXKRLEInKSiF8pfOjV75AsF1bU&m=z5QbCYjVAa1WSSiRX6UTcQMhQ9cm6gf6pMNwqFX6bwo&s=5s5wYWn0myL65OzgVEbh9ZrOvRG5Tkc9GuBQI5jlW4A&e=
Thank you,
Jared
CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of Collins Aerospace and its affiliated companies. If you are not the intended recipient, please 1) Do not disclose, copy, distribute or use this message or its contents. 2) Advise the sender by return email. 3) Delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated.
Hello,
Quoted 4 lines · On Mon, 17 Jun 2019 12:56:08 -0500 Jared Bents <[email protected]> wrote:
Quoted 3 lines
Could you explain what
CONFIG_DEBUG_FILEis doing compared toCONFIG_DEBUG_SYSLOG, and why one is conditional and not the other ? Do we really wantCONFIG_DEBUG_FILEunconditionally ?
Quoted 8 lines
I based it off of wpa_supplicant's implementation for each. In
wpa_supplicant,CONFIG_DEBUG_FILEis turned on unconditionally whileCONFIG_DEBUG_SYSLOGis optional.CONFIG_DEBUG_FILEenables a runtime option (-f) to specify a file to direct the hostapd output to instead of stdout.CONFIG_DEBUG_SYSLOGenables a runtime option (-s) to have the output go to syslog instead of stdout. These are purely optional at runtime as if neither of the -f or -s command line arguments are used, the output will go to stdout as before.
What is the size impact of each option, compared to the overall installation size of hostapd ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 19 lines · Thomas Petazzoni
Hello,
Quoted 4 lines · On Mon, 17 Jun 2019 12:56:08 -0500 Jared Bents <[email protected]> wrote:
Quoted 3 lines
Could you explain what
CONFIG_DEBUG_FILEis doing compared toCONFIG_DEBUG_SYSLOG, and why one is conditional and not the other ? Do we really wantCONFIG_DEBUG_FILEunconditionally ?Quoted 8 lines
I based it off of wpa_supplicant's implementation for each. In
wpa_supplicant,CONFIG_DEBUG_FILEis turned on unconditionally whileCONFIG_DEBUG_SYSLOGis optional.CONFIG_DEBUG_FILEenables a runtime option (-f) to specify a file to direct the hostapd output to instead of stdout.CONFIG_DEBUG_SYSLOGenables a runtime option (-s) to have the output go to syslog instead of stdout. These are purely optional at runtime as if neither of the -f or -s command line arguments are used, the output will go to stdout as before.
Quoted 2 lines
What is the size impact of each option, compared to the overall installation size of hostapd ?
I haven't been able to determine a size impact. When trying to see a size difference, I am getting sizes for hostapd varying between 1.4M and 1.6M without any real correlation with whether I have one of the two options selected, both selected, or neither of them selected
Quoted 6 lines
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://urldefense.proofpoint.com/v2/url?u=https-3A__bootlin.com&d=DwICAg&c=ilBQI1lupc9Y65XwNblLtw&r=04jwxyh4njdMBVpO4oXKRLEInKSiF8pfOjV75AsF1bU&m=PmA5YY-0KdN5c4F6VT2nEv0Iwi2cNaKyRwDGKIuEyFM&s=k9ILTT4pycZsRW8MEQf9QNxS0p855aHiN9tZ3rBWwBA&e=
Jared
Quoted 21 lines · Jared Bents
Quoted 19 lines · Thomas Petazzoni
Hello,
Quoted 12 lines · On Mon, 17 Jun 2019 12:56:08 -0500 Jared Bents <[email protected]> wrote:
Quoted 3 lines
Could you explain what
CONFIG_DEBUG_FILEis doing compared toCONFIG_DEBUG_SYSLOG, and why one is conditional and not the other ? Do we really wantCONFIG_DEBUG_FILEunconditionally ?I based it off of wpa_supplicant's implementation for each. In
wpa_supplicant,CONFIG_DEBUG_FILEis turned on unconditionally whileCONFIG_DEBUG_SYSLOGis optional.CONFIG_DEBUG_FILEenables a runtime option (-f) to specify a file to direct the hostapd output to instead of stdout.CONFIG_DEBUG_SYSLOGenables a runtime option (-s) to have the output go to syslog instead of stdout. These are purely optional at runtime as if neither of the -f or -s command line arguments are used, the output will go to stdout as before.
Quoted 7 lines
Quoted 2 lines
What is the size impact of each option, compared to the overall installation size of hostapd ?
I haven't been able to determine a size impact. When trying to see a size difference, I am getting sizes for hostapd varying between 1.4M and 1.6M without any real correlation with whether I have one of the two options selected, both selected, or neither of them selected
I've done a native build of all combinations, with -g0 and strip, and it always
gives 380K.
Which is not surprising. The only difference is one additional condition and
function call. The syslog option might make a tiny difference when linking statically (which I haven't tried) because it doesn't need to include the openlog() and syslog() functions.
So no, it's not worth to make this configurable.
For wpa_supplicant, the syslog option was added in 2013. I guess at the time
nobody wondered about the size impact. The file option was forced on in 2015 - at that time, the size impact was considered and measured to be 963 bytes so no user-configurable option was added for it.
Regards,
Arnout