Skip to content

ynl-gen-cpp: add support for generating rt-addr #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generated/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TOOL:=../ynl-gen-cpp.py
GENS_PATHS=$(shell grep -nrI --files-without-match \
'protocol: netlink' ../Documentation/netlink/specs/)
GENS_ALL=$(patsubst ../Documentation/netlink/specs/%.yaml,%,${GENS_PATHS})
GENS=$(filter-out devlink ovs_datapath ovs_flow ovs_vport nlctrl,${GENS_ALL})
GENS=rt-addr $(filter-out devlink ovs_datapath ovs_flow ovs_vport nlctrl,${GENS_ALL})
SRCS=$(patsubst %,%-user.cpp,${GENS})
HDRS=$(patsubst %,%-user.hpp,${GENS})
OBJS=$(patsubst %,%-user.cpp.o,${GENS})
Expand Down
16 changes: 8 additions & 8 deletions generated/dpll-user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ int dpll_device_id_get_rsp_parse(const struct nlmsghdr *nlh,
}

std::unique_ptr<dpll_device_id_get_rsp>
dpll_device_id_get(ynl_cpp::ynl_socket& ys, dpll_device_id_get_req& req)
dpll_device_id_get(ynl_cpp::ynl_socket& ys, dpll_device_id_get_req& req)
{
struct ynl_req_state yrs = { .yarg = { .ys = ys, }, };
std::unique_ptr<dpll_device_id_get_rsp> rsp;
Expand Down Expand Up @@ -646,7 +646,7 @@ int dpll_device_get_rsp_parse(const struct nlmsghdr *nlh,
}

std::unique_ptr<dpll_device_get_rsp>
dpll_device_get(ynl_cpp::ynl_socket& ys, dpll_device_get_req& req)
dpll_device_get(ynl_cpp::ynl_socket& ys, dpll_device_get_req& req)
{
struct ynl_req_state yrs = { .yarg = { .ys = ys, }, };
std::unique_ptr<dpll_device_get_rsp> rsp;
Expand Down Expand Up @@ -674,7 +674,7 @@ dpll_device_get(ynl_cpp::ynl_socket& ys, dpll_device_get_req& req)

/* DPLL_CMD_DEVICE_GET - dump */
std::unique_ptr<dpll_device_get_list>
dpll_device_get_dump(ynl_cpp::ynl_socket& ys)
dpll_device_get_dump(ynl_cpp::ynl_socket& ys)
{
struct ynl_dump_no_alloc_state yds = {};
struct nlmsghdr *nlh;
Expand All @@ -700,7 +700,7 @@ dpll_device_get_dump(ynl_cpp::ynl_socket& ys)
/* DPLL_CMD_DEVICE_GET - notify */
/* ============== DPLL_CMD_DEVICE_SET ============== */
/* DPLL_CMD_DEVICE_SET - do */
int dpll_device_set(ynl_cpp::ynl_socket& ys, dpll_device_set_req& req)
int dpll_device_set(ynl_cpp::ynl_socket& ys, dpll_device_set_req& req)
{
struct ynl_req_state yrs = { .yarg = { .ys = ys, }, };
struct nlmsghdr *nlh;
Expand Down Expand Up @@ -745,7 +745,7 @@ int dpll_pin_id_get_rsp_parse(const struct nlmsghdr *nlh,
}

std::unique_ptr<dpll_pin_id_get_rsp>
dpll_pin_id_get(ynl_cpp::ynl_socket& ys, dpll_pin_id_get_req& req)
dpll_pin_id_get(ynl_cpp::ynl_socket& ys, dpll_pin_id_get_req& req)
{
struct ynl_req_state yrs = { .yarg = { .ys = ys, }, };
std::unique_ptr<dpll_pin_id_get_rsp> rsp;
Expand Down Expand Up @@ -948,7 +948,7 @@ int dpll_pin_get_rsp_parse(const struct nlmsghdr *nlh,
}

std::unique_ptr<dpll_pin_get_rsp>
dpll_pin_get(ynl_cpp::ynl_socket& ys, dpll_pin_get_req& req)
dpll_pin_get(ynl_cpp::ynl_socket& ys, dpll_pin_get_req& req)
{
struct ynl_req_state yrs = { .yarg = { .ys = ys, }, };
std::unique_ptr<dpll_pin_get_rsp> rsp;
Expand Down Expand Up @@ -976,7 +976,7 @@ dpll_pin_get(ynl_cpp::ynl_socket& ys, dpll_pin_get_req& req)

/* DPLL_CMD_PIN_GET - dump */
std::unique_ptr<dpll_pin_get_list>
dpll_pin_get_dump(ynl_cpp::ynl_socket& ys, dpll_pin_get_req_dump& req)
dpll_pin_get_dump(ynl_cpp::ynl_socket& ys, dpll_pin_get_req_dump& req)
{
struct ynl_dump_no_alloc_state yds = {};
struct nlmsghdr *nlh;
Expand Down Expand Up @@ -1006,7 +1006,7 @@ dpll_pin_get_dump(ynl_cpp::ynl_socket& ys, dpll_pin_get_req_dump& req)
/* DPLL_CMD_PIN_GET - notify */
/* ============== DPLL_CMD_PIN_SET ============== */
/* DPLL_CMD_PIN_SET - do */
int dpll_pin_set(ynl_cpp::ynl_socket& ys, dpll_pin_set_req& req)
int dpll_pin_set(ynl_cpp::ynl_socket& ys, dpll_pin_set_req& req)
{
struct ynl_req_state yrs = { .yarg = { .ys = ys, }, };
struct nlmsghdr *nlh;
Expand Down
16 changes: 8 additions & 8 deletions generated/dpll-user.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct dpll_device_id_get_rsp {

*/
std::unique_ptr<dpll_device_id_get_rsp>
dpll_device_id_get(ynl_cpp::ynl_socket& ys, dpll_device_id_get_req& req);
dpll_device_id_get(ynl_cpp::ynl_socket& ys, dpll_device_id_get_req& req);

/* ============== DPLL_CMD_DEVICE_GET ============== */
/* DPLL_CMD_DEVICE_GET - do */
Expand All @@ -104,15 +104,15 @@ struct dpll_device_get_rsp {

*/
std::unique_ptr<dpll_device_get_rsp>
dpll_device_get(ynl_cpp::ynl_socket& ys, dpll_device_get_req& req);
dpll_device_get(ynl_cpp::ynl_socket& ys, dpll_device_get_req& req);

/* DPLL_CMD_DEVICE_GET - dump */
struct dpll_device_get_list {
std::list<dpll_device_get_rsp> objs;
};

std::unique_ptr<dpll_device_get_list>
dpll_device_get_dump(ynl_cpp::ynl_socket& ys);
dpll_device_get_dump(ynl_cpp::ynl_socket& ys);

/* DPLL_CMD_DEVICE_GET - notify */
struct dpll_device_get_ntf {
Expand All @@ -128,7 +128,7 @@ struct dpll_device_set_req {
/*
* Set attributes for a DPLL device
*/
int dpll_device_set(ynl_cpp::ynl_socket& ys, dpll_device_set_req& req);
int dpll_device_set(ynl_cpp::ynl_socket& ys, dpll_device_set_req& req);

/* ============== DPLL_CMD_PIN_ID_GET ============== */
/* DPLL_CMD_PIN_ID_GET - do */
Expand All @@ -150,7 +150,7 @@ struct dpll_pin_id_get_rsp {

*/
std::unique_ptr<dpll_pin_id_get_rsp>
dpll_pin_id_get(ynl_cpp::ynl_socket& ys, dpll_pin_id_get_req& req);
dpll_pin_id_get(ynl_cpp::ynl_socket& ys, dpll_pin_id_get_req& req);

/* ============== DPLL_CMD_PIN_GET ============== */
/* DPLL_CMD_PIN_GET - do */
Expand Down Expand Up @@ -190,7 +190,7 @@ struct dpll_pin_get_rsp {

*/
std::unique_ptr<dpll_pin_get_rsp>
dpll_pin_get(ynl_cpp::ynl_socket& ys, dpll_pin_get_req& req);
dpll_pin_get(ynl_cpp::ynl_socket& ys, dpll_pin_get_req& req);

/* DPLL_CMD_PIN_GET - dump */
struct dpll_pin_get_req_dump {
Expand All @@ -202,7 +202,7 @@ struct dpll_pin_get_list {
};

std::unique_ptr<dpll_pin_get_list>
dpll_pin_get_dump(ynl_cpp::ynl_socket& ys, dpll_pin_get_req_dump& req);
dpll_pin_get_dump(ynl_cpp::ynl_socket& ys, dpll_pin_get_req_dump& req);

/* DPLL_CMD_PIN_GET - notify */
struct dpll_pin_get_ntf {
Expand All @@ -226,7 +226,7 @@ struct dpll_pin_set_req {
/*
* Set attributes of a target pin
*/
int dpll_pin_set(ynl_cpp::ynl_socket& ys, dpll_pin_set_req& req);
int dpll_pin_set(ynl_cpp::ynl_socket& ys, dpll_pin_set_req& req);

} //namespace ynl_cpp
#endif /* _LINUX_DPLL_GEN_H */
Loading