ldp: add support for TCP_CONGESTION sockopts (VPP-1550)
Change-Id: I0fcf3385cc4fb96f000b84d5f880f74131c0d60f Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 0ed24e93b207850078ca7f58cd4106cc4a906952)
This commit is contained in:
Florin Coras
committed by
Florin Coras
parent
1705599efe
commit
0cb68778ec
@ -1700,6 +1700,11 @@ getsockopt (int fd, int level, int optname,
|
|||||||
else
|
else
|
||||||
rv = -EFAULT;
|
rv = -EFAULT;
|
||||||
break;
|
break;
|
||||||
|
case TCP_CONGESTION:
|
||||||
|
strcpy (optval, "cubic");
|
||||||
|
*optlen = strlen ("cubic");
|
||||||
|
rv = 0;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LDBG (0, "ERROR: fd %d: getsockopt SOL_TCP: sid %u, "
|
LDBG (0, "ERROR: fd %d: getsockopt SOL_TCP: sid %u, "
|
||||||
"optname %d unsupported!", fd, vlsh, optname);
|
"optname %d unsupported!", fd, vlsh, optname);
|
||||||
@ -1808,6 +1813,10 @@ setsockopt (int fd, int level, int optname,
|
|||||||
rv = vls_attr (vlsh, VPPCOM_ATTR_SET_TCP_KEEPINTVL,
|
rv = vls_attr (vlsh, VPPCOM_ATTR_SET_TCP_KEEPINTVL,
|
||||||
(void *) optval, &optlen);
|
(void *) optval, &optlen);
|
||||||
break;
|
break;
|
||||||
|
case TCP_CONGESTION:
|
||||||
|
/* Ignore */
|
||||||
|
rv = 0;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LDBG (0, "ERROR: fd %d: setsockopt() SOL_TCP: vlsh %u"
|
LDBG (0, "ERROR: fd %d: setsockopt() SOL_TCP: vlsh %u"
|
||||||
"optname %d unsupported!", fd, vlsh, optname);
|
"optname %d unsupported!", fd, vlsh, optname);
|
||||||
|
Reference in New Issue
Block a user