From 4dca07c803308611275f78b490ac0352c1052fe2 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 10 Jul 2019 07:14:20 +0200 Subject: Fix socketclient for VPP 19.08 - in VPP 19.08 the socket type has changed to STREAM and data has to be writtento VPP with single flush, otherwise msg might get mixed with next header and cause VPP to stop responding - this also fixes WaitReady for socketclient and vppapiclient Change-Id: I022724c0c09c9b92d4c695d1cf2be15994fff717 Signed-off-by: Ondrej Fabry --- core/request_handler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/request_handler.go') diff --git a/core/request_handler.go b/core/request_handler.go index fd8aa59..d3f7bdc 100644 --- a/core/request_handler.go +++ b/core/request_handler.go @@ -93,7 +93,7 @@ func (c *Connection) processRequest(ch *Channel, req *vppRequest) error { "msg_size": len(data), "seq_num": req.seqNum, "msg_crc": req.msg.GetCrcString(), - }).Debugf("--> govpp send: %s: %+v", req.msg.GetMessageName(), req.msg) + }).Debugf("==> govpp send: %s: %+v", req.msg.GetMessageName(), req.msg) } // send the request to VPP @@ -118,7 +118,7 @@ func (c *Connection) processRequest(ch *Channel, req *vppRequest) error { "msg_id": c.pingReqID, "msg_size": len(pingData), "seq_num": req.seqNum, - }).Debug(" -> sending control ping") + }).Debug("--> sending control ping") if err := c.vppClient.SendMsg(context, pingData); err != nil { log.WithFields(logger.Fields{ @@ -165,7 +165,7 @@ func (c *Connection) msgCallback(msgID uint16, data []byte) { "is_multi": isMulti, "seq_num": seqNum, "msg_crc": msg.GetCrcString(), - }).Debugf("<-- govpp recv: %s", msg.GetMessageName()) + }).Debugf("<== govpp recv: %s", msg.GetMessageName()) } if context == 0 || c.isNotificationMessage(msgID) { -- cgit 1.2.3-korg