From: Petr Machata <me@pmachata.org>
To: Roman Mashak <mrv@mojatatu.com>
Cc: netdev@vger.kernel.org, dsahern@gmail.com,
stephen@networkplumber.org, john.fastabend@gmail.com,
jiri@nvidia.com, idosch@nvidia.com
Subject: Re: [PATCH iproute2-next 11/15] lib: Extract from iplink_vlan a helper to parse key:value arrays
Date: Tue, 20 Oct 2020 22:44:31 +0200 [thread overview]
Message-ID: <875z74k4pc.fsf@nvidia.com> (raw)
In-Reply-To: <851rht9loc.fsf@mojatatu.com>
Roman Mashak <mrv@mojatatu.com> writes:
> Petr Machata <me@pmachata.org> writes:
>
>
> [...]
>
>> +static int parse_qos_mapping(__u32 key, char *value, void *data)
>> +{
>> + struct nlmsghdr *n = data;
>> + struct ifla_vlan_qos_mapping m = {
>> + .from = key,
>> + };
>> +
>> + if (get_u32(&m.to, value, 0))
>> + return 1;
>> +
>> + addattr_l(n, 1024, IFLA_VLAN_QOS_MAPPING, &m, sizeof(m));
>> + return 0;
>> +}
>
> addatr_l() may fail if netlink buffer size is not sufficient, may be:
>
> return addattr_l(...);
>
> would be better.
Ack, makes sense to fix this since I'm moving the code around anyway.
next prev parent reply other threads:[~2020-10-20 20:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 0:58 [PATCH iproute2-next 00/15] Add a tool for configuration of DCB Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 01/15] Unify batch processing across tools Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 02/15] lib: Add parse_one_of(), parse_on_off() Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 03/15] bridge: link: Port over to parse_on_off() Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 04/15] lib: Add parse_flag_on_off(), set_flag() Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 05/15] ip: iplink: Convert to use parse_on_off(), parse_flag_on_off() Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 06/15] ip: iplink_vlan: Port over to parse_flag_on_off() Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 07/15] ip: iplink_bridge_slave: Port over to parse_on_off() Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 08/15] lib: Extract from devlink/mnlg a helper, mnlu_socket_open() Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 09/15] lib: Extract from devlink/mnlg a helper, mnlu_msg_prepare() Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 10/15] lib: Extract from devlink/mnlg a helper, mnlu_socket_recv_run() Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 11/15] lib: Extract from iplink_vlan a helper to parse key:value arrays Petr Machata
2020-10-20 11:33 ` Roman Mashak
2020-10-20 20:44 ` Petr Machata [this message]
2020-10-20 0:58 ` [PATCH iproute2-next 12/15] lib: parse_mapping: Update argc, argv on error Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 13/15] lib: parse_mapping: Recognize a keyword "all" Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 14/15] Add skeleton of a new tool, dcb Petr Machata
2020-10-20 0:58 ` [PATCH iproute2-next 15/15] dcb: Add a subtool for the DCB ETS object Petr Machata
2020-10-20 18:41 ` Jakub Kicinski
2020-10-20 20:43 ` Petr Machata
2020-10-21 18:28 ` Stephen Hemminger
2020-10-21 23:48 ` Petr Machata
2020-10-22 0:11 ` Stephen Hemminger
2020-10-22 7:16 ` Petr Machata
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=875z74k4pc.fsf@nvidia.com \
--to=me@pmachata.org \
--cc=dsahern@gmail.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=john.fastabend@gmail.com \
--cc=mrv@mojatatu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.