@@ -104,6 +104,10 @@ attribute-sets:
name: napi-id
doc: napi id
type: u32
+ -
+ name: irq
+ doc: The associated interrupt vector number for the napi
+ type: u32
-
name: queue
attributes:
@@ -193,6 +197,7 @@ operations:
attributes:
- napi-id
- ifindex
+ - irq
dump:
request:
attributes:
@@ -72,6 +72,7 @@ enum {
enum {
NETDEV_A_NAPI_IFINDEX = 1,
NETDEV_A_NAPI_NAPI_ID,
+ NETDEV_A_NAPI_IRQ,
__NETDEV_A_NAPI_MAX,
NETDEV_A_NAPI_MAX = (__NETDEV_A_NAPI_MAX - 1)
@@ -72,6 +72,7 @@ enum {
enum {
NETDEV_A_NAPI_IFINDEX = 1,
NETDEV_A_NAPI_NAPI_ID,
+ NETDEV_A_NAPI_IRQ,
__NETDEV_A_NAPI_MAX,
NETDEV_A_NAPI_MAX = (__NETDEV_A_NAPI_MAX - 1)
@@ -101,6 +101,7 @@ struct ynl_policy_nest netdev_queue_nest = {
struct ynl_policy_attr netdev_napi_policy[NETDEV_A_NAPI_MAX + 1] = {
[NETDEV_A_NAPI_IFINDEX] = { .name = "ifindex", .type = YNL_PT_U32, },
[NETDEV_A_NAPI_NAPI_ID] = { .name = "napi-id", .type = YNL_PT_U32, },
+ [NETDEV_A_NAPI_IRQ] = { .name = "irq", .type = YNL_PT_U32, },
};
struct ynl_policy_nest netdev_napi_nest = {
@@ -394,6 +395,11 @@ int netdev_napi_get_rsp_parse(const struct nlmsghdr *nlh, void *data)
return MNL_CB_ERROR;
dst->_present.ifindex = 1;
dst->ifindex = mnl_attr_get_u32(attr);
+ } else if (type == NETDEV_A_NAPI_IRQ) {
+ if (ynl_attr_validate(yarg, attr))
+ return MNL_CB_ERROR;
+ dst->_present.irq = 1;
+ dst->irq = mnl_attr_get_u32(attr);
}
}
@@ -214,10 +214,12 @@ struct netdev_napi_get_rsp {
struct {
__u32 napi_id:1;
__u32 ifindex:1;
+ __u32 irq:1;
} _present;
__u32 napi_id;
__u32 ifindex;
+ __u32 irq;
};
void netdev_napi_get_rsp_free(struct netdev_napi_get_rsp *rsp);