integ/base/linuxptp/centos/patches/0004-p4-Do-not-renew-raw-tr...

32 lines
776 B
Diff

From 9587b2ed9460a6c5fc50166d94cb43814c4c3a32 Mon Sep 17 00:00:00 2001
From: Cole Walker <cole.walker@windriver.com>
Date: Wed, 23 Jun 2021 10:32:41 -0400
Subject: [PATCH 4/6] p4 Do not renew raw transport sockets
---
port.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/port.c b/port.c
index affa48b..c96389a 100644
--- a/port.c
+++ b/port.c
@@ -1650,6 +1650,14 @@ static int port_renew_transport(struct port *p)
if (!port_is_enabled(p)) {
return 0;
}
+
+
+ /* Closing and binding of raw sockets is too slow and unnecessary */
+ if (transport_type(p->trp) == TRANS_IEEE_802_3) {
+ return 0;
+ }
+
+
transport_close(p->trp, &p->fda);
port_clear_fda(p, FD_FIRST_TIMER);
res = transport_open(p->trp, p->iface, &p->fda, p->timestamping);
--
2.29.2