public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Daniel Machon <daniel.machon@microchip.com>
Cc: netdev@vger.kernel.org, stephen@networkplumber.org, dsahern@gmail.com
Subject: Re: [patch iproute2-next 2/4] devlink: introduce support for netns id for nested handle
Date: Mon, 18 Sep 2023 14:29:38 +0200	[thread overview]
Message-ID: <ZQhCssHQIYEIn4Wn@nanopsycho> (raw)
In-Reply-To: <20230918113448.c6qypl3xsppv4usz@DEN-LT-70577>

Mon, Sep 18, 2023 at 01:34:48PM CEST, daniel.machon@microchip.com wrote:
>> +static int nesns_name_by_id_func(char *nsname, void *arg)
>
>Hi Jiri,
>nesns -> netns?
>
>> +{
>> +       struct netns_name_by_id_ctx *ctx = arg;
>> +       int32_t ret;
>> +
>> +       ret = netns_id_by_name(nsname);
>> +       if (ret < 0 || ret != ctx->id)
>> +               return 0;
>> +       ctx->name = strdup(nsname);
>> +       return 1;
>> +}
>> +
>> +static char *netns_name_by_id(int32_t id)
>> +{
>> +       struct netns_name_by_id_ctx ctx = {
>> +               .id = id,
>> +       };
>> +
>> +       netns_foreach(nesns_name_by_id_func, &ctx);
>
>.. and here

Okay, will fix this typo. Thx.


>
>> +       return ctx.name;
>> +}
>> +
>
>/Daniel

  reply	other threads:[~2023-09-18 12:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 10:54 [patch iproute2-next 0/4] expose devlink instances relationships Jiri Pirko
2023-09-18 10:54 ` [patch iproute2-next 1/4] devlink: update headers Jiri Pirko
2023-09-18 10:54 ` [patch iproute2-next 2/4] devlink: introduce support for netns id for nested handle Jiri Pirko
2023-09-18 11:34   ` Daniel Machon
2023-09-18 12:29     ` Jiri Pirko [this message]
2023-09-19  3:06   ` David Ahern
2023-09-19  7:05     ` Jiri Pirko
2023-09-19 11:57       ` Jiri Pirko
2023-09-18 10:54 ` [patch iproute2-next 3/4] devlink: print nested handle for port function Jiri Pirko
2023-09-18 10:54 ` [patch iproute2-next 4/4] devlink: print nested devlink handle for devlink dev Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZQhCssHQIYEIn4Wn@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=daniel.machon@microchip.com \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox