diff --git a/home/nipa/nipa_out/905732/ynl/old-code/netdev-user.c b/home/nipa/nipa_out/905732/ynl/new-code/netdev-user.c index 81af84a84e3f..1d3877ce20bb 100644 --- a/home/nipa/nipa_out/905732/ynl/old-code/netdev-user.c +++ b/home/nipa/nipa_out/905732/ynl/new-code/netdev-user.c @@ -195,6 +195,7 @@ const struct ynl_policy_attr netdev_napi_policy[NETDEV_A_NAPI_MAX + 1] = { [NETDEV_A_NAPI_PID] = { .name = "pid", .type = YNL_PT_U32, }, [NETDEV_A_NAPI_DEFER_HARD_IRQS] = { .name = "defer-hard-irqs", .type = YNL_PT_U32, }, [NETDEV_A_NAPI_GRO_FLUSH_TIMEOUT] = { .name = "gro-flush-timeout", .type = YNL_PT_UINT, }, + [NETDEV_A_NAPI_IRQ_SUSPEND_TIMEOUT] = { .name = "irq-suspend-timeout", .type = YNL_PT_UINT, }, }; const struct ynl_policy_nest netdev_napi_nest = { @@ -953,6 +954,11 @@ int netdev_napi_get_rsp_parse(const struct nlmsghdr *nlh, return YNL_PARSE_CB_ERROR; dst->_present.gro_flush_timeout = 1; dst->gro_flush_timeout = ynl_attr_get_uint(attr); + } else if (type == NETDEV_A_NAPI_IRQ_SUSPEND_TIMEOUT) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.irq_suspend_timeout = 1; + dst->irq_suspend_timeout = ynl_attr_get_uint(attr); } } @@ -1240,6 +1246,8 @@ int netdev_napi_set(struct ynl_sock *ys, struct netdev_napi_set_req *req) ynl_attr_put_u32(nlh, NETDEV_A_NAPI_DEFER_HARD_IRQS, req->defer_hard_irqs); if (req->_present.gro_flush_timeout) ynl_attr_put_uint(nlh, NETDEV_A_NAPI_GRO_FLUSH_TIMEOUT, req->gro_flush_timeout); + if (req->_present.irq_suspend_timeout) + ynl_attr_put_uint(nlh, NETDEV_A_NAPI_IRQ_SUSPEND_TIMEOUT, req->irq_suspend_timeout); err = ynl_exec(ys, nlh, &yrs); if (err < 0) diff --git a/home/nipa/nipa_out/905732/ynl/old-code/netdev-user.h b/home/nipa/nipa_out/905732/ynl/new-code/netdev-user.h index 747b7745dd65..bc103e532cb3 100644 --- a/home/nipa/nipa_out/905732/ynl/old-code/netdev-user.h +++ b/home/nipa/nipa_out/905732/ynl/new-code/netdev-user.h @@ -406,6 +406,7 @@ struct netdev_napi_get_rsp { __u32 pid:1; __u32 defer_hard_irqs:1; __u32 gro_flush_timeout:1; + __u32 irq_suspend_timeout:1; } _present; __u32 id; @@ -414,6 +415,7 @@ struct netdev_napi_get_rsp { __u32 pid; __u32 defer_hard_irqs; __u64 gro_flush_timeout; + __u64 irq_suspend_timeout; }; void netdev_napi_get_rsp_free(struct netdev_napi_get_rsp *rsp); @@ -588,11 +590,13 @@ struct netdev_napi_set_req { __u32 id:1; __u32 defer_hard_irqs:1; __u32 gro_flush_timeout:1; + __u32 irq_suspend_timeout:1; } _present; __u32 id; __u32 defer_hard_irqs; __u64 gro_flush_timeout; + __u64 irq_suspend_timeout; }; static inline struct netdev_napi_set_req *netdev_napi_set_req_alloc(void) @@ -621,6 +625,13 @@ netdev_napi_set_req_set_gro_flush_timeout(struct netdev_napi_set_req *req, req->_present.gro_flush_timeout = 1; req->gro_flush_timeout = gro_flush_timeout; } +static inline void +netdev_napi_set_req_set_irq_suspend_timeout(struct netdev_napi_set_req *req, + __u64 irq_suspend_timeout) +{ + req->_present.irq_suspend_timeout = 1; + req->irq_suspend_timeout = irq_suspend_timeout; +} /* * Set configurable NAPI instance settings.