summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_private.h
diff options
context:
space:
mode:
authorliuyacan <liuyacan@corp.netease.com>2021-06-13 14:54:55 +0800
committerFlorin Coras <florin.coras@gmail.com>2021-06-14 14:35:04 +0000
commit55c952ed5f56a1a478f03f8458e82530478c4359 (patch)
tree43198873060cc8b36cda93995a2f4e56810e87ff /src/vcl/vcl_private.h
parent89d939e52c999edec66194c60bc5afb2397a2842 (diff)
vcl: improve shutdown()
This commit does following: - Change the behavior of shutdown() with SHUT_RDWR flag. - Check SHUT_RD flag when read() - Change the errno when write() after SHUT_WR - Remove unused code All the above modification passed the packetdrill test. Type: improvement Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I0c81f52e563562e58580d70976526b898e65e915
Diffstat (limited to 'src/vcl/vcl_private.h')
-rw-r--r--src/vcl/vcl_private.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index 628b7310788..5b19f946fe7 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -126,8 +126,6 @@ typedef enum
VCL_SESS_ATTR_TCP_NODELAY, // SOL_TCP,TCP_NODELAY
VCL_SESS_ATTR_TCP_KEEPIDLE, // SOL_TCP,TCP_KEEPIDLE
VCL_SESS_ATTR_TCP_KEEPINTVL, // SOL_TCP,TCP_KEEPINTVL
- VCL_SESS_ATTR_SHUT_RD,
- VCL_SESS_ATTR_SHUT_WR,
VCL_SESS_ATTR_MAX
} vppcom_session_attr_t;
@@ -137,7 +135,8 @@ typedef enum vcl_session_flags_
VCL_SESSION_F_IS_VEP = 1 << 1,
VCL_SESSION_F_IS_VEP_SESSION = 1 << 2,
VCL_SESSION_F_HAS_RX_EVT = 1 << 3,
- VCL_SESSION_F_SHUTDOWN = 1 << 4,
+ VCL_SESSION_F_RD_SHUTDOWN = 1 << 4,
+ VCL_SESSION_F_WR_SHUTDOWN = 1 << 5,
} __clib_packed vcl_session_flags_t;
typedef struct vcl_session_