[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7554b924-3c09-596a-af11-f3d309bd2d19@intel.com>
Date: Mon, 31 Jul 2023 16:01:01 -0700
From: "Nambiar, Amritha" <amritha.nambiar@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <davem@...emloft.net>,
<sridhar.samudrala@...el.com>
Subject: Re: [net-next PATCH v1 5/9] netdev-genl: Add netlink framework
functions for napi
On 7/31/2023 12:37 PM, Jakub Kicinski wrote:
> On Fri, 28 Jul 2023 17:47:17 -0700 Amritha Nambiar wrote:
>> int netdev_nl_napi_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
>> {
>> - return -EOPNOTSUPP;
>> + struct netdev_nl_dump_ctx *ctx = netdev_dump_ctx(cb);
>> + struct net *net = sock_net(skb->sk);
>> + struct net_device *netdev;
>> + int idx = 0, s_idx, n_idx;
>> + int h, s_h;
>> + int err;
>> +
>> + s_h = ctx->dev_entry_hash;
>> + s_idx = ctx->dev_entry_idx;
>> + n_idx = ctx->napi_idx;
>> +
>> + rtnl_lock();
>> +
>> + for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {
>> + struct hlist_head *head;
>> +
>> + idx = 0;
>> + head = &net->dev_index_head[h];
>> + hlist_for_each_entry(netdev, head, index_hlist) {
>
> Please rebased on latest net-next you can ditch all this iteration
> stuff and use the new xarray.
Sure, will fix in the next version.
Powered by blists - more mailing lists