struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink_rate *devlink_rate;
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err = 0;
enum devlink_command cmd = DEVLINK_CMD_RATE_NEW;
u32 id = NETLINK_CB(cb->skb).portid;
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}
{
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err;
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
devlink_put(devlink);
continue;
struct devlink *devlink;
struct devlink_port *devlink_port;
unsigned long index, port_index;
- int start = state->idx;
int idx = 0;
int err;
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
devl_lock(devlink);
xa_for_each(&devlink->ports, port_index, devlink_port) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink_linecard *linecard;
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err;
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
mutex_lock(&devlink->linecards_lock);
list_for_each_entry(linecard, &devlink->linecard_list, list) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink *devlink;
struct devlink_sb *devlink_sb;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err;
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
devl_lock(devlink);
list_for_each_entry(devlink_sb, &devlink->sb_list, list) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink *devlink;
struct devlink_sb *devlink_sb;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err = 0;
devl_lock(devlink);
list_for_each_entry(devlink_sb, &devlink->sb_list, list) {
- err = __sb_pool_get_dumpit(msg, start, &idx, devlink,
- devlink_sb,
+ err = __sb_pool_get_dumpit(msg, state->idx, &idx,
+ devlink, devlink_sb,
NETLINK_CB(cb->skb).portid,
cb->nlh->nlmsg_seq);
if (err == -EOPNOTSUPP) {
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink *devlink;
struct devlink_sb *devlink_sb;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err = 0;
devl_lock(devlink);
list_for_each_entry(devlink_sb, &devlink->sb_list, list) {
- err = __sb_port_pool_get_dumpit(msg, start, &idx,
+ err = __sb_port_pool_get_dumpit(msg, state->idx, &idx,
devlink, devlink_sb,
NETLINK_CB(cb->skb).portid,
cb->nlh->nlmsg_seq);
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink *devlink;
struct devlink_sb *devlink_sb;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err = 0;
devl_lock(devlink);
list_for_each_entry(devlink_sb, &devlink->sb_list, list) {
- err = __sb_tc_pool_bind_get_dumpit(msg, start, &idx,
- devlink,
- devlink_sb,
+ err = __sb_tc_pool_bind_get_dumpit(msg, state->idx, &idx,
+ devlink, devlink_sb,
NETLINK_CB(cb->skb).portid,
cb->nlh->nlmsg_seq);
if (err == -EOPNOTSUPP) {
{
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err = 0;
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
- if (idx < start || !devlink->ops->selftest_check)
+ if (idx < state->idx || !devlink->ops->selftest_check)
goto inc;
devl_lock(devlink);
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink_param_item *param_item;
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err = 0;
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
devl_lock(devlink);
list_for_each_entry(param_item, &devlink->param_list, list) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}
{
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err = 0;
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
err = devlink_nl_cmd_region_get_devlink_dumpit(msg, cb, devlink,
- &idx, start);
+ &idx, state->idx);
devlink_put(devlink);
if (err)
goto out;
{
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err = 0;
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
- if (idx < start)
+ if (idx < state->idx)
goto inc;
devl_lock(devlink);
unsigned long index, port_index;
struct devlink_port *port;
struct devlink *devlink;
- int start = state->idx;
int idx = 0;
int err;
mutex_lock(&devlink->reporters_lock);
list_for_each_entry(reporter, &devlink->reporter_list,
list) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}
xa_for_each(&devlink->ports, port_index, port) {
mutex_lock(&port->reporters_lock);
list_for_each_entry(reporter, &port->reporter_list, list) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}
struct devlink_nl_dump_state *state = devlink_dump_state(cb);
struct devlink_trap_item *trap_item;
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err;
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
devl_lock(devlink);
list_for_each_entry(trap_item, &devlink->trap_list, list) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}
struct devlink_trap_group_item *group_item;
u32 portid = NETLINK_CB(cb->skb).portid;
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err;
devl_lock(devlink);
list_for_each_entry(group_item, &devlink->trap_group_list,
list) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}
struct devlink_trap_policer_item *policer_item;
u32 portid = NETLINK_CB(cb->skb).portid;
struct devlink *devlink;
- int start = state->idx;
unsigned long index;
int idx = 0;
int err;
devl_lock(devlink);
list_for_each_entry(policer_item, &devlink->trap_policer_list,
list) {
- if (idx < start) {
+ if (idx < state->idx) {
idx++;
continue;
}