summaryrefslogtreecommitdiffstats
path: root/src/vcl/ldp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-03-18 12:25:38 -0700
committerDave Barach <vpp@barachs.net>2024-03-25 18:53:05 +0000
commit8ae63db02066a2b5ac18a89fd63dc0dd2a811ab3 (patch)
tree0d7877f1c8bd18ce9dd4f32cfddfa3e4f557bc35 /src/vcl/ldp.c
parenta8d266a7a4bf1188739dcd6d3ddcc8173282d95d (diff)
vcl: add api to retrieve num bytes for tx
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iaa1b026e2baea1c03f8c75e7d6879d0ff6d379d6
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r--src/vcl/ldp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 566b5a858a3..bd3457fa8fd 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -613,7 +613,13 @@ ioctl (int fd, unsigned long int cmd, ...)
case FIONREAD:
rv = vls_attr (vlsh, VPPCOM_ATTR_GET_NREAD, 0, 0);
break;
-
+ case TIOCOUTQ:
+ {
+ u32 *buf = va_arg (ap, void *);
+ u32 *buflen = va_arg (ap, u32 *);
+ rv = vls_attr (vlsh, VPPCOM_ATTR_GET_NWRITEQ, buf, buflen);
+ }
+ break;
case FIONBIO:
{
u32 flags = *(va_arg (ap, int *)) ? O_NONBLOCK : 0;