librmnetctl: Enable multiqueue TX for rmnet devices
Create 10 queues for multiqueue rmnet devices. This is needed to manage flows more precisely at rmnet layer rather than at a custom classful qdisc. CRs-fixed: 2308858 Change-Id: I26bfc1b3f8b85e787d40af7a25abdb5f628fa7d8
This commit is contained in:
@@ -96,6 +96,13 @@ struct nlmsg {
|
||||
char data[NLMSG_DATA_SIZE];
|
||||
};
|
||||
|
||||
#define RMNETCTL_NUM_TX_QUEUES 10
|
||||
|
||||
/* This needs to be hardcoded here because some legacy linux systems
|
||||
* do not have this definition
|
||||
*/
|
||||
#define RMNET_IFLA_NUM_TX_QUEUES 31
|
||||
|
||||
/*===========================================================================
|
||||
LOCAL FUNCTION DEFINITIONS
|
||||
===========================================================================*/
|
||||
@@ -1160,6 +1167,14 @@ int rtrmnet_ctl_newvnd(rmnetctl_hndl_t *hndl, char *devname, char *vndname,
|
||||
req.nl_addr.nlmsg_len = NLMSG_ALIGN(req.nl_addr.nlmsg_len) +
|
||||
RTA_ALIGN(RTA_LENGTH(sizeof(val)));
|
||||
|
||||
attrinfo = (struct rtattr *)(((char *)&req) +
|
||||
NLMSG_ALIGN(req.nl_addr.nlmsg_len));
|
||||
attrinfo->rta_type = RMNET_IFLA_NUM_TX_QUEUES;
|
||||
attrinfo->rta_len = RTA_LENGTH(4);
|
||||
*(int *)RTA_DATA(attrinfo) = RMNETCTL_NUM_TX_QUEUES;
|
||||
req.nl_addr.nlmsg_len = NLMSG_ALIGN(req.nl_addr.nlmsg_len) +
|
||||
RTA_ALIGN(RTA_LENGTH((4)));
|
||||
|
||||
/* Set up IFLA info kind RMNET that has linkinfo and type */
|
||||
attrinfo = (struct rtattr *)(((char *)&req) +
|
||||
NLMSG_ALIGN(req.nl_addr.nlmsg_len));
|
||||
|
||||
Reference in New Issue
Block a user