Re: [E1000-devel] [PATCH v2 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread David Miller
From: Eliezer Tamir eliezer.ta...@linux.intel.com
Date: Sun, 19 May 2013 13:25:33 +0300

 +#ifndef _LINUX_NET_LL_POLL_H
 +#define _LINUX_NET_LL_POLL_H
 +#ifdef CONFIG_INET_LL_RX_POLL

Please put an empty line before the final ifdef test here.

 +static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb)
 +{
 + sk-dev_ref = skb-dev_ref;
^^^

One tab too many.

 +#else /* CONFIG_INET_LL_RX_FLUSH */
 +
 +#define sk_valid_ll(sk) 0
 +#define sk_poll_ll(sk, nonblock) do {} while (0)
 +#define skb_mark_ll(napi, skb) do {} while (0)
 +#define sk_mark_ll(sk, skb) do {} while (0)

Make these inline functions too, so that even if
CONFIG_INET_LL_RX_POLL is disabled, the arguments and return values
are still properly type checked.

  {
   struct socket *sock;
 + unsigned int poll_result;

Please order local variable declarations from longest line to
shortest line.

 + !(poll_result  (POLLRDNORM | POLLERR | POLLRDHUP | POLLHUP))) {
 +
 + struct sock *sk = sock-sk;

Please remove the empty line before the variable declaration.

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


[E1000-devel] [PATCH 1/4] e1000e: Remove duplicate assignment of default rx/tx ring size

2013-05-20 Thread Wei Yang
tx_ring/rx_ring size is assigned in function e1000_alloc_queues(), which is
called by e1000_sw_init() in the early stage of e1000_probe().

This patch just remove the duplicate assignment of this default ring size
value.

Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
Reviewed-by: Gavin Shan sha...@linux.vnet.ibm.com
Reviewed-by: Da Yu Qiu qiud...@cn.ibm.com
---
 drivers/net/ethernet/intel/e1000e/netdev.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c 
b/drivers/net/ethernet/intel/e1000e/netdev.c
index 7e615e2..5cb8321 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6707,10 +6707,6 @@ static int e1000_probe(struct pci_dev *pdev, const 
struct pci_device_id *ent)
adapter-hw.fc.current_mode = e1000_fc_default;
adapter-hw.phy.autoneg_advertised = 0x2f;
 
-   /* ring size defaults */
-   adapter-rx_ring-count = E1000_DEFAULT_RXD;
-   adapter-tx_ring-count = E1000_DEFAULT_TXD;
-
/* Initial Wake on LAN setting - If APM wake is enabled in
 * the EEPROM, enable the ACPI Magic Packet filter
 */
-- 
1.7.5.4


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


[E1000-devel] [PATCH 0/4] trivial clean up for e1000e driver

2013-05-20 Thread Wei Yang
Here is several trivial clean up for e1000e driver.

Wei Yang (4):
  e1000e: Remove duplicate assignment of default rx/tx ring size
  e1000e: Use marco instead of digit for defining
e1000_rx_desc_packet_split
  e1000e: Calculate the desc_len based on adapter type
  e1000e: Not initialize the e1000_ps_page array when packet-split is
not used

 drivers/net/ethernet/intel/e1000e/e1000.h  |3 --
 drivers/net/ethernet/intel/e1000e/hw.h |5 ++-
 drivers/net/ethernet/intel/e1000e/netdev.c |   47 +++-
 3 files changed, 29 insertions(+), 26 deletions(-)

-- 
1.7.5.4


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


[E1000-devel] [PATCH 4/4] e1000e: Not initialize the e1000_ps_page array when packet-split is not used

2013-05-20 Thread Wei Yang
When packet split is not used, those fields are still initialized and memory
is allocated for them.

This patch check whether packet split is used and do the initialization base
on the status.

Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
---
 drivers/net/ethernet/intel/e1000e/netdev.c |   38 ++-
 1 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c 
b/drivers/net/ethernet/intel/e1000e/netdev.c
index a2e8a53..c75d9cf 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1690,15 +1690,17 @@ static void e1000_clean_rx_ring(struct e1000_ring 
*rx_ring)
buffer_info-skb = NULL;
}
 
-   for (j = 0; j  PS_PAGE_BUFFERS; j++) {
-   ps_page = buffer_info-ps_pages[j];
-   if (!ps_page-page)
-   break;
-   dma_unmap_page(pdev-dev, ps_page-dma, PAGE_SIZE,
-  DMA_FROM_DEVICE);
-   ps_page-dma = 0;
-   put_page(ps_page-page);
-   ps_page-page = NULL;
+   if (adapter-rx_ps_pages) {
+   for (j = 0; j  PS_PAGE_BUFFERS; j++) {
+   ps_page = buffer_info-ps_pages[j];
+   if (!ps_page-page)
+   break;
+   dma_unmap_page(pdev-dev, ps_page-dma, 
PAGE_SIZE,
+  DMA_FROM_DEVICE);
+   ps_page-dma = 0;
+   put_page(ps_page-page);
+   ps_page-page = NULL;
+   }
}
}
 
@@ -2355,16 +2357,16 @@ int e1000e_setup_rx_resources(struct e1000_ring 
*rx_ring)
if (!rx_ring-buffer_info)
goto err;
 
-   for (i = 0; i  rx_ring-count; i++) {
-   buffer_info = rx_ring-buffer_info[i];
-   buffer_info-ps_pages = kcalloc(PS_PAGE_BUFFERS,
-   sizeof(struct e1000_ps_page),
-   GFP_KERNEL);
-   if (!buffer_info-ps_pages)
-   goto err_pages;
-   }
-
if (adapter-rx_ps_pages) {
+   for (i = 0; i  rx_ring-count; i++) {
+   buffer_info = rx_ring-buffer_info[i];
+   buffer_info-ps_pages = kcalloc(PS_PAGE_BUFFERS,
+   sizeof(struct 
e1000_ps_page),
+   GFP_KERNEL);
+   if (!buffer_info-ps_pages)
+   goto err_pages;
+   }
+
/* this is a 32 byte descriptor */
desc_len = sizeof(union e1000_rx_desc_packet_split);
} else {
-- 
1.7.5.4


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


[E1000-devel] [PATCH 2/4] e1000e: Use marco instead of digit for defining e1000_rx_desc_packet_split

2013-05-20 Thread Wei Yang
In structure e1000_rx_desc_packet_split, the size of wb.upper.length is
defined by a digit. This may introduce some problem when the lenght is
changed.

This patch use the marco PS_PAGE_BUFFERS for the definition. And move the
definition to hw.h.

Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
---
 drivers/net/ethernet/intel/e1000e/e1000.h |3 ---
 drivers/net/ethernet/intel/e1000e/hw.h|5 -
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h 
b/drivers/net/ethernet/intel/e1000e/e1000.h
index fcc7581..3ba560d 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -90,9 +90,6 @@ struct e1000_info;
 
 #define E1000_MNG_VLAN_NONE(-1)
 
-/* Number of packet split data buffers (not including the header buffer) */
-#define PS_PAGE_BUFFERS(MAX_PS_BUFFERS - 1)
-
 #define DEFAULT_JUMBO  9234
 
 /* Time to wait before putting the device into D3 if there's no link (in ms). 
*/
diff --git a/drivers/net/ethernet/intel/e1000e/hw.h 
b/drivers/net/ethernet/intel/e1000e/hw.h
index 1e6b889..edc618ad 100644
--- a/drivers/net/ethernet/intel/e1000e/hw.h
+++ b/drivers/net/ethernet/intel/e1000e/hw.h
@@ -227,6 +227,9 @@ union e1000_rx_desc_extended {
 };
 
 #define MAX_PS_BUFFERS 4
+
+/* Number of packet split data buffers (not including the header buffer) */
+#define PS_PAGE_BUFFERS(MAX_PS_BUFFERS - 1)
 /* Receive Descriptor - Packet Split */
 union e1000_rx_desc_packet_split {
struct {
@@ -251,7 +254,7 @@ union e1000_rx_desc_packet_split {
} middle;
struct {
__le16 header_status;
-   __le16 length[3];   /* length of buffers 1-3 */
+   __le16 length[PS_PAGE_BUFFERS]; /* length of buffers 
1-3 */
} upper;
__le64 reserved;
} wb; /* writeback */
-- 
1.7.5.4


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


[E1000-devel] Supplying Polyamide 6( Nylon 6)

2013-05-20 Thread Ms Sophia
Dear Sirs :
   This is Ms Sophia . We are a leading PA chips mfg, locatedin a Chemical Tech 
Zone, Hebei, China . 
   We have a strategic cooperation with Sinopec.

   Pls check our PA chips .
 1. Name : PA6 Chips, Virgin resin 
 2. Package : 25/800 kg net bag,16-18 tons in a 20'FCL
 3. Delivery : within 2 weeks 

 We sincerely waiting for your inqury and your visit to our plantoffice .
 Thanks Best regards,
 Ms Sophia 

 www.guanqi-plastic.com
Skype : sales.guanqi
 Tel : +86-311--69030899--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v2 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread David Miller
From: Joe Perches j...@perches.com
Date: Mon, 20 May 2013 01:29:47 -0700

 On Mon, 2013-05-20 at 00:54 -0700, David Miller wrote:
 From: Eliezer Tamir eliezer.ta...@linux.intel.com
 []
   {
struct socket *sock;
  + unsigned int poll_result;
 
 Please order local variable declarations from longest line to
 shortest line.
 
 reverse christmas tree doesn't seem especially valuable or
 sensible for automatics.

It looks nicer to the eyes and provides a predictable pattern
to look at.

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH 1/4] e1000e: Remove duplicate assignment of default rx/tx ring size

2013-05-20 Thread Jeff Kirsher
On 05/20/2013 01:15 AM, Wei Yang wrote:
 tx_ring/rx_ring size is assigned in function e1000_alloc_queues(), which is
 called by e1000_sw_init() in the early stage of e1000_probe().

 This patch just remove the duplicate assignment of this default ring size
 value.

 Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
 Reviewed-by: Gavin Shan sha...@linux.vnet.ibm.com
 Reviewed-by: Da Yu Qiu qiud...@cn.ibm.com
 ---
  drivers/net/ethernet/intel/e1000e/netdev.c |4 
  1 files changed, 0 insertions(+), 4 deletions(-)
Thanks, I have added the patch to my queue for e1000e.



signature.asc
Description: OpenPGP digital signature
--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH 2/4] e1000e: Use marco instead of digit for defining e1000_rx_desc_packet_split

2013-05-20 Thread Jeff Kirsher
On 05/20/2013 01:15 AM, Wei Yang wrote:
 In structure e1000_rx_desc_packet_split, the size of wb.upper.length is
 defined by a digit. This may introduce some problem when the lenght is
 changed.

 This patch use the marco PS_PAGE_BUFFERS for the definition. And move the
 definition to hw.h.

 Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
 ---
  drivers/net/ethernet/intel/e1000e/e1000.h |3 ---
  drivers/net/ethernet/intel/e1000e/hw.h|5 -
  2 files changed, 4 insertions(+), 4 deletions(-)
Thanks, I have added the patch to my queue for e1000e.



signature.asc
Description: OpenPGP digital signature
--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH 3/4] e1000e: Calculate the desc_len based on adapter type

2013-05-20 Thread Jeff Kirsher
On 05/20/2013 01:15 AM, Wei Yang wrote:
 desc_len represents the size of descriptor in rx_ring. There are two kinds of
 rx descriptors, e1000_rx_desc_packet_split(32 byte) and
 e1000_rx_desc_extended(16 byte). Different adapter will use different rx
 descriptors.

 When allocating the dma space for this descriptor in current implementation,
 the code ignore the descriptor type and take it as e1000_rx_desc_packet_split
 in any case. This behavior will not effect the function, but will require
 double size of dma space.

 This patch will calculate the desc_len based on the adapter type.

 Tested on T420, which use e1000_rx_desc_extended and works fine.

 Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
 ---
  drivers/net/ethernet/intel/e1000e/netdev.c |7 ++-
  1 files changed, 6 insertions(+), 1 deletions(-)
Thanks, I have added the patch to my queue for e1000e.



signature.asc
Description: OpenPGP digital signature
--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH 4/4] e1000e: Not initialize the e1000_ps_page array when packet-split is not used

2013-05-20 Thread Jeff Kirsher
On 05/20/2013 01:15 AM, Wei Yang wrote:
 When packet split is not used, those fields are still initialized and memory
 is allocated for them.

 This patch check whether packet split is used and do the initialization base
 on the status.

 Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
 ---
  drivers/net/ethernet/intel/e1000e/netdev.c |   38 ++-
  1 files changed, 20 insertions(+), 18 deletions(-)
Thanks, I have added the patch to my queue for e1000e.



signature.asc
Description: OpenPGP digital signature
--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


[E1000-devel] [PATCH v3 net-next 0/4] net: low latency Ethernet device polling

2013-05-20 Thread Eliezer Tamir
updated with the comments I got so far.

Thanks,
Eliezer

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


[E1000-devel] [PATCH v3 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread Eliezer Tamir
Adds a new ndo_ll_poll method and the code that supports and uses it.
This method can be used by low latency applications to busy poll ethernet
device queues directly from the socket code. The ip_low_latency_poll sysctl
entry controls how many cycles to poll. Set to zero to disable.

Signed-off-by: Alexander Duyck alexander.h.du...@intel.com
Signed-off-by: Jesse Brandeburg jesse.brandeb...@intel.com
Tested-by: Willem de Bruijn will...@google.com
Signed-off-by: Eliezer Tamir eliezer.ta...@linux.intel.com
---

 Documentation/networking/ip-sysctl.txt |5 ++
 include/linux/netdevice.h  |3 +
 include/linux/skbuff.h |8 ++-
 include/net/ll_poll.h  |   86 
 include/net/sock.h |3 +
 net/core/datagram.c|7 +++
 net/core/skbuff.c  |4 +
 net/core/sock.c|6 ++
 net/ipv4/Kconfig   |   12 
 net/ipv4/sysctl_net_ipv4.c |   10 
 net/socket.c   |   24 +
 11 files changed, 165 insertions(+), 3 deletions(-)
 create mode 100644 include/net/ll_poll.h

diff --git a/Documentation/networking/ip-sysctl.txt 
b/Documentation/networking/ip-sysctl.txt
index f98ca63..cfcf0ea 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -19,6 +19,11 @@ ip_no_pmtu_disc - BOOLEAN
Disable Path MTU Discovery.
default FALSE
 
+ip_low_latency_poll - INTEGER
+   Low latency busy poll timeout. (needs CONFIG_INET_LL_RX_POLL)
+   Approximate time in ms to spin waiting for packets on the device queue.
+   default 0
+
 min_pmtu - INTEGER
default 552 - minimum discovered Path MTU
 
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a94a5a0..e25f798 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -943,6 +943,9 @@ struct net_device_ops {
 gfp_t gfp);
void(*ndo_netpoll_cleanup)(struct net_device *dev);
 #endif
+#ifdef CONFIG_INET_LL_RX_POLL
+   int (*ndo_ll_poll)(struct napi_struct *dev);
+#endif
int (*ndo_set_vf_mac)(struct net_device *dev,
  int queue, u8 *mac);
int (*ndo_set_vf_vlan)(struct net_device *dev,
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2e0ced1..4047e1e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -384,6 +384,7 @@ typedef unsigned char *sk_buff_data_t;
  * @no_fcs:  Request NIC to treat last 4 bytes as Ethernet FCS
  * @dma_cookie: a cookie to one of several possible DMA operations
  * done by skb DMA functions
+ *  @dev_ref: the NAPI struct this skb came from
  * @secmark: security marking
  * @mark: Generic packet mark
  * @dropcount: total number of sk_receive_queue overflows
@@ -497,8 +498,11 @@ struct sk_buff {
/* 7/9 bit hole (depending on ndisc_nodetype presence) */
kmemcheck_bitfield_end(flags2);
 
-#ifdef CONFIG_NET_DMA
-   dma_cookie_tdma_cookie;
+#if defined CONFIG_NET_DMA || defined CONFIG_INET_LL_RX_POLL
+   union {
+   struct napi_struct  *dev_ref;
+   dma_cookie_tdma_cookie;
+   };
 #endif
 #ifdef CONFIG_NETWORK_SECMARK
__u32   secmark;
diff --git a/include/net/ll_poll.h b/include/net/ll_poll.h
new file mode 100644
index 000..d3c86d6
--- /dev/null
+++ b/include/net/ll_poll.h
@@ -0,0 +1,86 @@
+/*
+ * low latency network device queue flush
+ * Copyright(c) 2013 Intel Corporation.
+ * Author: Eliezer Tamir
+ *
+ * For now this depends on CONFIG_I86_TSC
+ */
+
+#ifndef _LINUX_NET_LL_POLL_H
+#define _LINUX_NET_LL_POLL_H
+
+#ifdef CONFIG_INET_LL_RX_POLL
+#include linux/netdevice.h
+struct napi_struct;
+extern int sysctl_net_ll_poll __read_mostly;
+
+/* return values from ndo_ll_poll */
+#define LL_FLUSH_DONE  0
+#define LL_FLUSH_FAILED1
+#define LL_FLUSH_BUSY  2
+
+/* we don't mind a ~2.5% imprecision */
+#define TSC_MHZ (tsc_khz  10)
+
+static inline bool sk_valid_ll(struct sock *sk)
+{
+   return sysctl_net_ll_poll  sk-dev_ref 
+   !need_resched()  !signal_pending(current);
+}
+
+static inline bool sk_poll_ll(struct sock *sk, int nonblock)
+{
+   struct napi_struct *napi = sk-dev_ref;
+   const struct net_device_ops *ops;
+   unsigned long end_time = TSC_MHZ * ACCESS_ONCE(sysctl_net_ll_poll)
+   + get_cycles();
+
+   if (!napi-dev-netdev_ops-ndo_ll_poll)
+   return false;
+
+   local_bh_disable();
+
+   ops = napi-dev-netdev_ops;
+   while (skb_queue_empty(sk-sk_receive_queue) 
+   !time_after((unsigned long)get_cycles(), 

[E1000-devel] [PATCH v3 net-next 2/4] tcp: add TCP support for low latency receive poll.

2013-05-20 Thread Eliezer Tamir
an example of how one could add support for ndo_ll_poll to TCP.

Signed-off-by: Alexander Duyck alexander.h.du...@intel.com
Signed-off-by: Jesse Brandeburg jesse.brandeb...@intel.com
Tested-by: Willem de Bruijn will...@google.com
Signed-off-by: Eliezer Tamir eliezer.ta...@linux.intel.com
---

 net/ipv4/Kconfig |   11 +++
 net/ipv4/tcp.c   |9 +
 net/ipv4/tcp_input.c |4 
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index d209f0f..8a3239e 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -421,6 +421,17 @@ config INET_LL_RX_POLL
 
  If unsure, say N.
 
+config INET_LL_TCP_POLL
+   bool Low Latency TCP Receive Poll
+   depends on INET_LL_RX_POLL
+   default n
+   ---help---
+ TCP support for Low Latency TCP Queue Poll.
+ (For network cards that support this option.)
+ Add support to the TCP stack for direct polling of the network card.
+
+ If unsure, say N.
+
 config INET_DIAG
tristate INET: socket monitoring interface
default y
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index dcb116d..85b8040 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -279,6 +279,7 @@
 
 #include asm/uaccess.h
 #include asm/ioctls.h
+#include net/ll_poll.h
 
 int sysctl_tcp_fin_timeout __read_mostly = TCP_FIN_TIMEOUT;
 
@@ -1504,6 +1505,7 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t 
*desc,
if (offset + 1 != skb-len)
continue;
}
+   sk_mark_ll(sk, skb);
if (tcp_hdr(skb)-fin) {
sk_eat_skb(sk, skb, false);
++seq;
@@ -1551,6 +1553,12 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, 
struct msghdr *msg,
struct sk_buff *skb;
u32 urg_hole = 0;
 
+#ifdef CONFIG_INET_LL_TCP_POLL
+   if (sk_valid_ll(sk)  skb_queue_empty(sk-sk_receive_queue)
+(sk-sk_state == TCP_ESTABLISHED))
+   sk_poll_ll(sk, nonblock);
+#endif
+
lock_sock(sk);
 
err = -ENOTCONN;
@@ -1855,6 +1863,7 @@ do_prequeue:
break;
}
}
+   sk_mark_ll(sk, skb);
}
 
*seq += used;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index b358e8c..f3f293b 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -74,6 +74,7 @@
 #include linux/ipsec.h
 #include asm/unaligned.h
 #include net/netdma.h
+#include net/ll_poll.h
 
 int sysctl_tcp_timestamps __read_mostly = 1;
 int sysctl_tcp_window_scaling __read_mostly = 1;
@@ -4329,6 +4330,7 @@ static void tcp_data_queue(struct sock *sk, struct 
sk_buff *skb)
tp-copied_seq += chunk;
eaten = (chunk == skb-len);
tcp_rcv_space_adjust(sk);
+   sk_mark_ll(sk, skb);
}
local_bh_disable();
}
@@ -4896,6 +4898,7 @@ static int tcp_copy_to_iovec(struct sock *sk, struct 
sk_buff *skb, int hlen)
tp-ucopy.len -= chunk;
tp-copied_seq += chunk;
tcp_rcv_space_adjust(sk);
+   sk_mark_ll(sk, skb);
}
 
local_bh_disable();
@@ -4955,6 +4958,7 @@ static bool tcp_dma_try_early_copy(struct sock *sk, 
struct sk_buff *skb,
tp-ucopy.len -= chunk;
tp-copied_seq += chunk;
tcp_rcv_space_adjust(sk);
+   sk_mark_ll(sk, skb);
 
if ((tp-ucopy.len == 0) ||
(tcp_flag_word(tcp_hdr(skb))  TCP_FLAG_PSH) ||


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


[E1000-devel] [PATCH v3 net-next 4/4] ixgbe: add extra stats for ndo_ll_poll

2013-05-20 Thread Eliezer Tamir
Add additional statistics to the ixgbe driver for ndo_ll_poll
Defined under LL_EXTENDED_STATS

Signed-off-by: Alexander Duyck alexander.h.du...@intel.com
Signed-off-by: Jesse Brandeburg jesse.brandeb...@intel.com
Tested-by: Willem de Bruijn will...@google.com
Signed-off-by: Eliezer Tamir eliezer.ta...@linux.intel.com
---

 drivers/net/ethernet/intel/ixgbe/ixgbe.h |   14 
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |   40 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c|6 +++
 3 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h 
b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 72be661..2a7de7c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -52,6 +52,9 @@
 #include linux/dca.h
 #endif
 
+#ifdef CONFIG_INET_LL_RX_POLL
+#define LL_EXTENDED_STATS
+#endif  /* CONFIG_INET_LL_RX_POLL */
 /* common prefix used by pr_ macros */
 #undef pr_fmt
 #define pr_fmt(fmt) KBUILD_MODNAME :  fmt
@@ -182,6 +185,11 @@ struct ixgbe_rx_buffer {
 struct ixgbe_queue_stats {
u64 packets;
u64 bytes;
+#ifdef LL_EXTENDED_STATS
+   u64 yields;
+   u64 misses;
+   u64 cleaned;
+#endif  /* LL_EXTENDED_STATS */
 };
 
 struct ixgbe_tx_queue_stats {
@@ -389,6 +397,9 @@ static inline int ixgbe_qv_lock_napi(struct ixgbe_q_vector 
*q_vector)
WARN_ON(q_vector-state  IXGBE_QV_STATE_NAPI);
q_vector-state |= IXGBE_QV_STATE_NAPI_YIELD;
rc = false;
+#ifdef LL_EXTENDED_STATS
+   q_vector-tx.ring-stats.yields++;
+#endif
} else
/* we don't care if someone yielded */
q_vector-state = IXGBE_QV_STATE_NAPI;
@@ -419,6 +430,9 @@ static inline int ixgbe_qv_lock_poll(struct ixgbe_q_vector 
*q_vector)
if ((q_vector-state  IXGBE_QV_LOCKED)) {
q_vector-state |= IXGBE_QV_STATE_POLL_YIELD;
rc = false;
+#ifdef LL_EXTENDED_STATS
+   q_vector-rx.ring-stats.yields++;
+#endif
} else
/* preserve yield marks */
q_vector-state |= IXGBE_QV_STATE_POLL;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c 
b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index d375472..24e2e7a 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -1054,6 +1054,12 @@ static void ixgbe_get_ethtool_stats(struct net_device 
*netdev,
data[i] = 0;
data[i+1] = 0;
i += 2;
+#ifdef LL_EXTENDED_STATS
+   data[i] = 0;
+   data[i+1] = 0;
+   data[i+2] = 0;
+   i += 3;
+#endif
continue;
}
 
@@ -1063,6 +1069,12 @@ static void ixgbe_get_ethtool_stats(struct net_device 
*netdev,
data[i+1] = ring-stats.bytes;
} while (u64_stats_fetch_retry_bh(ring-syncp, start));
i += 2;
+#ifdef LL_EXTENDED_STATS
+   data[i] = ring-stats.yields;
+   data[i+1] = ring-stats.misses;
+   data[i+2] = ring-stats.cleaned;
+   i += 3;
+#endif
}
for (j = 0; j  IXGBE_NUM_RX_QUEUES; j++) {
ring = adapter-rx_ring[j];
@@ -1070,6 +1082,12 @@ static void ixgbe_get_ethtool_stats(struct net_device 
*netdev,
data[i] = 0;
data[i+1] = 0;
i += 2;
+#ifdef LL_EXTENDED_STATS
+   data[i] = 0;
+   data[i+1] = 0;
+   data[i+2] = 0;
+   i += 3;
+#endif
continue;
}
 
@@ -1079,6 +1097,12 @@ static void ixgbe_get_ethtool_stats(struct net_device 
*netdev,
data[i+1] = ring-stats.bytes;
} while (u64_stats_fetch_retry_bh(ring-syncp, start));
i += 2;
+#ifdef LL_EXTENDED_STATS
+   data[i] = ring-stats.yields;
+   data[i+1] = ring-stats.misses;
+   data[i+2] = ring-stats.cleaned;
+   i += 3;
+#endif
}
 
for (j = 0; j  IXGBE_MAX_PACKET_BUFFERS; j++) {
@@ -1115,12 +1139,28 @@ static void ixgbe_get_strings(struct net_device 
*netdev, u32 stringset,
p += ETH_GSTRING_LEN;
sprintf(p, tx_queue_%u_bytes, i);
p += ETH_GSTRING_LEN;
+#ifdef LL_EXTENDED_STATS
+   sprintf(p, tx_q_%u_napi_yield, i);
+   p += ETH_GSTRING_LEN;
+   sprintf(p, tx_q_%u_misses, i);
+   p += ETH_GSTRING_LEN;
+   sprintf(p, tx_q_%u_cleaned, i);
+   p += ETH_GSTRING_LEN;
+#endif /* LL_EXTENDED_STATS */
}
for 

[E1000-devel] [PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-20 Thread Eliezer Tamir
Add the ixgbe driver code implementing ndo_ll_poll.
It should be easy for other drivers to do something similar
in order to enable support for CONFIG_INET_LL_RX_POLL

Signed-off-by: Alexander Duyck alexander.h.du...@intel.com
Signed-off-by: Jesse Brandeburg jesse.brandeb...@intel.com
Tested-by: Willem de Bruijn will...@google.com
Signed-off-by: Eliezer Tamir eliezer.ta...@linux.intel.com
---

 drivers/net/ethernet/intel/ixgbe/ixgbe.h  |   96 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   80 +++--
 2 files changed, 168 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h 
b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index ca93238..72be661 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -356,9 +356,105 @@ struct ixgbe_q_vector {
struct rcu_head rcu;/* to avoid race with update stats on free */
char name[IFNAMSIZ + 9];
 
+#ifdef CONFIG_INET_LL_RX_POLL
+   unsigned int state;
+#define IXGBE_QV_STATE_IDLE0
+#define IXGBE_QV_STATE_NAPI   1/* NAPI owns this QV */
+#define IXGBE_QV_STATE_POLL   2/* poll owns this QV */
+#define IXGBE_QV_LOCKED (IXGBE_QV_STATE_NAPI | IXGBE_QV_STATE_POLL)
+#define IXGBE_QV_STATE_NAPI_YIELD  4/* NAPI yielded this QV */
+#define IXGBE_QV_STATE_POLL_YIELD  8/* poll yielded this QV */
+#define IXGBE_QV_YIELD (IXGBE_QV_STATE_NAPI_YIELD | IXGBE_QV_STATE_POLL_YIELD)
+#define IXGBE_QV_USER_PEND (IXGBE_QV_STATE_POLL | IXGBE_QV_STATE_POLL_YIELD)
+   spinlock_t lock;
+#endif  /* CONFIG_INET_LL_RX_POLL */
+
/* for dynamic allocation of rings associated with this q_vector */
struct ixgbe_ring ring[0] cacheline_internodealigned_in_smp;
 };
+#ifdef CONFIG_INET_LL_RX_POLL
+static inline void ixgbe_qv_init_lock(struct ixgbe_q_vector *q_vector)
+{
+
+   spin_lock_init(q_vector-lock);
+   q_vector-state = IXGBE_QV_STATE_IDLE;
+}
+
+/* called from the device poll rutine to get ownership of a q_vector */
+static inline int ixgbe_qv_lock_napi(struct ixgbe_q_vector *q_vector)
+{
+   int rc = true;
+   spin_lock(q_vector-lock);
+   if (q_vector-state  IXGBE_QV_LOCKED) {
+   WARN_ON(q_vector-state  IXGBE_QV_STATE_NAPI);
+   q_vector-state |= IXGBE_QV_STATE_NAPI_YIELD;
+   rc = false;
+   } else
+   /* we don't care if someone yielded */
+   q_vector-state = IXGBE_QV_STATE_NAPI;
+   spin_unlock(q_vector-lock);
+   return rc;
+}
+
+/* returns true is someone tried to get the qv while napi had it */
+static inline int ixgbe_qv_unlock_napi(struct ixgbe_q_vector *q_vector)
+{
+   int rc = false;
+   spin_lock(q_vector-lock);
+   WARN_ON(q_vector-state  (IXGBE_QV_STATE_POLL |
+  IXGBE_QV_STATE_NAPI_YIELD));
+
+   if (q_vector-state  IXGBE_QV_STATE_POLL_YIELD)
+   rc = true;
+   q_vector-state = IXGBE_QV_STATE_IDLE;
+   spin_unlock(q_vector-lock);
+   return rc;
+}
+
+/* called from ixgbe_low_latency_poll() */
+static inline int ixgbe_qv_lock_poll(struct ixgbe_q_vector *q_vector)
+{
+   int rc = true;
+   spin_lock_bh(q_vector-lock);
+   if ((q_vector-state  IXGBE_QV_LOCKED)) {
+   q_vector-state |= IXGBE_QV_STATE_POLL_YIELD;
+   rc = false;
+   } else
+   /* preserve yield marks */
+   q_vector-state |= IXGBE_QV_STATE_POLL;
+   spin_unlock_bh(q_vector-lock);
+   return rc;
+}
+
+/* returns true if someone tried to get the qv while it was locked */
+static inline int ixgbe_qv_unlock_poll(struct ixgbe_q_vector *q_vector)
+{
+   int rc = false;
+   spin_lock_bh(q_vector-lock);
+   WARN_ON(q_vector-state  (IXGBE_QV_STATE_NAPI));
+
+   if (q_vector-state  IXGBE_QV_STATE_POLL_YIELD)
+   rc = true;
+   q_vector-state = IXGBE_QV_STATE_IDLE;
+   spin_unlock_bh(q_vector-lock);
+   return rc;
+}
+
+/* true if a socket is polling, even if it did not get the lock */
+static inline int ixgbe_qv_ll_polling(struct ixgbe_q_vector *q_vector)
+{
+   WARN_ON(!(q_vector-state  IXGBE_QV_LOCKED));
+   return q_vector-state  IXGBE_QV_USER_PEND;
+}
+#else
+#define ixgbe_qv_init_lock(qv) do {} while (0)
+#define ixgbe_qv_lock_napi(qv) 1
+#define ixgbe_qv_unlock_napi(qv) 0
+#define ixgbe_qv_lock_poll(qv) 0
+#define ixgbe_qv_unlock_poll(qv) 0
+#define ixgbe_qv_ll_polling(qv) 0
+#endif /* CONFIG_INET_LL_RX_POLL */
+
 #ifdef CONFIG_IXGBE_HWMON
 
 #define IXGBE_HWMON_TYPE_LOC   0
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 
b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index d30fbdd..628b7b1 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -47,6 +47,7 @@
 #include linux/if_bridge.h
 #include linux/prefetch.h
 #include scsi/fc/fc_fcoe.h
+#include net/ll_poll.h
 
 

Re: [E1000-devel] [PATCH v2 net-next 0/4] net: low latency Ethernet device polling

2013-05-20 Thread Eliezer Tamir
On 19/05/2013 22:56, Or Gerlitz wrote:
 On Sun, May 19, 2013 at 10:25 PM, Eliezer Tamir 
 eliezer.ta...@linux.intel.com wrote:

 On 19/05/2013 22:06, Or Gerlitz wrote:

 Last time you've placed a copy of the patchset in the rfc branch of
 git://github.com/jbrandeb/lls.**git http://github.com/jbrandeb/lls.git - 
 can you repost there V2 too?

 Or.

   BTW did you try the last version on your HW?



 nope, you didn't provide mlx4 patch :( we will look into that ...

I would never risk compromising your job security like that

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v3 net-next 2/4] tcp: add TCP support for low latency receive poll.

2013-05-20 Thread Eric Dumazet
On Mon, 2013-05-20 at 13:16 +0300, Eliezer Tamir wrote:
  
 +config INET_LL_TCP_POLL
 + bool Low Latency TCP Receive Poll
 + depends on INET_LL_RX_POLL
 + default n
 + ---help---
 +   TCP support for Low Latency TCP Queue Poll.
 +   (For network cards that support this option.)
 +   Add support to the TCP stack for direct polling of the network card.
 +
 +   If unsure, say N.
 +

Oh well, code is small and already guarded by CONFIG_INET_LL_RX_POLL




--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] interface link goes down

2013-05-20 Thread Wyborny, Carolyn
 -Original Message-
 From: ratheesh kannoth [mailto:ratheesh@gmail.com]
 Sent: Saturday, May 11, 2013 8:34 AM
 To: e1000-devel@lists.sourceforge.net
 Subject: [E1000-devel] interface link goes down
 
 Hi,
 
 driver  = igb-3.3.6
 hw-mac.type  =  e1000_82576
 media type  = copper
 
 I could see that link goes down some times when traffic passes. this is a 
 random
 issue and happens
  igb_has_link(adapter) in watchdog_task returns always 0.
 
 where can i start debug this  ? is this a known problem ?
 any clue or help is really appreciated .
 
 Thanks,
 Ratheesh
 
Hello Ratheesh,

Sorry for the delay in responding.  Does the link recover or does it require a 
reboot?  Can you provide a dmesg log from when the problem happens.  Is there a 
pattern to the traffic that causes this problem such as small packet or jumbo 
frame?  Can you download ethregs from the Souce Forge site and provide an 
output of the register set from before and after the problem occurs.  Also, try 
the latest version of igb from the Source Forge site and let me know if the 
problem still occurs.

Thanks,

Carolyn

Carolyn Wyborny 
Linux Development 
Networking Division 
Intel Corporation 



--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v3 net-next 2/4] tcp: add TCP support for low latency receive poll.

2013-05-20 Thread Eliezer Tamir
on 20/05/2013 16:49, Eric Dumazet wrote:
 On Mon, 2013-05-20 at 13:16 +0300, Eliezer Tamir wrote:

 +config INET_LL_TCP_POLL
 +bool Low Latency TCP Receive Poll
 +depends on INET_LL_RX_POLL
 +default n
 +---help---
 +  TCP support for Low Latency TCP Queue Poll.
 +  (For network cards that support this option.)
 +  Add support to the TCP stack for direct polling of the network card.
 +
 +  If unsure, say N.
 +

 Oh well, code is small and already guarded by CONFIG_INET_LL_RX_POLL

I will remove the separate config option.


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v3 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread Eric Dumazet
On Mon, 2013-05-20 at 13:16 +0300, Eliezer Tamir wrote:
 Adds a new ndo_ll_poll method and the code that supports and uses it.
 This method can be used by low latency applications to busy poll ethernet
 device queues directly from the socket code. The ip_low_latency_poll sysctl
 entry controls how many cycles to poll. Set to zero to disable.
 

This changelog lacks a lot of information, see below.

Part of this information was in your 0/4 text, but it wont be included
in the git tree.

 Signed-off-by: Alexander Duyck alexander.h.du...@intel.com
 Signed-off-by: Jesse Brandeburg jesse.brandeb...@intel.com
 Tested-by: Willem de Bruijn will...@google.com
 Signed-off-by: Eliezer Tamir eliezer.ta...@linux.intel.com
 ---
 

 +
 +static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi)
 +{
 + skb-dev_ref = napi;
 +}
 +
 +static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb)
 +{
 + sk-dev_ref = skb-dev_ref;
 +}

I do not see why it's safe to keep a pointer to a napi object without
taking a reference, or something to prevent object being removed.

Using a genid might be enough. (some counter incremented every time a
napi is dismantled)

Alternatively, use a napi_id instead of a pointer.




--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v2 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread Andi Kleen
 diff --git a/Documentation/networking/ip-sysctl.txt 
 b/Documentation/networking/ip-sysctl.txt
 index f98ca63..cfcf0ea 100644
 --- a/Documentation/networking/ip-sysctl.txt
 +++ b/Documentation/networking/ip-sysctl.txt
 @@ -19,6 +19,11 @@ ip_no_pmtu_disc - BOOLEAN
   Disable Path MTU Discovery.
   default FALSE
  
 +ip_low_latency_poll - INTEGER
 + Low latency busy poll timeout. (needs CONFIG_INET_LL_RX_POLL)
 + Approximate time in ms to spin waiting for packets on the device queue.
 + default 0

Can you document the suggested value here?

Also I would add something like may increase power usage

The other thing I would add is a linuxmib statistic counter so that
we can see the polling happens.

-Andi
-- 
a...@linux.intel.com -- Speaking for myself only.

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH 2/4] e1000e: Use marco instead of digit for defining e1000_rx_desc_packet_split

2013-05-20 Thread Wei Yang
On Mon, May 20, 2013 at 02:37:29AM -0700, Jeff Kirsher wrote:
On 05/20/2013 01:15 AM, Wei Yang wrote:
 In structure e1000_rx_desc_packet_split, the size of wb.upper.length is
 defined by a digit. This may introduce some problem when the lenght is
 changed.

 This patch use the marco PS_PAGE_BUFFERS for the definition. And move the
 definition to hw.h.

 Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
 ---
  drivers/net/ethernet/intel/e1000e/e1000.h |3 ---
  drivers/net/ethernet/intel/e1000e/hw.h|5 -
  2 files changed, 4 insertions(+), 4 deletions(-)
Thanks, I have added the patch to my queue for e1000e.


Thanks~


-- 
Richard Yang
Help you, Help me


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH 1/4] e1000e: Remove duplicate assignment of default rx/tx ring size

2013-05-20 Thread Wei Yang
On Mon, May 20, 2013 at 02:37:16AM -0700, Jeff Kirsher wrote:
On 05/20/2013 01:15 AM, Wei Yang wrote:
 tx_ring/rx_ring size is assigned in function e1000_alloc_queues(), which is
 called by e1000_sw_init() in the early stage of e1000_probe().

 This patch just remove the duplicate assignment of this default ring size
 value.

 Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
 Reviewed-by: Gavin Shan sha...@linux.vnet.ibm.com
 Reviewed-by: Da Yu Qiu qiud...@cn.ibm.com
 ---
  drivers/net/ethernet/intel/e1000e/netdev.c |4 
  1 files changed, 0 insertions(+), 4 deletions(-)
Thanks, I have added the patch to my queue for e1000e.

Thanks~





-- 
Richard Yang
Help you, Help me


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH 4/4] e1000e: Not initialize the e1000_ps_page array when packet-split is not used

2013-05-20 Thread Wei Yang
On Mon, May 20, 2013 at 02:38:07AM -0700, Jeff Kirsher wrote:
On 05/20/2013 01:15 AM, Wei Yang wrote:
 When packet split is not used, those fields are still initialized and memory
 is allocated for them.

 This patch check whether packet split is used and do the initialization base
 on the status.

 Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
 ---
  drivers/net/ethernet/intel/e1000e/netdev.c |   38 
 ++-
  1 files changed, 20 insertions(+), 18 deletions(-)
Thanks, I have added the patch to my queue for e1000e.


Thanks~


-- 
Richard Yang
Help you, Help me


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH 3/4] e1000e: Calculate the desc_len based on adapter type

2013-05-20 Thread Wei Yang
On Mon, May 20, 2013 at 02:37:48AM -0700, Jeff Kirsher wrote:
On 05/20/2013 01:15 AM, Wei Yang wrote:
 desc_len represents the size of descriptor in rx_ring. There are two kinds of
 rx descriptors, e1000_rx_desc_packet_split(32 byte) and
 e1000_rx_desc_extended(16 byte). Different adapter will use different rx
 descriptors.

 When allocating the dma space for this descriptor in current implementation,
 the code ignore the descriptor type and take it as e1000_rx_desc_packet_split
 in any case. This behavior will not effect the function, but will require
 double size of dma space.

 This patch will calculate the desc_len based on the adapter type.

 Tested on T420, which use e1000_rx_desc_extended and works fine.

 Signed-off-by: Wei Yang weiy...@linux.vnet.ibm.com
 ---
  drivers/net/ethernet/intel/e1000e/netdev.c |7 ++-
  1 files changed, 6 insertions(+), 1 deletions(-)
Thanks, I have added the patch to my queue for e1000e.


Thanks~



-- 
Richard Yang
Help you, Help me


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v2 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread David Miller
From: Eliezer Tamir eliezer.ta...@linux.intel.com
Date: Mon, 20 May 2013 12:39:59 +0300

 On 20/05/2013 10:54, David Miller wrote:
 From: Eliezer Tamir eliezer.ta...@linux.intel.com
 Date: Sun, 19 May 2013 13:25:33 +0300

 +#else /* CONFIG_INET_LL_RX_FLUSH */
 +
 +#define sk_valid_ll(sk) 0
 +#define sk_poll_ll(sk, nonblock) do {} while (0)
 +#define skb_mark_ll(napi, skb) do {} while (0)
 +#define sk_mark_ll(sk, skb) do {} while (0)

 Make these inline functions too, so that even if
 CONFIG_INET_LL_RX_POLL is disabled, the arguments and return values
 are still properly type checked.
 
 Is this what you had in mind?
 
 static inline bool sk_valid_ll(struct sock *sk)

Yes.

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v3 net-next 1/4] net: implement support for low latency socket polling

2013-05-20 Thread David Miller
From: Eric Dumazet eric.duma...@gmail.com
Date: Mon, 20 May 2013 08:29:24 -0700

 Part of this information was in your 0/4 text, but it wont be included
 in the git tree.

Yes it will, in the merge commit I make when I merge this stuff in.

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v2 net-next 0/4] net: low latency Ethernet device polling

2013-05-20 Thread Jeff Kirsher
On Sun, 2013-05-19 at 22:20 +0300, Eliezer Tamir wrote:
 On 19/05/2013 22:06, Or Gerlitz wrote:
  On Sun, May 19, 2013 at 1:25 PM, Eliezer Tamir
  eliezer.ta...@linux.intel.com wrote:
  This is an updated version of the code we posted on February.
 
  Last time you've placed a copy of the patchset in the rfc branch of
  git://github.com/jbrandeb/lls.git  - can you repost there V2 too?
 
  Or.
 
 Yes, but it will have to wait for tomorrow.
 It's on Jesse's github account and for him it's still the middle of the 
 weekend.
 
 -Eliezer

If Jesse has not done so already, I can put your series of patches on a
branch of my kernel net-next tree.  Let me know...


signature.asc
Description: This is a digitally signed message part
--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-20 Thread Andi Kleen
 guys, so what is going here, you were asking to put this series in
 net-next, and you expect each other driver implementing this ndo to
 follow this undocumented hack? or maybe this code was just left here
 by mistake from previous implementations and just needed to be
 removed?  please clarify.

This is discussed in 0/x

-Andi

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-20 Thread Or Gerlitz
On Mon, May 20, 2013 at 11:33 PM, Andi Kleen a...@firstfloor.org wrote:


 This is discussed in 0/x


I am not with you, V3's cover letter is empty, and in V2's cover letter I
don't see that
--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

2013-05-20 Thread Andi Kleen
On Mon, May 20, 2013 at 11:42:37PM +0300, Or Gerlitz wrote:
 On Mon, May 20, 2013 at 11:33 PM, Andi Kleen a...@firstfloor.org wrote:
 
 
  This is discussed in 0/x
 
 
 I am not with you, V3's cover letter is empty, and in V2's cover letter I
 don't see that

It was here. Looks like Eliezer didn't reuse the full cover later.

http://www.gossamer-threads.com/lists/linux/kernel/1715294?page=last


-- 
a...@linux.intel.com -- Speaking for myself only.

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v2 net-next 0/4] net: low latency Ethernet device polling

2013-05-20 Thread Jesse Brandeburg
On Mon, May 20, 2013 at 1:09 PM, Jeff Kirsher
jeffrey.t.kirs...@intel.comwrote:

 On Sun, 2013-05-19 at 22:20 +0300, Eliezer Tamir wrote:
  On 19/05/2013 22:06, Or Gerlitz wrote:
   On Sun, May 19, 2013 at 1:25 PM, Eliezer Tamir
   eliezer.ta...@linux.intel.com wrote:
   This is an updated version of the code we posted on February.
  
   Last time you've placed a copy of the patchset in the rfc branch of
   git://github.com/jbrandeb/lls.git  - can you repost there V2 too?


the latest set (the v3 changes) were posted to
the rfcv2 branch on git://github.com/jbrandeb/lls.git
--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired


Re: [E1000-devel] [PATCH v2 net-next 0/4] net: low latency Ethernet device polling

2013-05-20 Thread Brandeburg, Jesse
On Sun, 19 May 2013, Or Gerlitz wrote:
 On Sun, May 19, 2013 at 1:25 PM, Eliezer Tamir
 eliezer.ta...@linux.intel.com wrote:
  This is an updated version of the code we posted on February.
 
 Last time you've placed a copy of the patchset in the rfc branch of
 git://github.com/jbrandeb/lls.git  - can you repost there V2 too?

done, sorry for the dup, the first post got html munged by gmail web 
interface.

the latest set (the v3 changes) were posted to
the rfcv2 branch on git://github.com/jbrandeb/lls.git

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel#174; Ethernet, visit 
http://communities.intel.com/community/wired