All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH NEXT 0/5]qlcnic: vlan rx accleration support
@ 2010-09-16 13:14 Amit Kumar Salecha
  2010-09-16 13:14 ` [PATCH NEXT 1/5] qlcnic: support vlan rx accleration Amit Kumar Salecha
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Amit Kumar Salecha @ 2010-09-16 13:14 UTC (permalink / raw)
  To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty

Hi
   Series of 5 patch to support vlan rx accleration. Vlan rx accleration
   helps in supporting GRO and LRO on vlan interface. GRO and LRO
   support on vlan interface shows significant performance improvement and reduces 
   cpu utilization time.

-Amit

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH NEXT 1/5] qlcnic: support vlan rx accleration
  2010-09-16 13:14 [PATCH NEXT 0/5]qlcnic: vlan rx accleration support Amit Kumar Salecha
@ 2010-09-16 13:14 ` Amit Kumar Salecha
  2010-09-16 13:26   ` Eric Dumazet
  2010-09-16 13:36   ` Eric Dumazet
  2010-09-16 13:14 ` [PATCH NEXT 2/5] qlcnic: vlan gro support Amit Kumar Salecha
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 13+ messages in thread
From: Amit Kumar Salecha @ 2010-09-16 13:14 UTC (permalink / raw)
  To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty

Implemented vlan rx accleration in driver.
This helps in increasing significant performance and
reduces cpu utilization with GRO and LRO.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
 drivers/net/qlcnic/qlcnic.h      |    1 +
 drivers/net/qlcnic/qlcnic_init.c |   59 ++++++++++++++++++++++----------------
 drivers/net/qlcnic/qlcnic_main.c |   10 ++++++-
 3 files changed, 44 insertions(+), 26 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index cc8385a..c8caec9 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -1013,6 +1013,7 @@ struct qlcnic_adapter {
 
 	u64 dev_rst_time;
 
+	struct vlan_group *vlgrp;
 	struct qlcnic_npar_info *npars;
 	struct qlcnic_eswitch *eswitch;
 	struct qlcnic_nic_template *nic_ops;
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 26a7d6b..61fb143 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -1380,24 +1380,28 @@ static struct sk_buff *qlcnic_process_rxbuf(struct qlcnic_adapter *adapter,
 }
 
 static int
-qlcnic_check_rx_tagging(struct qlcnic_adapter *adapter, struct sk_buff *skb)
+qlcnic_check_rx_tagging(struct qlcnic_adapter *adapter, struct sk_buff *skb,
+			u16 *vlan_tag)
 {
-	u16 vlan_tag;
 	struct ethhdr *eth_hdr;
 
-	if (!__vlan_get_tag(skb, &vlan_tag)) {
-		if (vlan_tag == adapter->pvid) {
-			/* strip the tag from the packet and send it up */
-			eth_hdr = (struct ethhdr *) skb->data;
-			memmove(skb->data + VLAN_HLEN, eth_hdr, ETH_ALEN * 2);
-			skb_pull(skb, VLAN_HLEN);
-			return 0;
-		}
+	if (!__vlan_get_tag(skb, vlan_tag)) {
+		eth_hdr = (struct ethhdr *) skb->data;
+		memmove(skb->data + VLAN_HLEN, eth_hdr, ETH_ALEN * 2);
+		skb_pull(skb, VLAN_HLEN);
+	}
+	if (!adapter->pvid)
+		return 0;
+
+	if (*vlan_tag == adapter->pvid) {
+		/* Outer vlan tag. Packet should follow non-vlan path */
+		*vlan_tag = 0xffff;
+		return 0;
 	}
 	if (adapter->flags & QLCNIC_TAGGING_ENABLED)
 		return 0;
 
-	return -EIO;
+	return -EINVAL;
 }
 
 static struct qlcnic_rx_buffer *
@@ -1411,6 +1415,7 @@ qlcnic_process_rcv(struct qlcnic_adapter *adapter,
 	struct sk_buff *skb;
 	struct qlcnic_host_rds_ring *rds_ring;
 	int index, length, cksum, pkt_offset;
+	u16 vid = 0xffff;
 
 	if (unlikely(ring >= adapter->max_rds_rings))
 		return NULL;
@@ -1441,17 +1446,18 @@ qlcnic_process_rcv(struct qlcnic_adapter *adapter,
 
 	skb->truesize = skb->len + sizeof(struct sk_buff);
 
-	if (unlikely(adapter->pvid)) {
-		if (qlcnic_check_rx_tagging(adapter, skb)) {
-			adapter->stats.rxdropped++;
-			dev_kfree_skb_any(skb);
-			return buffer;
-		}
+	if (unlikely(qlcnic_check_rx_tagging(adapter, skb, &vid))) {
+		adapter->stats.rxdropped++;
+		dev_kfree_skb_any(skb);
+		return buffer;
 	}
 
 	skb->protocol = eth_type_trans(skb, netdev);
 
-	napi_gro_receive(&sds_ring->napi, skb);
+	if ((vid != 0xffff) && adapter->vlgrp)
+		vlan_hwaccel_receive_skb(skb, adapter->vlgrp, vid);
+	else
+		napi_gro_receive(&sds_ring->napi, skb);
 
 	adapter->stats.rx_pkts++;
 	adapter->stats.rxbytes += length;
@@ -1480,6 +1486,7 @@ qlcnic_process_lro(struct qlcnic_adapter *adapter,
 	int index;
 	u16 lro_length, length, data_offset;
 	u32 seq_number;
+	u16 vid = 0xffff;
 
 	if (unlikely(ring > adapter->max_rds_rings))
 		return NULL;
@@ -1514,13 +1521,12 @@ qlcnic_process_lro(struct qlcnic_adapter *adapter,
 
 	skb_pull(skb, l2_hdr_offset);
 
-	if (unlikely(adapter->pvid)) {
-		if (qlcnic_check_rx_tagging(adapter, skb)) {
-			adapter->stats.rxdropped++;
-			dev_kfree_skb_any(skb);
-			return buffer;
-		}
+	if (unlikely(qlcnic_check_rx_tagging(adapter, skb, &vid))) {
+		adapter->stats.rxdropped++;
+		dev_kfree_skb_any(skb);
+		return buffer;
 	}
+
 	skb->protocol = eth_type_trans(skb, netdev);
 
 	iph = (struct iphdr *)skb->data;
@@ -1535,7 +1541,10 @@ qlcnic_process_lro(struct qlcnic_adapter *adapter,
 
 	length = skb->len;
 
-	netif_receive_skb(skb);
+	if ((vid != 0xffff) && adapter->vlgrp)
+		vlan_hwaccel_receive_skb(skb, adapter->vlgrp, vid);
+	else
+		netif_receive_skb(skb);
 
 	adapter->stats.lro_pkts++;
 	adapter->stats.lrobytes += length;
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 5fd2abd..9eb0ced 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -371,6 +371,13 @@ static int qlcnic_set_mac(struct net_device *netdev, void *p)
 	return 0;
 }
 
+static void qlcnic_vlan_rx_register(struct net_device *netdev,
+		struct vlan_group *grp)
+{
+	struct qlcnic_adapter *adapter = netdev_priv(netdev);
+	adapter->vlgrp = grp;
+}
+
 static const struct net_device_ops qlcnic_netdev_ops = {
 	.ndo_open	   = qlcnic_open,
 	.ndo_stop	   = qlcnic_close,
@@ -381,6 +388,7 @@ static const struct net_device_ops qlcnic_netdev_ops = {
 	.ndo_set_mac_address    = qlcnic_set_mac,
 	.ndo_change_mtu	   = qlcnic_change_mtu,
 	.ndo_tx_timeout	   = qlcnic_tx_timeout,
+	.ndo_vlan_rx_register = qlcnic_vlan_rx_register,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller = qlcnic_poll_controller,
 #endif
@@ -1446,7 +1454,7 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter,
 	SET_ETHTOOL_OPS(netdev, &qlcnic_ethtool_ops);
 
 	netdev->features |= (NETIF_F_SG | NETIF_F_IP_CSUM |
-		NETIF_F_IPV6_CSUM | NETIF_F_GRO);
+		NETIF_F_IPV6_CSUM | NETIF_F_GRO | NETIF_F_HW_VLAN_RX);
 	netdev->vlan_features |= (NETIF_F_SG | NETIF_F_IP_CSUM |
 		NETIF_F_IPV6_CSUM);
 
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH NEXT 2/5] qlcnic: vlan gro support
  2010-09-16 13:14 [PATCH NEXT 0/5]qlcnic: vlan rx accleration support Amit Kumar Salecha
  2010-09-16 13:14 ` [PATCH NEXT 1/5] qlcnic: support vlan rx accleration Amit Kumar Salecha
@ 2010-09-16 13:14 ` Amit Kumar Salecha
  2010-09-16 13:14 ` [PATCH NEXT 3/5] qlcnic: vlan lro support Amit Kumar Salecha
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Amit Kumar Salecha @ 2010-09-16 13:14 UTC (permalink / raw)
  To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty

GRO support + vlan rx accleration, boost around 9%
performance and reduces 25% of cpu utilization on vlan
interface.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
 drivers/net/qlcnic/qlcnic_init.c |    2 +-
 drivers/net/qlcnic/qlcnic_main.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 61fb143..63ebbfd 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -1455,7 +1455,7 @@ qlcnic_process_rcv(struct qlcnic_adapter *adapter,
 	skb->protocol = eth_type_trans(skb, netdev);
 
 	if ((vid != 0xffff) && adapter->vlgrp)
-		vlan_hwaccel_receive_skb(skb, adapter->vlgrp, vid);
+		vlan_gro_receive(&sds_ring->napi, adapter->vlgrp, vid, skb);
 	else
 		napi_gro_receive(&sds_ring->napi, skb);
 
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 9eb0ced..f7eb30b 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -796,7 +796,7 @@ qlcnic_set_netdev_features(struct qlcnic_adapter *adapter,
 	features = (NETIF_F_SG | NETIF_F_IP_CSUM |
 			NETIF_F_IPV6_CSUM | NETIF_F_GRO);
 	vlan_features = (NETIF_F_SG | NETIF_F_IP_CSUM |
-			NETIF_F_IPV6_CSUM);
+			NETIF_F_IPV6_CSUM | NETIF_F_GRO);
 
 	if (adapter->capabilities & QLCNIC_FW_CAPABILITY_TSO) {
 		features |= (NETIF_F_TSO | NETIF_F_TSO6);
@@ -1456,7 +1456,7 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter,
 	netdev->features |= (NETIF_F_SG | NETIF_F_IP_CSUM |
 		NETIF_F_IPV6_CSUM | NETIF_F_GRO | NETIF_F_HW_VLAN_RX);
 	netdev->vlan_features |= (NETIF_F_SG | NETIF_F_IP_CSUM |
-		NETIF_F_IPV6_CSUM);
+		NETIF_F_IPV6_CSUM | NETIF_F_GRO);
 
 	if (adapter->capabilities & QLCNIC_FW_CAPABILITY_TSO) {
 		netdev->features |= (NETIF_F_TSO | NETIF_F_TSO6);
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH NEXT 3/5] qlcnic: vlan lro support
  2010-09-16 13:14 [PATCH NEXT 0/5]qlcnic: vlan rx accleration support Amit Kumar Salecha
  2010-09-16 13:14 ` [PATCH NEXT 1/5] qlcnic: support vlan rx accleration Amit Kumar Salecha
  2010-09-16 13:14 ` [PATCH NEXT 2/5] qlcnic: vlan gro support Amit Kumar Salecha
@ 2010-09-16 13:14 ` Amit Kumar Salecha
  2010-09-16 13:27   ` Eric Dumazet
  2010-09-16 13:14 ` [PATCH NEXT 4/5] qlcnic: remove fw version check Amit Kumar Salecha
  2010-09-16 13:14 ` [PATCH NEXT 5/5] qlcnic: update version 5.0.10 Amit Kumar Salecha
  4 siblings, 1 reply; 13+ messages in thread
From: Amit Kumar Salecha @ 2010-09-16 13:14 UTC (permalink / raw)
  To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty

LRO + GRO + vlan rx accleration support, performance increases
around 20% and cpu utilization reduces around 70% on vlan interface.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
 drivers/net/qlcnic/qlcnic_main.c |   39 +++++++++++++++++++++++++++++--------
 1 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index f7eb30b..ea729a5 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -107,7 +107,7 @@ static irqreturn_t qlcnic_msi_intr(int irq, void *data);
 static irqreturn_t qlcnic_msix_intr(int irq, void *data);
 
 static struct net_device_stats *qlcnic_get_stats(struct net_device *netdev);
-static void qlcnic_config_indev_addr(struct net_device *dev, unsigned long);
+static void qlcnic_restore_indev_addr(struct net_device *dev, unsigned long);
 static int qlcnic_start_firmware(struct qlcnic_adapter *);
 
 static void qlcnic_alloc_lb_filters_mem(struct qlcnic_adapter *adapter);
@@ -1759,7 +1759,7 @@ qlcnic_resume(struct pci_dev *pdev)
 		if (err)
 			goto done;
 
-		qlcnic_config_indev_addr(netdev, NETDEV_UP);
+		qlcnic_restore_indev_addr(netdev, NETDEV_UP);
 	}
 done:
 	netif_device_attach(netdev);
@@ -2958,7 +2958,7 @@ attach:
 		if (qlcnic_up(adapter, netdev))
 			goto done;
 
-		qlcnic_config_indev_addr(netdev, NETDEV_UP);
+		qlcnic_restore_indev_addr(netdev, NETDEV_UP);
 	}
 
 done:
@@ -3120,7 +3120,7 @@ static int qlcnic_attach_func(struct pci_dev *pdev)
 		if (err)
 			goto done;
 
-		qlcnic_config_indev_addr(netdev, NETDEV_UP);
+		qlcnic_restore_indev_addr(netdev, NETDEV_UP);
 	}
  done:
 	netif_device_attach(netdev);
@@ -4035,10 +4035,10 @@ qlcnic_remove_diag_entries(struct qlcnic_adapter *adapter)
 #define is_qlcnic_netdev(dev) (dev->netdev_ops == &qlcnic_netdev_ops)
 
 static void
-qlcnic_config_indev_addr(struct net_device *dev, unsigned long event)
+qlcnic_config_indev_addr(struct qlcnic_adapter *adapter,
+			struct net_device *dev, unsigned long event)
 {
 	struct in_device *indev;
-	struct qlcnic_adapter *adapter = netdev_priv(dev);
 
 	indev = in_dev_get(dev);
 	if (!indev)
@@ -4062,6 +4062,27 @@ qlcnic_config_indev_addr(struct net_device *dev, unsigned long event)
 	in_dev_put(indev);
 }
 
+static void
+qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event)
+{
+	struct qlcnic_adapter *adapter = netdev_priv(netdev);
+	struct net_device *dev;
+	u16 vid;
+
+	qlcnic_config_indev_addr(adapter, netdev, event);
+
+	if (!adapter->vlgrp)
+		return;
+
+	for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) {
+		dev = vlan_group_get_device(adapter->vlgrp, vid);
+		if (!dev)
+			continue;
+
+		qlcnic_config_indev_addr(adapter, dev, event);
+	}
+}
+
 static int qlcnic_netdev_event(struct notifier_block *this,
 				 unsigned long event, void *ptr)
 {
@@ -4088,7 +4109,7 @@ recheck:
 	if (!test_bit(__QLCNIC_DEV_UP, &adapter->state))
 		goto done;
 
-	qlcnic_config_indev_addr(dev, event);
+	qlcnic_config_indev_addr(adapter, dev, event);
 done:
 	return NOTIFY_DONE;
 }
@@ -4105,7 +4126,7 @@ qlcnic_inetaddr_event(struct notifier_block *this,
 	dev = ifa->ifa_dev ? ifa->ifa_dev->dev : NULL;
 
 recheck:
-	if (dev == NULL || !netif_running(dev))
+	if (dev == NULL)
 		goto done;
 
 	if (dev->priv_flags & IFF_802_1Q_VLAN) {
@@ -4148,7 +4169,7 @@ static struct notifier_block qlcnic_inetaddr_cb = {
 };
 #else
 static void
-qlcnic_config_indev_addr(struct net_device *dev, unsigned long event)
+qlcnic_restore_indev_addr(struct net_device *dev, unsigned long event)
 { }
 #endif
 static struct pci_error_handlers qlcnic_err_handler = {
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH NEXT 4/5] qlcnic: remove fw version check
  2010-09-16 13:14 [PATCH NEXT 0/5]qlcnic: vlan rx accleration support Amit Kumar Salecha
                   ` (2 preceding siblings ...)
  2010-09-16 13:14 ` [PATCH NEXT 3/5] qlcnic: vlan lro support Amit Kumar Salecha
@ 2010-09-16 13:14 ` Amit Kumar Salecha
  2010-09-16 13:14 ` [PATCH NEXT 5/5] qlcnic: update version 5.0.10 Amit Kumar Salecha
  4 siblings, 0 replies; 13+ messages in thread
From: Amit Kumar Salecha @ 2010-09-16 13:14 UTC (permalink / raw)
  To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty

Don't compare flash and file fw version. Allow to load
old fw from file than flashed fw.
If file fw is present, don't skip fw re-intialization.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
 drivers/net/qlcnic/qlcnic_init.c |   30 ++----------------------------
 1 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 63ebbfd..ddcc46a 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -1015,8 +1015,6 @@ qlcnic_check_fw_hearbeat(struct qlcnic_adapter *adapter)
 int
 qlcnic_need_fw_reset(struct qlcnic_adapter *adapter)
 {
-	u32 val, version, major, minor, build;
-
 	if (qlcnic_check_fw_hearbeat(adapter)) {
 		qlcnic_rom_lock_recovery(adapter);
 		return 1;
@@ -1025,20 +1023,8 @@ qlcnic_need_fw_reset(struct qlcnic_adapter *adapter)
 	if (adapter->need_fw_reset)
 		return 1;
 
-	/* check if we have got newer or different file firmware */
-	if (adapter->fw) {
-
-		val = qlcnic_get_fw_version(adapter);
-
-		version = QLCNIC_DECODE_VERSION(val);
-
-		major = QLCRD32(adapter, QLCNIC_FW_VERSION_MAJOR);
-		minor = QLCRD32(adapter, QLCNIC_FW_VERSION_MINOR);
-		build = QLCRD32(adapter, QLCNIC_FW_VERSION_SUB);
-
-		if (version > QLCNIC_VERSION_CODE(major, minor, build))
-			return 1;
-	}
+	if (adapter->fw)
+		return 1;
 
 	return 0;
 }
@@ -1174,18 +1160,6 @@ qlcnic_validate_firmware(struct qlcnic_adapter *adapter)
 		return -EINVAL;
 	}
 
-	/* check if flashed firmware is newer */
-	if (qlcnic_rom_fast_read(adapter,
-			QLCNIC_FW_VERSION_OFFSET, (int *)&val))
-		return -EIO;
-
-	val = QLCNIC_DECODE_VERSION(val);
-	if (val > ver) {
-		dev_info(&pdev->dev, "%s: firmware is older than flash\n",
-				fw_name[fw_type]);
-		return -EINVAL;
-	}
-
 	QLCWR32(adapter, QLCNIC_CAM_RAM(0x1fc), QLCNIC_BDINFO_MAGIC);
 	return 0;
 }
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH NEXT 5/5] qlcnic: update version 5.0.10
  2010-09-16 13:14 [PATCH NEXT 0/5]qlcnic: vlan rx accleration support Amit Kumar Salecha
                   ` (3 preceding siblings ...)
  2010-09-16 13:14 ` [PATCH NEXT 4/5] qlcnic: remove fw version check Amit Kumar Salecha
@ 2010-09-16 13:14 ` Amit Kumar Salecha
  4 siblings, 0 replies; 13+ messages in thread
From: Amit Kumar Salecha @ 2010-09-16 13:14 UTC (permalink / raw)
  To: davem; +Cc: netdev, ameen.rahman, anirban.chakraborty

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
 drivers/net/qlcnic/qlcnic.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index c8caec9..714ddf4 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -51,8 +51,8 @@
 
 #define _QLCNIC_LINUX_MAJOR 5
 #define _QLCNIC_LINUX_MINOR 0
-#define _QLCNIC_LINUX_SUBVERSION 9
-#define QLCNIC_LINUX_VERSIONID  "5.0.9"
+#define _QLCNIC_LINUX_SUBVERSION 10
+#define QLCNIC_LINUX_VERSIONID  "5.0.10"
 #define QLCNIC_DRV_IDC_VER  0x01
 #define QLCNIC_DRIVER_VERSION  ((_QLCNIC_LINUX_MAJOR << 16) |\
 		 (_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH NEXT 1/5] qlcnic: support vlan rx accleration
  2010-09-16 13:14 ` [PATCH NEXT 1/5] qlcnic: support vlan rx accleration Amit Kumar Salecha
@ 2010-09-16 13:26   ` Eric Dumazet
  2010-09-16 13:36   ` Eric Dumazet
  1 sibling, 0 replies; 13+ messages in thread
From: Eric Dumazet @ 2010-09-16 13:26 UTC (permalink / raw)
  To: Amit Kumar Salecha; +Cc: davem, netdev, ameen.rahman, anirban.chakraborty

Le jeudi 16 septembre 2010 à 06:14 -0700, Amit Kumar Salecha a écrit :

>  	skb->protocol = eth_type_trans(skb, netdev);
>  
> -	napi_gro_receive(&sds_ring->napi, skb);
> +	if ((vid != 0xffff) && adapter->vlgrp)
> +		vlan_hwaccel_receive_skb(skb, adapter->vlgrp, vid);
> +	else
> +		napi_gro_receive(&sds_ring->napi, skb);

This seems very strange to use GRO only on non tagged trafic.

I understand you want to have a separate patch (2/5) for GRO & vlans,
but this seems a bit convoluted.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH NEXT 3/5] qlcnic: vlan lro support
  2010-09-16 13:14 ` [PATCH NEXT 3/5] qlcnic: vlan lro support Amit Kumar Salecha
@ 2010-09-16 13:27   ` Eric Dumazet
  2010-09-16 18:13     ` Amit Salecha
  2010-09-17  7:10     ` Amit Salecha
  0 siblings, 2 replies; 13+ messages in thread
From: Eric Dumazet @ 2010-09-16 13:27 UTC (permalink / raw)
  To: Amit Kumar Salecha; +Cc: davem, netdev, ameen.rahman, anirban.chakraborty

Le jeudi 16 septembre 2010 à 06:14 -0700, Amit Kumar Salecha a écrit :
> LRO + GRO + vlan rx accleration support, performance increases
> around 20% and cpu utilization reduces around 70% on vlan interface.

Interesting. What is the workload that demonstrates such gains ?



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH NEXT 1/5] qlcnic: support vlan rx accleration
  2010-09-16 13:14 ` [PATCH NEXT 1/5] qlcnic: support vlan rx accleration Amit Kumar Salecha
  2010-09-16 13:26   ` Eric Dumazet
@ 2010-09-16 13:36   ` Eric Dumazet
  1 sibling, 0 replies; 13+ messages in thread
From: Eric Dumazet @ 2010-09-16 13:36 UTC (permalink / raw)
  To: Amit Kumar Salecha; +Cc: davem, netdev, ameen.rahman, anirban.chakraborty

Le jeudi 16 septembre 2010 à 06:14 -0700, Amit Kumar Salecha a écrit :

> -	if (unlikely(adapter->pvid)) {
> -		if (qlcnic_check_rx_tagging(adapter, skb)) {
> -			adapter->stats.rxdropped++;
> -			dev_kfree_skb_any(skb);
> -			return buffer;
> -		}
> +	if (unlikely(qlcnic_check_rx_tagging(adapter, skb, &vid))) {
> +		adapter->stats.rxdropped++;
> +		dev_kfree_skb_any(skb);

Its a bit strange you use dev_kfree_skb_any(skb) here.

We run in NAPI mode, so you can use dev_kfree_skb().

> +		return buffer;
>  	}
>  
>  	skb->protocol = eth_type_trans(skb, netdev);
>  
> -	napi_gro_receive(&sds_ring->napi, skb);
> +	if ((vid != 0xffff) && adapter->vlgrp)
> +		vlan_hwaccel_receive_skb(skb, adapter->vlgrp, vid);
> +	else
> +		napi_gro_receive(&sds_ring->napi, skb);



^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH NEXT 3/5] qlcnic: vlan lro support
  2010-09-16 13:27   ` Eric Dumazet
@ 2010-09-16 18:13     ` Amit Salecha
  2010-09-17  7:10     ` Amit Salecha
  1 sibling, 0 replies; 13+ messages in thread
From: Amit Salecha @ 2010-09-16 18:13 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: davem, netdev, Ameen Rahman, Anirban Chakraborty



> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> Sent: Thursday, September 16, 2010 6:57 PM
> To: Amit Salecha
> Cc: davem@davemloft.net; netdev@vger.kernel.org; Ameen Rahman; Anirban
> Chakraborty
> Subject: Re: [PATCH NEXT 3/5] qlcnic: vlan lro support
> 
> Le jeudi 16 septembre 2010 à 06:14 -0700, Amit Kumar Salecha a écrit :
> > LRO + GRO + vlan rx accleration support, performance increases
> > around 20% and cpu utilization reduces around 70% on vlan interface.
> 
> Interesting. What is the workload that demonstrates such gains ?
>
I ran iperf (tcp) with 8 thread without these patches and with these patches.
What kind of test community expect ?
>

 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH NEXT 3/5] qlcnic: vlan lro support
  2010-09-16 13:27   ` Eric Dumazet
  2010-09-16 18:13     ` Amit Salecha
@ 2010-09-17  7:10     ` Amit Salecha
  2010-09-17  7:34       ` "Oleg A. Arkhangelsky"
  1 sibling, 1 reply; 13+ messages in thread
From: Amit Salecha @ 2010-09-17  7:10 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: davem, netdev, Ameen Rahman, Anirban Chakraborty



> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> Sent: Thursday, September 16, 2010 6:57 PM
> To: Amit Salecha
> Cc: davem@davemloft.net; netdev@vger.kernel.org; Ameen Rahman; Anirban
> Chakraborty
> Subject: Re: [PATCH NEXT 3/5] qlcnic: vlan lro support
> 
> Le jeudi 16 septembre 2010 à 06:14 -0700, Amit Kumar Salecha a écrit :
> > LRO + GRO + vlan rx accleration support, performance increases
> > around 20% and cpu utilization reduces around 70% on vlan interface.
> 
> Interesting. What is the workload that demonstrates such gains ?
> 
> 
Just to demonstrate decrease in cpu utilization further:
I have taken numbers with various load. I used iperf application to run tcp traffic on vlan interface.

Number of TCP connection	 Cpu  %idle		Cpu %idle
					 (w/o patch)	(with patch)

	8				34.14			63.01
	16				34.36			62.38
	32				33.86			62.18
	64				30.62			61.94
	128				29.33			61.13
	256				27.79			59.46
	512				25.33			59.38

There is around 80-90% of reduction in cpu utilization.

-Amit



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH NEXT 3/5] qlcnic: vlan lro support
  2010-09-17  7:10     ` Amit Salecha
@ 2010-09-17  7:34       ` "Oleg A. Arkhangelsky"
  2010-09-17  8:28         ` Eric Dumazet
  0 siblings, 1 reply; 13+ messages in thread
From: "Oleg A. Arkhangelsky" @ 2010-09-17  7:34 UTC (permalink / raw)
  To: Amit Salecha; +Cc: netdev



17.09.2010, 11:10, "Amit Salecha" <amit.salecha@qlogic.com>:
>>  -----Original Message-----
>>  From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
>>  Sent: Thursday, September 16, 2010 6:57 PM
>>  To: Amit Salecha
>>  Cc: davem@davemloft.net; netdev@vger.kernel.org; Ameen Rahman; Anirban
>>  Chakraborty
>>  Subject: Re: [PATCH NEXT 3/5] qlcnic: vlan lro support
>>
>>  Le jeudi 16 septembre 2010 à 06:14 -0700, Amit Kumar Salecha a écrit :
>>>  LRO + GRO + vlan rx accleration support, performance increases
>>>  around 20% and cpu utilization reduces around 70% on vlan interface.
>>  Interesting. What is the workload that demonstrates such gains ?
>
> Just to demonstrate decrease in cpu utilization further:
> I have taken numbers with various load. I used iperf application to run tcp traffic on vlan interface.

> There is around 80-90% of reduction in cpu utilization.

I'm wondering, how can this scale further. For example if I have 200K low speed simultaneous
TCP connections (router appliance case with many users). Can GRO give us some gain here?

--
wbr, Oleg.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH NEXT 3/5] qlcnic: vlan lro support
  2010-09-17  7:34       ` "Oleg A. Arkhangelsky"
@ 2010-09-17  8:28         ` Eric Dumazet
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Dumazet @ 2010-09-17  8:28 UTC (permalink / raw)
  To: "Oleg A. Arkhangelsky"; +Cc: Amit Salecha, netdev

Le vendredi 17 septembre 2010 à 11:34 +0400, "Oleg A. Arkhangelsky" a
écrit :
> 
> 17.09.2010, 11:10, "Amit Salecha" <amit.salecha@qlogic.com>:
> >>  -----Original Message-----
> >>  From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> >>  Sent: Thursday, September 16, 2010 6:57 PM
> >>  To: Amit Salecha
> >>  Cc: davem@davemloft.net; netdev@vger.kernel.org; Ameen Rahman; Anirban
> >>  Chakraborty
> >>  Subject: Re: [PATCH NEXT 3/5] qlcnic: vlan lro support
> >>
> >>  Le jeudi 16 septembre 2010 à 06:14 -0700, Amit Kumar Salecha a écrit :
> >>>  LRO + GRO + vlan rx accleration support, performance increases
> >>>  around 20% and cpu utilization reduces around 70% on vlan interface.
> >>  Interesting. What is the workload that demonstrates such gains ?
> >
> > Just to demonstrate decrease in cpu utilization further:
> > I have taken numbers with various load. I used iperf application to run tcp traffic on vlan interface.
> 
> > There is around 80-90% of reduction in cpu utilization.
> 
> I'm wondering, how can this scale further. For example if I have 200K low speed simultaneous
> TCP connections (router appliance case with many users). Can GRO give us some gain here?
> 

I dont think it can help in a mixed trafic:

GRO in itself has an overhead and cannot handle more than 8 different
sessions per NAPI run.

UDP frames hit the overhead but not the GRO gain.

Because most tcp sessions are short lived and initcwnd is small, most
frames wont be coalesced.




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-09-17  8:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-16 13:14 [PATCH NEXT 0/5]qlcnic: vlan rx accleration support Amit Kumar Salecha
2010-09-16 13:14 ` [PATCH NEXT 1/5] qlcnic: support vlan rx accleration Amit Kumar Salecha
2010-09-16 13:26   ` Eric Dumazet
2010-09-16 13:36   ` Eric Dumazet
2010-09-16 13:14 ` [PATCH NEXT 2/5] qlcnic: vlan gro support Amit Kumar Salecha
2010-09-16 13:14 ` [PATCH NEXT 3/5] qlcnic: vlan lro support Amit Kumar Salecha
2010-09-16 13:27   ` Eric Dumazet
2010-09-16 18:13     ` Amit Salecha
2010-09-17  7:10     ` Amit Salecha
2010-09-17  7:34       ` "Oleg A. Arkhangelsky"
2010-09-17  8:28         ` Eric Dumazet
2010-09-16 13:14 ` [PATCH NEXT 4/5] qlcnic: remove fw version check Amit Kumar Salecha
2010-09-16 13:14 ` [PATCH NEXT 5/5] qlcnic: update version 5.0.10 Amit Kumar Salecha

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.