vcl: add api to retrieve num bytes for tx

Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iaa1b026e2baea1c03f8c75e7d6879d0ff6d379d6
This commit is contained in:
Florin Coras
2024-03-18 12:25:38 -07:00
committed by Dave Barach
parent a8d266a7a4
commit 8ae63db020
3 changed files with 21 additions and 2 deletions

View File

@ -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;