[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH]  zcip: add support for DoIP/ISO 13400 timings
From:       Akash Hadke <Akash.Hadke () kpit ! com>
Date:       2022-09-05 12:40:42
Message-ID: MA0PR01MB8613389DFACDB59909C4C25E8E7F9 () MA0PR01MB8613 ! INDPRD01 ! PROD ! OUTLOOK ! COM
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Package: busybox
Version: v1.36.0
Severity: wishlist

DoIP requires fast IP assignment, faster than what RFC 3927 can
guarantee, and so it defines its' own AutoIP timing parameters

Add a compile-time option to use DoIP timing parameters instead of
default RFC 3927 parameters. This option is helpful for the use of zcip in
automotive use cases. In practice, it decreases AutoIP allocation time
from ~10s to ~2s, at the expense of less resilience to collisions


Best Regards,

Akash Hadke

[Attachment #5 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} \
</style> </head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
                color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" \
                class="elementToProof">
Package: busybox</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
                color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" \
                class="elementToProof">
Version: v1.36.0</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
                color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" \
                class="elementToProof">
Severity: wishlist</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof"> \
<br> </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof"> \
DoIP requires fast IP assignment, faster than what RFC 3927 can <div>guarantee, and \
so it defines its' own AutoIP timing parameters</div> <div><br>
</div>
<div>Add a compile-time option to use DoIP timing parameters instead of</div>
<div>default RFC 3927 parameters. This option is helpful for the use of zcip in</div>
<div>automotive use cases. In practice, it decreases AutoIP allocation time</div>
from ~10s to ~2s, at the expense of less resilience to collisions<br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> <br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> <span style="font-size: 11pt; color: rgb(12, 100, \
192);"></span></div> <p style="text-align: start; font-size: 11pt; font-family: \
Calibri, sans-serif; margin: 0px; color: rgb(32, 31, 30); background-color: white;"> \
<span style="margin: 0px; font-size: 10pt; font-family: &quot;Work Sans&quot;; color: \
rgb(89, 89, 89);">Best Regards,</span><br> </p>
<p style="text-align: start; font-size: 11pt; font-family: Calibri, sans-serif; \
margin: 0px 0px 12pt; color: rgb(32, 31, 30); background-color: white;"> <span \
lang="en-IN" style="margin: 0px; font-family: &quot;Work Sans Medium&quot;; color: \
rgb(89, 89, 89);"><b>Akash Hadke</b></span></p> <p style="text-align: start; \
font-size: 11pt; font-family: Calibri, sans-serif; margin: 0px 0px 12pt; color: \
rgb(32, 31, 30); background-color: white;"> <span style="margin: 0px; color: rgb(31, \
73, 125);"></span></p> </div>
</div>
</div>
</body>
</html>


["0001-zcip-add-support-for-DoIP-ISO-13400-timings.patch" (text/x-patch)]

From 22b3a1a60ce2d42b82381cdc88a01fc98aaf9954 Mon Sep 17 00:00:00 2001
From: Akash Hadke <akash.hadke@kpit.com>
Date: Mon, 5 Sep 2022 14:27:02 +0200
Subject: [PATCH] zcip: add support for DoIP/ISO 13400 timings

DoIP requires fast IP assignment, faster than what RFC 3927 can
guarantee, and so it defines its' own AutoIP timing parameters

Add a compile-time option to use DoIP timing parameters instead of
default RFC 3927 parameters. This option is helpful for the use of zcip in
automotive use cases. In practice, it decreases AutoIP allocation time
from ~10s to ~2s, at the expense of less resilience to collisions

Signed-off-by: Ricardo Leite <ricardo.leite at criticaltechworks.com>
Signed-off-by: Akash Hadke <akash.hadke@kpit.com>
---
 configs/TEST_nommu_defconfig    |  1 +
 configs/TEST_noprintf_defconfig |  1 +
 configs/TEST_rh9_defconfig      |  1 +
 configs/android2_defconfig      |  1 +
 configs/android_502_defconfig   |  1 +
 configs/android_defconfig       |  1 +
 configs/android_ndk_defconfig   |  1 +
 configs/cygwin_defconfig        |  1 +
 configs/freebsd_defconfig       |  1 +
 networking/zcip.c               | 23 +++++++++++++++++++++++
 10 files changed, 32 insertions(+)

diff --git a/configs/TEST_nommu_defconfig b/configs/TEST_nommu_defconfig
index 415f5a802..3f8ca40d7 100644
--- a/configs/TEST_nommu_defconfig
+++ b/configs/TEST_nommu_defconfig
@@ -769,6 +769,7 @@ CONFIG_FEATURE_WGET_STATUSBAR=y
 CONFIG_FEATURE_WGET_AUTHENTICATION=y
 CONFIG_FEATURE_WGET_LONG_OPTIONS=y
 CONFIG_ZCIP=y
+# CONFIG_ZCIP_USE_ISO_13400_TIMINGS is not set
 CONFIG_TCPSVD=y
 CONFIG_TUNCTL=y
 CONFIG_FEATURE_TUNCTL_UG=y
diff --git a/configs/TEST_noprintf_defconfig b/configs/TEST_noprintf_defconfig
index 9b378fd55..5cfd5b3d7 100644
--- a/configs/TEST_noprintf_defconfig
+++ b/configs/TEST_noprintf_defconfig
@@ -781,6 +781,7 @@ CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
 # CONFIG_FEATURE_WGET_AUTHENTICATION is not set
 # CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
 # CONFIG_ZCIP is not set
+# CONFIG_ZCIP_USE_ISO_13400_TIMINGS is not set
 
 #
 # Print Utilities
diff --git a/configs/TEST_rh9_defconfig b/configs/TEST_rh9_defconfig
index 4ac62b9da..1fe074e79 100644
--- a/configs/TEST_rh9_defconfig
+++ b/configs/TEST_rh9_defconfig
@@ -791,6 +791,7 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y
 CONFIG_FEATURE_WGET_LONG_OPTIONS=y
 CONFIG_FEATURE_WGET_TIMEOUT=y
 CONFIG_ZCIP=y
+# CONFIG_ZCIP_USE_ISO_13400_TIMINGS is not set
 
 #
 # Print Utilities
diff --git a/configs/android2_defconfig b/configs/android2_defconfig
index d4b8f1616..eceabbc20 100644
--- a/configs/android2_defconfig
+++ b/configs/android2_defconfig
@@ -828,6 +828,7 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y
 # CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
 CONFIG_FEATURE_WGET_TIMEOUT=y
 # CONFIG_ZCIP is not set
+# CONFIG_ZCIP_USE_ISO_13400_TIMINGS is not set
 
 #
 # Print Utilities
diff --git a/configs/android_502_defconfig b/configs/android_502_defconfig
index 104e70f23..0ed60ae61 100644
--- a/configs/android_502_defconfig
+++ b/configs/android_502_defconfig
@@ -968,6 +968,7 @@ CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
 CONFIG_UDPSVD=y
 CONFIG_VCONFIG=y
 # CONFIG_ZCIP is not set
+# CONFIG_ZCIP_USE_ISO_13400_TIMINGS is not set
 
 #
 # Print Utilities
diff --git a/configs/android_defconfig b/configs/android_defconfig
index 92a66048a..c1d38328b 100644
--- a/configs/android_defconfig
+++ b/configs/android_defconfig
@@ -858,6 +858,7 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y
 # CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
 CONFIG_FEATURE_WGET_TIMEOUT=y
 # CONFIG_ZCIP is not set
+# CONFIG_ZCIP_USE_ISO_13400_TIMINGS is not set
 
 #
 # Print Utilities
diff --git a/configs/android_ndk_defconfig b/configs/android_ndk_defconfig
index 425593454..384304d46 100644
--- a/configs/android_ndk_defconfig
+++ b/configs/android_ndk_defconfig
@@ -884,6 +884,7 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y
 # CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
 CONFIG_FEATURE_WGET_TIMEOUT=y
 # CONFIG_ZCIP is not set
+# CONFIG_ZCIP_USE_ISO_13400_TIMINGS is not set
 
 #
 # Print Utilities
diff --git a/configs/cygwin_defconfig b/configs/cygwin_defconfig
index c09bc9281..30c90d587 100644
--- a/configs/cygwin_defconfig
+++ b/configs/cygwin_defconfig
@@ -831,6 +831,7 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y
 CONFIG_FEATURE_WGET_LONG_OPTIONS=y
 CONFIG_FEATURE_WGET_TIMEOUT=y
 # CONFIG_ZCIP is not set
+# CONFIG_ZCIP_USE_ISO_13400_TIMINGS is not set
 
 #
 # Print Utilities
diff --git a/configs/freebsd_defconfig b/configs/freebsd_defconfig
index 6cbd54895..c09197be3 100644
--- a/configs/freebsd_defconfig
+++ b/configs/freebsd_defconfig
@@ -810,6 +810,7 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y
 CONFIG_FEATURE_WGET_LONG_OPTIONS=y
 CONFIG_FEATURE_WGET_TIMEOUT=y
 # CONFIG_ZCIP is not set
+# CONFIG_ZCIP_USE_ISO_13400_TIMINGS is not set
 
 #
 # Print Utilities
diff --git a/networking/zcip.c b/networking/zcip.c
index 311dfbe4c..03c904d8a 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -24,6 +24,15 @@
 //config:
 //config:	See http://www.zeroconf.org for further details, and "zcip.script"
 //config:	in the busybox examples.
+//config:
+//config:config ZCIP_USE_ISO_13400_TIMINGS
+//config:	bool "Use ISO 13400 (DoIP) timings"
+//config:	default y
+//config:	depends on ZCIP
+//config:	help
+//config:	Use timings from ISO 13400-2 (for DoIP) instead of RFC 3927,
+//config:	which dramatically speeds up AutoIP allocation time at the cost
+//config:	of less resilience to collisions.
 
 //applet:IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP))
 
@@ -73,12 +82,26 @@ struct arp_packet {
 enum {
 	/* 0-1 seconds before sending 1st probe */
 	PROBE_WAIT = 1,
+
+#if ENABLE_ZCIP_USE_ISO_13400_TIMINGS
+	/**
+	 * DoIP-specific timings, see ISO 13400-2, Section 9.1.2.2, Table 15
+	 */
+	/* 0-1 seconds between probes */
+	PROBE_MIN = 0,
+	PROBE_MAX = 1,
+	PROBE_NUM = 1,		/* total probes to send */
+	ANNOUNCE_INTERVAL = 1,  /* 1 seconds between announces */
+	ANNOUNCE_NUM = 1,	/* announces to send */
+#else
 	/* 1-2 seconds between probes */
 	PROBE_MIN = 1,
 	PROBE_MAX = 2,
 	PROBE_NUM = 3,		/* total probes to send */
 	ANNOUNCE_INTERVAL = 2,  /* 2 seconds between announces */
 	ANNOUNCE_NUM = 3,	/* announces to send */
+#endif
+
 	/* if probe/announce sees a conflict, multiply RANDOM(NUM_CONFLICT) by... */
 	CONFLICT_MULTIPLIER = 2,
 	/* if we monitor and see a conflict, how long is defend state? */
-- 
2.17.1



_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic