From: Nishank Trivedi <nistrive@cisco.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Neel Patel <neepatel@cisco.com>,
netdev@vger.kernel.org, Christian Benvenuti <benve@cisco.com>,
"Upinder Malhi (umalhi)" <umalhi@cisco.com>
Subject: Re: [PATCH 3/4] drivers/net: enic: Make ASIC information available to USNIC
Date: Mon, 12 Aug 2013 22:10:10 -0700 [thread overview]
Message-ID: <5209BFB2.2090003@cisco.com> (raw)
In-Reply-To: <1376151205.32005.2.camel@deadeye.wl.decadent.org.uk>
On 8/10/13 9:13 AM, Ben Hutchings wrote:
> On Fri, 2013-08-09 at 15:21 -0700, Stephen Hemminger wrote:
>> On Fri, 9 Aug 2013 11:12:20 -0700
>> Neel Patel <neepatel@cisco.com> wrote:
>>
>>> This patch provides asic information via ethtool.
> [...]
>>> --- a/drivers/net/ethernet/cisco/enic/enic_ethtool.c
>>> +++ b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
>>> @@ -19,6 +19,7 @@
>>> #include <linux/netdevice.h>
>>> #include <linux/ethtool.h>
>>>
>>> +#include "driver_utils.h"
>>> #include "enic_res.h"
>>> #include "enic.h"
>>> #include "enic_dev.h"
>>> @@ -116,6 +117,9 @@ static void enic_get_drvinfo(struct net_device *netdev,
>>> sizeof(drvinfo->fw_version));
>>> strlcpy(drvinfo->bus_info, pci_name(enic->pdev),
>>> sizeof(drvinfo->bus_info));
>>> + memset(drvinfo->reserved1, 0, sizeof(drvinfo->reserved1));
>>> + driver_encode_asic_info(drvinfo->reserved1, sizeof(drvinfo->reserved1),
>>> + fw_info->asic_type, fw_info->asic_rev);
>>> }
>>
>> If you want to use a reserved field, then make it a first class citizen.
>> Rename it to asic_info, make sure the result is okay for other drivers
>> and add send patch so Ben can make it part of normal ethtool support.
>>
>> Otherwise, this code is likely to break when someone else actually unreserves
>> that field.
>
> Right. I bet this is redundant with the IDs that lspci can show,
> anyway.
Thanks Stephen, Ben for your input, they are valid points. Neel would
send a new patch series minus 3/4 for now.
While you are right that lspci or sysfs can be used to get same info, we
were trying to use asic info (encoded with type and version) within
drvinfo so as to use one string to achieve same effect as reading PCI
subsystem id and revision explicitly. Instead of going to different tool
(lspci), ethtool would be enough to unqiuely identify the device. Asic
version along with already existing firmware version, driver version,
etc seems natural.
Thanks,
nishank
next prev parent reply other threads:[~2013-08-13 5:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 18:12 [PATCH 0/4] enic: This patchset adds support for Cisco Low Latency NIC Neel Patel
2013-08-09 18:12 ` [PATCH 1/4] drivers/net: enic: Adding " Neel Patel
2013-08-09 18:12 ` [PATCH 2/4] drivers/net: enic: Add an interface for USNIC to interact with firmware Neel Patel
2013-08-09 18:12 ` [PATCH 3/4] drivers/net: enic: Make ASIC information available to USNIC Neel Patel
2013-08-09 22:21 ` Stephen Hemminger
2013-08-10 16:13 ` Ben Hutchings
2013-08-13 5:10 ` Nishank Trivedi [this message]
2013-08-13 8:31 ` Ben Hutchings
2013-08-09 18:12 ` [PATCH 4/4] drivers/net: enic: Generate notification of hardware crash Neel Patel
-- strict thread matches above, loose matches on Subject: below --
2013-08-09 18:38 [PATCH 0/4] enic: This patchset adds support for Cisco Low Latency NIC Neel Patel
2013-08-09 18:38 ` [PATCH 3/4] drivers/net: enic: Make ASIC information available to USNIC Neel Patel
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=5209BFB2.2090003@cisco.com \
--to=nistrive@cisco.com \
--cc=benve@cisco.com \
--cc=bhutchings@solarflare.com \
--cc=neepatel@cisco.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=umalhi@cisco.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).