On 2025/1/21 2:24, Stephen Hemminger wrote: > On Mon, 20 Jan 2025 19:14:42 +0800 > "WanRenyong" <wa...@yunsilicon.com> wrote: > >> +int >> +xsc_dev_create_ipat(struct xsc_dev *xdev, uint16_t logic_in_port, uint16_t >> dst_info) >> +{ >> + struct xsc_np_ipat add; >> + >> + memset(&add, 0, sizeof(add)); >> + add.key.logical_in_port = logic_in_port; >> + add.action.dst_info = dst_info; >> + add.action.vld = 1; > You could use initializer here, and avoid a few steps: > > struct xsd_np_ipat add = { > .key.logical_in_port = logic_in_port, > .action = { > .dst_info = dst_info, > .vlid = 1, > }, > }; > > And several other places. > > This is purely a suggestion, either way is fine will accept it either way. Hello, Stephen Hemminger,
Thanks for your suggestion, I don't plan to address this issue. -- Best regards, WanRenyong