This patch adds network namespace as a configuration parameter for
each interface. This parameter is only needed when configuring
interfaces in more than one namespace.

Signed-off-by: Anders Selhammer <anders.selham...@est.tech>
---
 config.c | 1 +
 ptp4l.8  | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/config.c b/config.c
index 2321310..df1e679 100644
--- a/config.c
+++ b/config.c
@@ -260,6 +260,7 @@ struct config_item config_tab[] = {
        PORT_ITEM_INT("min_neighbor_prop_delay", -20000000, INT_MIN, -1),
        PORT_ITEM_INT("neighborPropDelayThresh", 20000000, 0, INT_MAX),
        PORT_ITEM_INT("net_sync_monitor", 0, 0, 1),
+       PORT_ITEM_STR("network_namespace", ""),
        PORT_ITEM_ENU("network_transport", TRANS_UDP_IPV4, nw_trans_enu),
        GLOB_ITEM_INT("ntpshm_segment", 0, INT_MIN, INT_MAX),
        GLOB_ITEM_INT("offsetScaledLogVariance", 0xffff, 0, UINT16_MAX),
diff --git a/ptp4l.8 b/ptp4l.8
index 99b085c..a468d59 100644
--- a/ptp4l.8
+++ b/ptp4l.8
@@ -274,6 +274,15 @@ Relevant only with L2 transport. The default is 
01:1B:19:00:00:00.
 The MAC address to which peer delay messages should be sent.
 Relevant only with L2 transport. The default is 01:80:C2:00:00:0E.
 .TP
+.B network_namespace
+The network namspace in which the port operate.
+This option should be used if atleast one port operates in different
+namespaces than the other. When used, the ptp4l program needs to be
+opened in default namespace.
+Skip this option to select default namespace for the port.
+If all ports operates in same namespace, the ptp4l program can be opened
+directly in that namespace and this option can be disregarded.
+.TP
 .B network_transport
 Select the network transport. Possible values are UDPv4, UDPv6 and L2.
 The default is UDPv4.
-- 
1.8.3.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to