diff --git a/tmp/ynl_build-tmp.d8m5aA/old-code/psp-user.c b/tmp/ynl_build-tmp.d8m5aA/new-code/psp-user.c index 79b0ca9e122e..a0944150ec47 100644 --- a/tmp/ynl_build-tmp.d8m5aA/old-code/psp-user.c +++ b/tmp/ynl_build-tmp.d8m5aA/new-code/psp-user.c @@ -63,6 +63,8 @@ const struct ynl_policy_attr psp_dev_policy[PSP_A_DEV_MAX + 1] = { [PSP_A_DEV_IFINDEX] = { .name = "ifindex", .type = YNL_PT_U32, }, [PSP_A_DEV_PSP_VERSIONS_CAP] = { .name = "psp-versions-cap", .type = YNL_PT_U32, }, [PSP_A_DEV_PSP_VERSIONS_ENA] = { .name = "psp-versions-ena", .type = YNL_PT_U32, }, + [PSP_A_DEV_CRYPT_OFFSET] = { .name = "crypt-offset", .type = YNL_PT_U8, }, + [PSP_A_DEV_SPI_THRESHOLD] = { .name = "spi-threshold", .type = YNL_PT_U32, }, }; const struct ynl_policy_nest psp_dev_nest = { @@ -194,6 +196,16 @@ int psp_dev_get_rsp_parse(const struct nlmsghdr *nlh, return YNL_PARSE_CB_ERROR; dst->_present.psp_versions_ena = 1; dst->psp_versions_ena = ynl_attr_get_u32(attr); + } else if (type == PSP_A_DEV_CRYPT_OFFSET) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.crypt_offset = 1; + dst->crypt_offset = ynl_attr_get_u8(attr); + } else if (type == PSP_A_DEV_SPI_THRESHOLD) { + if (ynl_attr_validate(yarg, attr)) + return YNL_PARSE_CB_ERROR; + dst->_present.spi_threshold = 1; + dst->spi_threshold = ynl_attr_get_u32(attr); } } @@ -312,6 +324,10 @@ psp_dev_set(struct ynl_sock *ys, struct psp_dev_set_req *req) ynl_attr_put_u32(nlh, PSP_A_DEV_ID, req->id); if (req->_present.psp_versions_ena) ynl_attr_put_u32(nlh, PSP_A_DEV_PSP_VERSIONS_ENA, req->psp_versions_ena); + if (req->_present.crypt_offset) + ynl_attr_put_u8(nlh, PSP_A_DEV_CRYPT_OFFSET, req->crypt_offset); + if (req->_present.spi_threshold) + ynl_attr_put_u32(nlh, PSP_A_DEV_SPI_THRESHOLD, req->spi_threshold); rsp = calloc(1, sizeof(*rsp)); yrs.yarg.data = rsp; diff --git a/tmp/ynl_build-tmp.d8m5aA/old-code/psp-user.h b/tmp/ynl_build-tmp.d8m5aA/new-code/psp-user.h index ccece9d2536e..575064dc37bc 100644 --- a/tmp/ynl_build-tmp.d8m5aA/old-code/psp-user.h +++ b/tmp/ynl_build-tmp.d8m5aA/new-code/psp-user.h @@ -62,12 +62,16 @@ struct psp_dev_get_rsp { __u32 ifindex:1; __u32 psp_versions_cap:1; __u32 psp_versions_ena:1; + __u32 crypt_offset:1; + __u32 spi_threshold:1; } _present; __u32 id; __u32 ifindex; __u32 psp_versions_cap; __u32 psp_versions_ena; + __u8 crypt_offset; + __u32 spi_threshold; }; void psp_dev_get_rsp_free(struct psp_dev_get_rsp *rsp); @@ -105,10 +109,14 @@ struct psp_dev_set_req { struct { __u32 id:1; __u32 psp_versions_ena:1; + __u32 crypt_offset:1; + __u32 spi_threshold:1; } _present; __u32 id; __u32 psp_versions_ena; + __u8 crypt_offset; + __u32 spi_threshold; }; static inline struct psp_dev_set_req *psp_dev_set_req_alloc(void) @@ -130,6 +138,20 @@ psp_dev_set_req_set_psp_versions_ena(struct psp_dev_set_req *req, req->_present.psp_versions_ena = 1; req->psp_versions_ena = psp_versions_ena; } +static inline void +psp_dev_set_req_set_crypt_offset(struct psp_dev_set_req *req, + __u8 crypt_offset) +{ + req->_present.crypt_offset = 1; + req->crypt_offset = crypt_offset; +} +static inline void +psp_dev_set_req_set_spi_threshold(struct psp_dev_set_req *req, + __u32 spi_threshold) +{ + req->_present.spi_threshold = 1; + req->spi_threshold = spi_threshold; +} struct psp_dev_set_rsp { };