From: mehta.salil.lnk@gmail.com (Salil Mehta)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS
Date: Mon, 23 Nov 2015 12:05:06 +0000 [thread overview]
Message-ID: <565300F2.7030308@gmail.com> (raw)
In-Reply-To: <564F2915.1090507@cogentembedded.com>
On 20/11/15 14:07, Sergei Shtylyov wrote:
> On 11/19/2015 11:58 PM, Salil Mehta wrote:
>
>> From: Salil <salil.mehta@huawei.com>
>>
>> This patch adds the support of ethtool TSO option to V1 patch,
>> meant to add support of Hip06 SoC to HNS
>>
>> Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
>> Signed-off-by: lisheng <lisheng011@huawei.com>
>> ---
>> drivers/net/ethernet/hisilicon/hns/hns_enet.c | 47
>> +++++++++++++++++++++++++
>> 1 file changed, 47 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
>> b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
>> index 055e14c..a0763ab 100644
>> --- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
>> +++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
>> @@ -1386,6 +1386,51 @@ static int hns_nic_change_mtu(struct
>> net_device *ndev, int new_mtu)
>> return ret;
>> }
>>
>> +static int hns_nic_set_features(struct net_device *netdev,
>> + netdev_features_t features)
>> +{
>> + struct hns_nic_priv *priv = netdev_priv(netdev);
>> + struct hnae_handle *h = priv->ae_handle;
>> +
>> + switch (priv->enet_ver) {
>> + case AE_VERSION_1:
>> + if ((features & NETIF_F_TSO) || (features & NETIF_F_TSO6))
>
> if ((features & (NETIF_F_TSO| NETIF_F_TSO6))
Thanks. changed in V4 PATCH.
>
>> + netdev_info(netdev, "enet v1 do not support tso!\n");
>> + break;
>
> The *break* should have the same indentation level as *if*.
Thanks for pointing out. changed in V4 PATCH.
>
>> + default:
>> + if ((features & NETIF_F_TSO) || (features & NETIF_F_TSO6)) {
>
> if ((features & (NETIF_F_TSO| NETIF_F_TSO6))
>
>> + priv->ops.fill_desc = fill_tso_desc;
>> + priv->ops.maybe_stop_tx = hns_nic_maybe_stop_tso;
>> + /* The chip only support 7*4096 */
>> + netif_set_gso_max_size(netdev, 7 * 4096);
>> + h->dev->ops->set_tso_stats(h, 1);
>> + } else {
>> + priv->ops.fill_desc = fill_v2_desc;
>> + priv->ops.maybe_stop_tx = hns_nic_maybe_stop_tx;
>> + h->dev->ops->set_tso_stats(h, 0);
>> + }
>> + break;
>
> Same here.
Thanks for pointing out. changed in V4 PATCH.
>
>> + }
>> + netdev->features = features;
>> + return 0;
>> +}
>> +
>> +static netdev_features_t hns_nic_fix_features(
>> + struct net_device *netdev, netdev_features_t features)
>> +{
>> + struct hns_nic_priv *priv = netdev_priv(netdev);
>> +
>> + switch (priv->enet_ver) {
>> + case AE_VERSION_1:
>> + features &= ~(NETIF_F_TSO | NETIF_F_TSO6 |
>> + NETIF_F_HW_VLAN_CTAG_FILTER);
>> + break;
>> + default:
>> + break;
>> + }
>
> Here it's indented correctly.
Got it, thanks!
>
>> + return features;
>> +}
>> +
>> /**
>> * nic_set_multicast_list - set mutl mac address
>> * @netdev: net device
> [...]
>
> MBR, Sergei
>
WARNING: multiple messages have this Message-ID (diff)
From: Salil Mehta <mehta.salil.lnk@gmail.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Salil Mehta <salil.mehta@huawei.com>,
davem@davemloft.net, robh+dt@kernel.org, pawel.moll@arm.com,
mark.rutland@arm.com, paul.gortmaker@windriver.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
catalin.marinas@arm.com, will.deacon@arm.com, arnd@arndb.de,
liguozhu@hisilicon.com, yisen.zhuang@huawei.com,
dingtianhong@huawei.com, zhangfei.gao@linaro.org,
huangdaode@hisilicon.com, kenneth-lee-2012@foxmail.com,
xuwei5@hisilicon.com, lisheng011@huawei.com,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
linuxarm@huawei.com
Subject: Re: [PATCH V3 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS
Date: Mon, 23 Nov 2015 12:05:06 +0000 [thread overview]
Message-ID: <565300F2.7030308@gmail.com> (raw)
In-Reply-To: <564F2915.1090507@cogentembedded.com>
On 20/11/15 14:07, Sergei Shtylyov wrote:
> On 11/19/2015 11:58 PM, Salil Mehta wrote:
>
>> From: Salil <salil.mehta@huawei.com>
>>
>> This patch adds the support of ethtool TSO option to V1 patch,
>> meant to add support of Hip06 SoC to HNS
>>
>> Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
>> Signed-off-by: lisheng <lisheng011@huawei.com>
>> ---
>> drivers/net/ethernet/hisilicon/hns/hns_enet.c | 47
>> +++++++++++++++++++++++++
>> 1 file changed, 47 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
>> b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
>> index 055e14c..a0763ab 100644
>> --- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
>> +++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
>> @@ -1386,6 +1386,51 @@ static int hns_nic_change_mtu(struct
>> net_device *ndev, int new_mtu)
>> return ret;
>> }
>>
>> +static int hns_nic_set_features(struct net_device *netdev,
>> + netdev_features_t features)
>> +{
>> + struct hns_nic_priv *priv = netdev_priv(netdev);
>> + struct hnae_handle *h = priv->ae_handle;
>> +
>> + switch (priv->enet_ver) {
>> + case AE_VERSION_1:
>> + if ((features & NETIF_F_TSO) || (features & NETIF_F_TSO6))
>
> if ((features & (NETIF_F_TSO| NETIF_F_TSO6))
Thanks. changed in V4 PATCH.
>
>> + netdev_info(netdev, "enet v1 do not support tso!\n");
>> + break;
>
> The *break* should have the same indentation level as *if*.
Thanks for pointing out. changed in V4 PATCH.
>
>> + default:
>> + if ((features & NETIF_F_TSO) || (features & NETIF_F_TSO6)) {
>
> if ((features & (NETIF_F_TSO| NETIF_F_TSO6))
>
>> + priv->ops.fill_desc = fill_tso_desc;
>> + priv->ops.maybe_stop_tx = hns_nic_maybe_stop_tso;
>> + /* The chip only support 7*4096 */
>> + netif_set_gso_max_size(netdev, 7 * 4096);
>> + h->dev->ops->set_tso_stats(h, 1);
>> + } else {
>> + priv->ops.fill_desc = fill_v2_desc;
>> + priv->ops.maybe_stop_tx = hns_nic_maybe_stop_tx;
>> + h->dev->ops->set_tso_stats(h, 0);
>> + }
>> + break;
>
> Same here.
Thanks for pointing out. changed in V4 PATCH.
>
>> + }
>> + netdev->features = features;
>> + return 0;
>> +}
>> +
>> +static netdev_features_t hns_nic_fix_features(
>> + struct net_device *netdev, netdev_features_t features)
>> +{
>> + struct hns_nic_priv *priv = netdev_priv(netdev);
>> +
>> + switch (priv->enet_ver) {
>> + case AE_VERSION_1:
>> + features &= ~(NETIF_F_TSO | NETIF_F_TSO6 |
>> + NETIF_F_HW_VLAN_CTAG_FILTER);
>> + break;
>> + default:
>> + break;
>> + }
>
> Here it's indented correctly.
Got it, thanks!
>
>> + return features;
>> +}
>> +
>> /**
>> * nic_set_multicast_list - set mutl mac address
>> * @netdev: net device
> [...]
>
> MBR, Sergei
>
next prev parent reply other threads:[~2015-11-23 12:05 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 20:58 [PATCH V3 net-next 0/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-19 20:58 ` [PATCH V3 net-next 1/5] " Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-22 9:19 ` Yuval Mintz
2015-11-22 9:19 ` Yuval Mintz
2015-11-26 7:44 ` Salil Mehta
2015-11-26 7:44 ` Salil Mehta
2015-11-26 7:44 ` Salil Mehta
2015-11-26 7:44 ` Salil Mehta
2015-11-22 9:19 ` Yuval Mintz
[not found] ` <1447966706-16219-2-git-send-email-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-11-22 9:19 ` Yuval Mintz
2015-11-19 20:58 ` [PATCH V3 net-next 2/5] net:hns: Add Hip06 "RSS(Receive Side Scaling)" support to HNS Driver Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-19 20:58 ` Salil Mehta
[not found] ` <1447966706-16219-3-git-send-email-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-11-22 9:30 ` Yuval Mintz
2015-11-22 9:30 ` Yuval Mintz
2015-11-22 9:30 ` Yuval Mintz
2015-11-22 9:30 ` Yuval Mintz
2015-11-26 7:31 ` Salil Mehta
2015-11-26 7:31 ` Salil Mehta
2015-11-26 7:31 ` Salil Mehta
2015-11-26 7:31 ` Salil Mehta
2015-11-19 20:58 ` [PATCH V3 net-next 3/5] net:hns: Add Hip06 "TSO(TCP Segment Offload)" support " Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-22 8:49 ` Yuval Mintz
2015-11-22 8:49 ` Yuval Mintz
2015-11-22 8:49 ` Yuval Mintz
[not found] ` <CO2PR11MB00885067453FB6462178765497180-aWXWhCNu7Z/c7AgKY82GyJPPoyLQLiKMvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-11-26 8:19 ` Salil Mehta
2015-11-26 8:19 ` Salil Mehta
2015-11-26 8:19 ` Salil Mehta
2015-11-26 8:19 ` Salil Mehta
[not found] ` <1447966706-16219-4-git-send-email-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-11-22 8:49 ` Yuval Mintz
2015-11-19 20:58 ` [PATCH V3 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-20 14:07 ` Sergei Shtylyov
2015-11-20 14:07 ` Sergei Shtylyov
2015-11-23 12:05 ` Salil Mehta [this message]
2015-11-23 12:05 ` Salil Mehta
2015-11-19 20:58 ` [PATCH V3 net-next 5/5] net:hns: Add the init code to disable Hip06 "Hardware VLAN assist" Salil Mehta
2015-11-19 20:58 ` Salil Mehta
2015-11-19 20:58 ` 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=565300F2.7030308@gmail.com \
--to=mehta.salil.lnk@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.