On Fri, 19 Jul 2019 05:31:44 +0000
Viacheslav Ovsiienko <viachesl...@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?

Reply via email to