Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271553 > unrolled thread
| Started by | Salil <salil.mehta@huawei.com> |
|---|---|
| First post | 2015-11-17 19:40 +0100 |
| Last post | 2015-11-20 15:20 +0100 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH V2 net-next 0/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem Salil <salil.mehta@huawei.com> - 2015-11-17 19:40 +0100
[PATCH V2 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS Salil <salil.mehta@huawei.com> - 2015-11-17 19:40 +0100
[PATCH V2 net-next 5/5] net:hns: Add the init code to disable Hip06 "Hardware VLAN assist" Salil <salil.mehta@huawei.com> - 2015-11-17 19:50 +0100
Re: [PATCH V2 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem David Miller <davem@davemloft.net> - 2015-11-18 20:00 +0100
Re: [PATCH V2 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem Salil Mehta <salil.mehta@huawei.com> - 2015-11-20 15:20 +0100
| From | Salil <salil.mehta@huawei.com> |
|---|---|
| Date | 2015-11-17 19:40 +0100 |
| Subject | [PATCH V2 net-next 0/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem |
| Message-ID | <qvTkC-f2-27@gated-at.bofh.it> |
From: Salil Mehta <salil.mehta@huawei.com>
This is PATCH V2 created over previously sent PATCH V1 to add the
support of Hip06 SoC to the HNS driver.
In general, PATCH V2 adds below over the PATCH V1 sent earlier:
1) Bug Fixes and Clean-up: Internally identified
2) Addresses internal review comments by Kenneth Lee and
by Huang Daode
3) Addresses the review comment from "Yisen.Zhuang(Zhuangyuzeng)"
4) Adds fix from Fengguang Wu for an error generated from
"kbuild test robot" from Intel
5) Ethtool support for TSO set option from Lisheng
PATCH V1 initial version added support of below:
This patch-set adds support of new Hisilicon Hip06 SoC to the existing
(already part of net-next) HNS ethernet driver for Hip05 SoC. Hip06 is
a multi-core SoC and is a derivative of Hip05 SoC with lots of new
hardware featres supported like RSS, TSO, hardware VLAN assist etc.
The changes in the driver are mainly due to following:
1) changes in the DMA descriptor provided by the Hip06 ethernet
hardware. These changes need to co-exist with already present
Hip05 DMA descriptor and its operating functions. The decision
to choose the correct type of DMA descriptor is taken dynamically
depending upon the version of the hardware (i.e. V1/hip05 or
V2/hip06, see already existing hisilicon-hns-nic.txt binding file
for the detailed description version and naming).
2) To support new features added to the Hip06 ethernet hardware:
a. RSS (Receive Side Scaling)
b. TSO (TCP Segment Offload)
c. Hardware VLAN support (currently we are initializing hardware
to not assist in stripping the vlan tag at hardware level.
Proper supoort of this feature and ethtool would come after
these patches have been accepted)
Kindly note that, this patchset has been based on net-next (2 days
after linux-4.4-rc1 was released) which already has Hip05 ethernet
driver changes.
Salil Mehta (5):
net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem
net:hns: Add Hip06 "RSS(Receive Side Scaling)" support to HNS Driver
net:hns: Add Hip06 "TSO(TCP Segment Offload)" support HNS Driver
net:hns: Add support of ethtool TSO set option for Hip06 in HNS
net:hns: Add the init code to disable Hip06 "Hardware VLAN assist"
drivers/net/ethernet/hisilicon/hns/hnae.h | 56 ++-
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 90 +++-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 213 +++++++--
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 25 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 6 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 79 +++-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.h | 32 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 68 ++-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 8 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 88 +++-
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 487 +++++++++++++++++---
drivers/net/ethernet/hisilicon/hns/hns_enet.h | 12 +
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 95 +++-
13 files changed, 1072 insertions(+), 187 deletions(-)
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Salil <salil.mehta@huawei.com> |
|---|---|
| Date | 2015-11-17 19:40 +0100 |
| Subject | [PATCH V2 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS |
| Message-ID | <qvTkF-f2-83@gated-at.bofh.it> |
| In reply to | #1271553 |
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))
+ netdev_info(netdev, "enet v1 do not support tso!\n");
+ break;
+ default:
+ if ((features & NETIF_F_TSO) || (features & 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;
+ }
+ 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;
+ }
+ return features;
+}
+
/**
* nic_set_multicast_list - set mutl mac address
* @netdev: net device
@@ -1481,6 +1526,8 @@ static const struct net_device_ops hns_nic_netdev_ops = {
.ndo_set_mac_address = hns_nic_net_set_mac_address,
.ndo_change_mtu = hns_nic_change_mtu,
.ndo_do_ioctl = hns_nic_do_ioctl,
+ .ndo_set_features = hns_nic_set_features,
+ .ndo_fix_features = hns_nic_fix_features,
.ndo_get_stats64 = hns_nic_get_stats64,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = hns_nic_poll_controller,
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Salil <salil.mehta@huawei.com> |
|---|---|
| Date | 2015-11-17 19:50 +0100 |
| Subject | [PATCH V2 net-next 5/5] net:hns: Add the init code to disable Hip06 "Hardware VLAN assist" |
| Message-ID | <qvTui-is-29@gated-at.bofh.it> |
| In reply to | #1271553 |
From: Salil Mehta <salil.mehta@huawei.com>
This patch adds the initializzation code to disable the hardware
vlan support for VLAN Tag stripping by default for now.
Proper support of "hardware VLAN assitance" feature would
soon come in the next coming patches.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 7 +++++++
drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
index b6bf292..544f323 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
@@ -176,6 +176,11 @@ static void hns_ppe_cnt_clr_ce(struct hns_ppe_cb *ppe_cb)
PPE_CNT_CLR_CE_B, 1);
}
+static void hns_ppe_set_vlan_strip(struct hns_ppe_cb *ppe_cb, int en)
+{
+ dsaf_write_dev(ppe_cb, PPEV2_VLAN_STRIP_EN_REG, en);
+}
+
/**
* hns_ppe_checksum_hw - set ppe checksum caculate
* @ppe_device: ppe device
@@ -345,6 +350,8 @@ static void hns_ppe_init_hw(struct hns_ppe_cb *ppe_cb)
hns_ppe_cnt_clr_ce(ppe_cb);
if (!AE_IS_VER1(dsaf_dev->dsaf_ver)) {
+ hns_ppe_set_vlan_strip(ppe_cb, 0);
+
hns_ppe_set_rss_key(ppe_cb, rss_key);
for (i = 0; i < HNS_PPEV2_RSS_IND_TBL_SIZE; i++)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
index 98c163e..6c18ca9 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
@@ -318,6 +318,7 @@
#define PPE_CFG_PARSE_TAG_REG 0x94
#define PPE_CFG_PRO_CHECK_EN_REG 0x98
#define PPEV2_CFG_TSO_EN_REG 0xA0
+#define PPEV2_VLAN_STRIP_EN_REG 0xAC
#define PPE_INTEN_REG 0x100
#define PPE_RINT_REG 0x104
#define PPE_INTSTS_REG 0x108
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-11-18 20:00 +0100 |
| Subject | Re: [PATCH V2 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem |
| Message-ID | <qwg7w-6Nq-19@gated-at.bofh.it> |
| In reply to | #1271553 |
From: Salil <salil.mehta@huawei.com> Date: Wed, 18 Nov 2015 02:52:23 +0800 > @@ -387,19 +409,23 @@ static void hns_rcb_ring_get_cfg(struct hnae_queue *q, int ring_type) > struct rcb_common_cb *rcb_common; > struct ring_pair_cb *ring_pair_cb; > u32 buf_size; > - u16 desc_num; > - int irq_idx; > + u16 desc_num, mdnum_ppkt; > + int irq_idx, is_ver1; Please use "bool" and true/false for boolean conditions like is_ver1. Please audit your entire submission for this problem. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Salil Mehta <salil.mehta@huawei.com> |
|---|---|
| Date | 2015-11-20 15:20 +0100 |
| Subject | Re: [PATCH V2 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem |
| Message-ID | <qwUHE-8jx-27@gated-at.bofh.it> |
| In reply to | #1272475 |
On 11/18/2015 6:52 PM, David Miller wrote: > From: Salil <salil.mehta@huawei.com> > Date: Wed, 18 Nov 2015 02:52:23 +0800 > >> @@ -387,19 +409,23 @@ static void hns_rcb_ring_get_cfg(struct hnae_queue *q, int ring_type) >> struct rcb_common_cb *rcb_common; >> struct ring_pair_cb *ring_pair_cb; >> u32 buf_size; >> - u16 desc_num; >> - int irq_idx; >> + u16 desc_num, mdnum_ppkt; >> + int irq_idx, is_ver1; > Please use "bool" and true/false for boolean conditions like is_ver1. > > Please audit your entire submission for this problem. Thanks for your time and comments. As per your suggestions, I have changed the data type of variable "is_ver" to "bool" where ever possible in the PATCH V3 floated yesterday. Best Regards Salil -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web