David Miller <da...@davemloft.net> writes:

From: Saeed Mahameed <sa...@kernel.org>
Date: Thu, 17 Sep 2020 12:38:28 -0700

allocated but unregistered netdevices also do not help much as the name
of the netdev is not assigned yet.

why don't use dev_info(pci_dev) macors for low level functions when
netdev is not available or not allocated yet.

The problem in this case is that they have this huge suite of
functions that operate on a specific ena sub-object. Most of the time the associated netdev is fully realized, but in the few calls made
during early probe it is not.

To me it is a serious loss that just because a small number of times the interface lacks a fully realized netdev object, we can't use the
netdev_*() routines.

Most users aren't going to understand that an error message for PCI
device XyZ means eth0 is having problems.

I agree that netdev_* functions would be more useful, which is why we're working on a patch to transform ena_com functions to use them as well. For the time being, switching to dev_* functions makes the driver's logs more informative than pr_* functions.

I would rather not divide ena_com functions to use netdev_* and dev_* according to net_device allocative state just for this patch. Doing so, besides doing quite some work for a temporary solution, wouldn't provide a full solution (same as it doesn't in this patch). As stated, a more complete solution is in the works. We can look at the glass as being half full, and decide that this patch improves the previous situation even if not in the most optimal solution.

thanks,
Shay

Reply via email to