public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Salil Mehta <salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	"davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org"
	<davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: "Zhuangyuzeng (Yisen)"
	<yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	huangdaode <huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
	"lipeng (Y)" <lipeng321-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	"mehta.salil.lnk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<mehta.salil.lnk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linuxarm <linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH V4 net-next 7/8] net: hns3: Add Ethtool support to HNS3 driver
Date: Thu, 27 Jul 2017 11:04:53 -0700	[thread overview]
Message-ID: <0fa12c08-8d20-5bb2-5e56-c083c57922e2@gmail.com> (raw)
In-Reply-To: <F4CC6FACFEB3C54C9141D49AD221F7F93B8283E1-WFPaWmAhWqtUuCJht5byYAK1hpo4iccwjNknBlVQO8k@public.gmane.org>

On 07/27/2017 11:01 AM, Salil Mehta wrote:
> Hi Florian,
> 
>> -----Original Message-----
>> From: Florian Fainelli [mailto:f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
>> Sent: Sunday, July 23, 2017 6:05 PM
>> To: Salil Mehta; davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
>> Cc: Zhuangyuzeng (Yisen); huangdaode; lipeng (Y);
>> mehta.salil.lnk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-
>> kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Linuxarm
>> Subject: Re: [PATCH V4 net-next 7/8] net: hns3: Add Ethtool support to
>> HNS3 driver
>>
>>
>>
>> On 07/22/2017 03:09 PM, Salil Mehta wrote:
>>> This patch adds the support of the Ethtool interface to
>>> the HNS3 Ethernet driver. Various commands to read the
>>> statistics, configure the offloading, loopback selftest etc.
>>> are supported.
>>>
>>> Signed-off-by: Daode Huang <huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
>>> Signed-off-by: lipeng <lipeng321-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>> Signed-off-by: Salil Mehta <salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>> Signed-off-by: Yisen Zhuang <yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>> ---
>>> Patch V4: addressed below comments
>>>  1. Andrew Lunn
>>>     Removed the support of loop PHY back for now
>>> Patch V3: Address below comments
>>>  1. Stephen Hemminger
>>>     https://lkml.org/lkml/2017/6/13/974
>>>  2. Andrew Lunn
>>>     https://lkml.org/lkml/2017/6/13/1037
>>> Patch V2: No change
>>> Patch V1: Initial Submit
>>> ---
>>>  .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c  | 543
>> +++++++++++++++++++++
>>>  1 file changed, 543 insertions(+)
>>>  create mode 100644
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
>>>
>>> diff --git
>> a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
>> b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
>>> new file mode 100644
>>> index 000000000000..82b0d4d829f8
>>> --- /dev/null
>>> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
>>> @@ -0,0 +1,543 @@
>>> +/*
>>> + * Copyright (c) 2016~2017 Hisilicon Limited.
>>> + *
>>> + * This program is free software; you can redistribute it and/or
>> modify
>>> + * it under the terms of the GNU General Public License as published
>> by
>>> + * the Free Software Foundation; either version 2 of the License, or
>>> + * (at your option) any later version.
>>> + */
>>> +
>>> +#include <linux/etherdevice.h>
>>> +#include "hns3_enet.h"
>>> +
>>> +struct hns3_stats {
>>> +	char stats_string[ETH_GSTRING_LEN];
>>> +	int stats_size;
>>> +	int stats_offset;
>>> +};
>>> +
>>> +/* netdev related stats */
>>> +#define HNS3_NETDEV_STAT(_string, _member)			\
>>> +	{ _string,						\
>>> +	  FIELD_SIZEOF(struct rtnl_link_stats64, _member),	\
>>> +	  offsetof(struct rtnl_link_stats64, _member),		\
>>> +	}
>>
>> Can you make this macro use named initializers?
> Can you please explain bit more or point out some
> example. This would be very handy. 

	.stat_string = _string,
	.stats_size = FIELD_SIZEOF(struct rtnl_link_stat64, _member),
	.stats_offset = offsetof(struct rtnl_link_stats64, _member),

https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-07-27 18:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-22 22:09 [PATCH V4 net-next 0/8] Hisilicon Network Subsystem 3 Ethernet Driver Salil Mehta
     [not found] ` <20170722220942.78852-1-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-07-22 22:09   ` [PATCH V4 net-next 1/8] net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC Salil Mehta
2017-07-23 17:24     ` Florian Fainelli
2017-07-27 20:44       ` Salil Mehta
2017-08-02 16:38       ` Salil Mehta
2017-07-22 22:09 ` [PATCH V4 net-next 2/8] net: hns3: Add support of the HNAE3 framework Salil Mehta
     [not found]   ` <20170722220942.78852-3-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-07-23 13:15     ` Leon Romanovsky
     [not found]       ` <20170723131530.GJ3259-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-27 23:44         ` Salil Mehta
2017-07-28  4:41           ` Leon Romanovsky
2017-07-28 11:52             ` Salil Mehta
2017-07-22 22:09 ` [PATCH V4 net-next 3/8] net: hns3: Add HNS3 IMP(Integrated Mgmt Proc) Cmd Interface Support Salil Mehta
2017-07-22 22:09 ` [PATCH V4 net-next 4/8] net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support Salil Mehta
2017-07-22 22:09 ` [PATCH V4 net-next 5/8] net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver Salil Mehta
     [not found]   ` <20170722220942.78852-6-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-07-23  6:16     ` Richard Cochran
2017-07-23  9:31       ` Salil Mehta
2017-07-22 22:09 ` [PATCH V4 net-next 6/8] net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC Salil Mehta
     [not found]   ` <20170722220942.78852-7-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-07-23 16:53     ` Florian Fainelli
2017-07-27 17:56       ` Salil Mehta
2017-07-22 22:09 ` [PATCH V4 net-next 7/8] net: hns3: Add Ethtool support to HNS3 driver Salil Mehta
2017-07-23 17:05   ` Florian Fainelli
2017-07-24 20:32     ` Rustad, Mark D
2017-07-25  9:35       ` David Laight
     [not found]     ` <23ddbe00-8bef-a09b-5783-3a5438086bd6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-27 18:01       ` Salil Mehta
     [not found]         ` <F4CC6FACFEB3C54C9141D49AD221F7F93B8283E1-WFPaWmAhWqtUuCJht5byYAK1hpo4iccwjNknBlVQO8k@public.gmane.org>
2017-07-27 18:04           ` Florian Fainelli [this message]
     [not found]             ` <0fa12c08-8d20-5bb2-5e56-c083c57922e2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-27 20:46               ` Salil Mehta
2017-07-23 17:26   ` Stephen Hemminger
2017-07-27 15:53     ` Salil Mehta
2017-07-22 22:09 ` [PATCH V4 net-next 8/8] net: hns3: Add HNS3 driver to kernel build framework & MAINTAINERS Salil Mehta
     [not found]   ` <20170722220942.78852-9-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-07-23 13:12     ` Leon Romanovsky
2017-07-27 15:56       ` Salil Mehta

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=0fa12c08-8d20-5bb2-5e56-c083c57922e2@gmail.com \
    --to=f.fainelli-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=lipeng321-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=mehta.salil.lnk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    /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