2013-10-12 06:56:02

by ethan zhao

[permalink] [raw]
Subject: Re: [PATCH] drivers/base/core.c: always output device renaming messages.

On Sat, Oct 12, 2013 at 1:26 AM, Skidmore, Donald C
<[email protected]> wrote:
>> -----Original Message-----
>> From: Greg KH [mailto:[email protected]]
>> Sent: Friday, October 11, 2013 9:12 AM
>> To: Bjorn Helgaas
>> Cc: ethan.zhao; [email protected]; Skidmore, Donald C; e1000-
>> [email protected]
>> Subject: Re: [PATCH] drivers/base/core.c: always output device renaming
>> messages.
>>
>> On Fri, Oct 11, 2013 at 10:08:09AM -0600, Bjorn Helgaas wrote:
>> > [+cc Don, e1000-devel]
>> >
>> > On Fri, Oct 11, 2013 at 9:35 AM, Greg KH <[email protected]>
>> wrote:
>> > > On Fri, Oct 11, 2013 at 10:58:18AM +0800, ethan.zhao wrote:
>> > >> From: "ethan.zhao" <[email protected]>
>> > >>
>> > >> While loading ixgbevf driver,every vf detected will be output as
>> > >> the same name 'eth4':
>> > >>
>> > >> ixgbevf: Intel(R) 10 Gigabit PCI Express Virtual Function Network
>> > >> Driver - version 2.8.7 Copyright (c) 2009-2012 Intel Corporation.
>> > >> ixgbevf 0000:20:10.0: enabling device (0000 -> 0002) ixgbe
>> > >> 0000:20:00.0 eth0: VF Reset msg received from vf 0 ixgbevf
>> > >> 0000:20:10.0: irq 199 for MSI/MSI-X ixgbevf 0000:20:10.0: irq 200
>> > >> for MSI/MSI-X
>> > >> ixgbevf: eth%d: ixgbevf_init_interrupt_scheme: Multiqueue
>> > >> Disabled: Rx Queue count = 1, Tx Queue count = 1
>> > >
>> > > What is that message? That's not good, "eth%d"?
>> >
>> > Just a reminder that ixgbevf 2.8.7 is not the driver version that's in
>> > the kernel tree, so it's easy to spend time on mainline issue that
>> > have been fixed in the out-of-tree versions, or vice versa.
>> >
>> > Per Don, the latest ixgbevf driver is here:
>> > https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/
>>
>> I hate to ask why isn't this merged upstream, but given that this is an Intel
>> network driver, I know the answer :(
>>
>> Thanks for pointing this out, saved me a trip through the kernel tree...
>>
>
> That message sure does look strange "eth%d"? From reading your email I'm implying that it came from a 2.8.7 out or tree driver, is that correct? The reason I'm asking is I want to make sure this is not an issue in the kernel tree or the latest out of tree driver.
Yes, it came from ixgbevf 2.8.7
>
> Also for what it is worth I do have all the patches queued in Jeff K. tree that gets the kernel tree and latest out of tree driver functionally in sync. Once they pass our internal validation he should be pushing them upstream.
>
> Thanks for pointing out the error,
> -Don Skidmore <[email protected]>
>
>


2013-10-12 07:11:05

by Joe Perches

[permalink] [raw]
Subject: [PATCH] ixgbevf: Fix the debugging output when device is not registered

A message can be output with an unidentified eth%d port
when the ixgbevf device is not registered.

ie: ixgbevf: eth%d: ixgbevf_init_interrupt_scheme: etc...

Fix this by using the generic netdev_name() helper
to emit "(unregistered net_device)" instead of "eth%d".

Neaten the format string that emits this too.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 59a62bb..1b48a55 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -2010,10 +2010,10 @@ static int ixgbevf_init_interrupt_scheme(struct ixgbevf_adapter *adapter)
goto err_alloc_queues;
}

- hw_dbg(&adapter->hw, "Multiqueue %s: Rx Queue count = %u, "
- "Tx Queue count = %u\n",
- (adapter->num_rx_queues > 1) ? "Enabled" :
- "Disabled", adapter->num_rx_queues, adapter->num_tx_queues);
+ hw_dbg(&adapter->hw,
+ "Multiqueue %s: Rx Queue count = %u, Tx Queue count = %u\n",
+ (adapter->num_rx_queues > 1) ? "Enabled" : "Disabled",
+ adapter->num_rx_queues, adapter->num_tx_queues);

set_bit(__IXGBEVF_DOWN, &adapter->state);

@@ -3645,7 +3645,7 @@ static void __exit ixgbevf_exit_module(void)
char *ixgbevf_get_hw_dev_name(struct ixgbe_hw *hw)
{
struct ixgbevf_adapter *adapter = hw->back;
- return adapter->netdev->name;
+ return netdev_name(adapter->netdev);
}

#endif