From: Stephen Hemminger <stephen@networkplumber.org>
To: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Cc: dev@dpdk.org, yskoh@mellanox.com, shahafs@mellanox.com
Subject: Re: [dpdk-dev] [PATCH 1/2] net/mlx5: cache the associated network device ifindex
Date: Fri, 19 Jul 2019 09:15:44 -0700 [thread overview]
Message-ID: <20190719091544.40294c43@hermes.lan> (raw)
In-Reply-To: <1563514305-27405-2-git-send-email-viacheslavo@mellanox.com>
On Fri, 19 Jul 2019 05:31:44 +0000
Viacheslav Ovsiienko <viacheslavo@mellanox.com> wrote:
> + /*
> + * Store associated network device interface index. This index
> + * is permanent throughout the lifetime of device. We do not spawn
> + * rte_eth_dev ports without associated network device, and if
> + * network device is being unbound we get the remove notification
> + * message and rte_eth_dev port is also detached. So, we may store
> + * the ifindex here and use the cached value further. The network
> + * device name can be changed dynamically and should not be cached.
> + */
> + assert(spawn->ifindex);
> + priv->if_index = spawn->ifindex;
This correct, but overkill.
1. The comment is way too wordy. Please stick to only a couple of lines.
If you feel more explanation is necessary put that in the commit log.
2. It is perfectly okay to return 0 as a value in dev_info.
Therefore the assert is unnecessary.
3. Where is "Reported-by:"
4. What was wrong with my simpler patch?
next prev parent reply other threads:[~2019-07-19 16:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-12 20:54 [dpdk-dev] [PATCH 0/2] fix dev_info_get in mlx secondary process Stephen Hemminger
2019-07-12 20:54 ` [dpdk-dev] [PATCH 1/2] net/mlx4: fix crash in dev_info_get in " Stephen Hemminger
2019-07-30 13:48 ` Matan Azrad
2019-08-04 6:57 ` Raslan Darawsheh
2019-08-05 7:42 ` Raslan Darawsheh
2019-07-12 20:54 ` [dpdk-dev] [PATCH 2/2] net/mlx5: " Stephen Hemminger
2019-07-15 7:41 ` Slava Ovsiienko
2019-07-19 5:31 ` [dpdk-dev] [PATCH 0/2] net/mlx5: cache the associated network device ifindex Viacheslav Ovsiienko
2019-07-19 5:31 ` [dpdk-dev] [PATCH 1/2] " Viacheslav Ovsiienko
2019-07-19 16:15 ` Stephen Hemminger [this message]
2019-07-19 16:41 ` Slava Ovsiienko
2019-07-19 18:03 ` Stephen Hemminger
2019-07-19 18:31 ` Slava Ovsiienko
2019-07-19 5:31 ` [dpdk-dev] [PATCH 2/2] Revert "net/mlx5: fix master device Netlink socket sharing" Viacheslav Ovsiienko
2019-07-19 16:16 ` Stephen Hemminger
2019-07-19 16:21 ` Slava Ovsiienko
2019-07-19 16:23 ` Stephen Hemminger
2019-07-21 14:56 ` [dpdk-dev] [PATCH v2 0/2] net/mlx5: cache the associated network device ifindex Viacheslav Ovsiienko
2019-07-21 14:56 ` [dpdk-dev] [PATCH v2 1/2] " Viacheslav Ovsiienko
2019-07-22 5:52 ` Yongseok Koh
2019-07-21 14:56 ` [dpdk-dev] [PATCH v2 2/2] Revert "net/mlx5: fix master device Netlink socket sharing" Viacheslav Ovsiienko
2019-07-22 5:53 ` Yongseok Koh
2019-07-22 8:43 ` [dpdk-dev] [PATCH v2 0/2] net/mlx5: cache the associated network device ifindex Raslan Darawsheh
2019-07-31 7:36 ` [dpdk-dev] [PATCH 2/2] net/mlx5: fix crash in dev_info_get in secondary process Raslan Darawsheh
2019-07-31 13:47 ` Stephen Hemminger
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=20190719091544.40294c43@hermes.lan \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=shahafs@mellanox.com \
--cc=viacheslavo@mellanox.com \
--cc=yskoh@mellanox.com \
/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;
as well as URLs for NNTP newsgroup(s).