* [PATCH net-next 7/7] be2net: Enable RSS UDP hashing for Lancer and Skyhawk
From: Padmanabh Ratnakar @ 2012-07-12 13:57 UTC (permalink / raw)
To: netdev; +Cc: Padmanabh Ratnakar
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
---
drivers/net/ethernet/emulex/benet/be.h | 3 +++
drivers/net/ethernet/emulex/benet/be_cmds.c | 7 +++++++
drivers/net/ethernet/emulex/benet/be_cmds.h | 2 ++
3 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index e2dfe31..330d59a 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -457,6 +457,9 @@ struct be_adapter {
#define lancer_chip(adapter) ((adapter->pdev->device == OC_DEVICE_ID3) || \
(adapter->pdev->device == OC_DEVICE_ID4))
+#define skyhawk_chip(adapter) (adapter->pdev->device == OC_DEVICE_ID5)
+
+
#define be_roce_supported(adapter) ((adapter->if_type == SLI_INTF_TYPE_3 || \
adapter->sli_family == SKYHAWK_SLI_FAMILY) && \
(adapter->function_mode & RDMA_ENABLED))
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 8730f0e..ddfca65 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -1792,6 +1792,13 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
req->if_id = cpu_to_le32(adapter->if_handle);
req->enable_rss = cpu_to_le16(RSS_ENABLE_TCP_IPV4 | RSS_ENABLE_IPV4 |
RSS_ENABLE_TCP_IPV6 | RSS_ENABLE_IPV6);
+
+ if (lancer_chip(adapter) || skyhawk_chip(adapter)) {
+ req->hdr.version = 1;
+ req->enable_rss |= cpu_to_le16(RSS_ENABLE_UDP_IPV4 |
+ RSS_ENABLE_UDP_IPV6);
+ }
+
req->cpu_table_size_log2 = cpu_to_le16(fls(table_size) - 1);
memcpy(req->cpu_table, rsstable, table_size);
memcpy(req->hash, myhash, sizeof(myhash));
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h
index 88f7237..45d70de 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.h
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.h
@@ -1089,6 +1089,8 @@ struct be_cmd_resp_query_fw_cfg {
#define RSS_ENABLE_TCP_IPV4 0x2
#define RSS_ENABLE_IPV6 0x4
#define RSS_ENABLE_TCP_IPV6 0x8
+#define RSS_ENABLE_UDP_IPV4 0x10
+#define RSS_ENABLE_UDP_IPV6 0x20
struct be_cmd_req_rss_config {
struct be_cmd_req_hdr hdr;
--
1.6.0.2
^ permalink raw reply related
* Re: [PATCH net-next 7/7] be2net: Enable RSS UDP hashing for Lancer and Skyhawk
From: Eric Dumazet @ 2012-07-12 14:10 UTC (permalink / raw)
To: Padmanabh Ratnakar; +Cc: netdev
In-Reply-To: <58046138-832a-49a2-84a8-fa682a74162e@exht1.ad.emulex.com>
On Thu, 2012-07-12 at 19:27 +0530, Padmanabh Ratnakar wrote:
> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
> ---
> drivers/net/ethernet/emulex/benet/be.h | 3 +++
> drivers/net/ethernet/emulex/benet/be_cmds.c | 7 +++++++
> drivers/net/ethernet/emulex/benet/be_cmds.h | 2 ++
> 3 files changed, 12 insertions(+), 0 deletions(-)
It would be nice to add a bit of documentation on this, and what
components are used from the tuple (dst addr, src addr, dst port, src
port)
^ permalink raw reply
* [PATCH net-next] net: ftgmac100/ftmac100: dont pull too much data
From: Eric Dumazet @ 2012-07-12 14:19 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Po-Yu Chuang
From: Eric Dumazet <edumazet@google.com>
Drivers should pull only ethernet header from page frag
to skb->head.
Pulling 64 bytes is too much for TCP (without options) on IPv4.
However, it makes sense to pull all the frame if it fits the
128 bytes bloc allocated for skb->head, to free one page per
small incoming frame.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Po-Yu Chuang <ratbert@faraday-tech.com>
---
drivers/net/ethernet/faraday/ftgmac100.c | 9 +++++++--
drivers/net/ethernet/faraday/ftmac100.c | 11 +++++++----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 16b0704..74d749e 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -479,9 +479,14 @@ static bool ftgmac100_rx_packet(struct ftgmac100 *priv, int *processed)
rxdes = ftgmac100_current_rxdes(priv);
} while (!done);
- if (skb->len <= 64)
+ /* Small frames are copied into linear part of skb to free one page */
+ if (skb->len <= 128) {
skb->truesize -= PAGE_SIZE;
- __pskb_pull_tail(skb, min(skb->len, 64U));
+ __pskb_pull_tail(skb, skb->len);
+ } else {
+ /* We pull the minimum amount into linear part */
+ __pskb_pull_tail(skb, ETH_HLEN);
+ }
skb->protocol = eth_type_trans(skb, netdev);
netdev->stats.rx_packets++;
diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
index 829b109..b901a01 100644
--- a/drivers/net/ethernet/faraday/ftmac100.c
+++ b/drivers/net/ethernet/faraday/ftmac100.c
@@ -441,11 +441,14 @@ static bool ftmac100_rx_packet(struct ftmac100 *priv, int *processed)
skb->len += length;
skb->data_len += length;
- /* page might be freed in __pskb_pull_tail() */
- if (length > 64)
+ if (length > 128) {
skb->truesize += PAGE_SIZE;
- __pskb_pull_tail(skb, min(length, 64));
-
+ /* We pull the minimum amount into linear part */
+ __pskb_pull_tail(skb, ETH_HLEN);
+ } else {
+ /* Small frames are copied into linear part to free one page */
+ __pskb_pull_tail(skb, length);
+ }
ftmac100_alloc_rx_page(priv, rxdes, GFP_ATOMIC);
ftmac100_rx_pointer_advance(priv);
^ permalink raw reply related
* [net-next:master 90/102] net/ipv4/route.c:1283:9: warning: unused variable 'saddr'
From: Fengguang Wu @ 2012-07-12 14:34 UTC (permalink / raw)
To: David S. Miller; +Cc: kernel-janitors, netdev
Hi David,
There are new compile warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 3ec5a261aef55a32664bffd335e5c32aeadf3215
commit: e47a185b31dd2acd424fac7dc0efb96fc5b31a33 [90/102] ipv4: Generalize ip_do_redirect() and hook into new dst_ops->redirect.
All warnings:
net/ipv4/route.c: In function 'ip_do_redirect':
net/ipv4/route.c:1283:9: warning: unused variable 'saddr' [-Wunused-variable]
net/ipv4/route.c:1282:9: warning: unused variable 'daddr' [-Wunused-variable]
vim +1283 net/ipv4/route.c
1280 __be32 old_gw = ip_hdr(skb)->saddr;
1281 struct net_device *dev = skb->dev;
1282 __be32 daddr = iph->daddr;
> 1283 __be32 saddr = iph->saddr;
1284 struct in_device *in_dev;
1285 struct neighbour *n;
1286 struct rtable *rt;
..because the saddr/daddr variables are used inside
#ifdef CONFIG_IP_ROUTE_VERBOSE
if (IN_DEV_LOG_MARTIANS(in_dev))
net_info_ratelimited("Redirect from %pI4 on %s about %pI4 ignored\n"
" Advised path = %pI4 -> %pI4\n",
&old_gw, dev->name, &new_gw,
&saddr, &daddr);
#endif
---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com> Intel Corporation
^ permalink raw reply
* Re: [PATCH net-next] net: ftgmac100/ftmac100: dont pull too much data
From: Po-Yu Chuang @ 2012-07-12 14:35 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Po-Yu Chuang
In-Reply-To: <1342102778.3265.8272.camel@edumazet-glaptop>
Thank you Eric. :-)
regards,
Po-Yu Chuang
On Thu, Jul 12, 2012 at 10:19 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> From: Eric Dumazet <edumazet@google.com>
>
> Drivers should pull only ethernet header from page frag
> to skb->head.
>
> Pulling 64 bytes is too much for TCP (without options) on IPv4.
>
> However, it makes sense to pull all the frame if it fits the
> 128 bytes bloc allocated for skb->head, to free one page per
> small incoming frame.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Po-Yu Chuang <ratbert@faraday-tech.com>
> ---
> drivers/net/ethernet/faraday/ftgmac100.c | 9 +++++++--
> drivers/net/ethernet/faraday/ftmac100.c | 11 +++++++----
> 2 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index 16b0704..74d749e 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -479,9 +479,14 @@ static bool ftgmac100_rx_packet(struct ftgmac100 *priv, int *processed)
> rxdes = ftgmac100_current_rxdes(priv);
> } while (!done);
>
> - if (skb->len <= 64)
> + /* Small frames are copied into linear part of skb to free one page */
> + if (skb->len <= 128) {
> skb->truesize -= PAGE_SIZE;
> - __pskb_pull_tail(skb, min(skb->len, 64U));
> + __pskb_pull_tail(skb, skb->len);
> + } else {
> + /* We pull the minimum amount into linear part */
> + __pskb_pull_tail(skb, ETH_HLEN);
> + }
> skb->protocol = eth_type_trans(skb, netdev);
>
> netdev->stats.rx_packets++;
> diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
> index 829b109..b901a01 100644
> --- a/drivers/net/ethernet/faraday/ftmac100.c
> +++ b/drivers/net/ethernet/faraday/ftmac100.c
> @@ -441,11 +441,14 @@ static bool ftmac100_rx_packet(struct ftmac100 *priv, int *processed)
> skb->len += length;
> skb->data_len += length;
>
> - /* page might be freed in __pskb_pull_tail() */
> - if (length > 64)
> + if (length > 128) {
> skb->truesize += PAGE_SIZE;
> - __pskb_pull_tail(skb, min(length, 64));
> -
> + /* We pull the minimum amount into linear part */
> + __pskb_pull_tail(skb, ETH_HLEN);
> + } else {
> + /* Small frames are copied into linear part to free one page */
> + __pskb_pull_tail(skb, length);
> + }
> ftmac100_alloc_rx_page(priv, rxdes, GFP_ATOMIC);
>
> ftmac100_rx_pointer_advance(priv);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: Is TCP vulneribility patch (as in RFC 5961) done in linux?
From: Randy Dunlap @ 2012-07-12 14:37 UTC (permalink / raw)
To: Kiran (Kiran Kumar) Kella; +Cc: linux-kernel@vger.kernel.org, netdev
In-Reply-To: <68700EDA775E5E47B5EBA9FF8AC0F15C07506A@SJEXCHMB09.corp.ad.broadcom.com>
On 07/12/2012 05:40 AM, Kiran (Kiran Kumar) Kella wrote:
> Hi,
>
> I just now checked in the kernel archives if the patch in section 3.2 mentioned in RFC 5961 for RST attacks with predictable sequence numbers.
> I see some discussion happened in 2004 timeframe.
> I was just wondering if in the latest linux source, the patch is made available.
>
> Appreciate your quick response in this regard.
>
> Thanks,
> Kiran
You should ask this question on the netdev mailing list (cc-ed).
--
~Randy
^ permalink raw reply
* Re: [PATCH net-next] net: ftgmac100/ftmac100: dont pull too much data
From: David Miller @ 2012-07-12 14:38 UTC (permalink / raw)
To: ratbert.chuang; +Cc: eric.dumazet, netdev, ratbert
In-Reply-To: <CANutaR-ER_+Y6FSSoA-31u0qLRBeU+ddrKwrTNujHsYeQhWVyQ@mail.gmail.com>
From: Po-Yu Chuang <ratbert.chuang@gmail.com>
Date: Thu, 12 Jul 2012 22:35:18 +0800
> Thank you Eric. :-)
You can thank him by providing an "Acked-by: ..." tag in your
reply.
^ permalink raw reply
* Re: [net-next:master 90/102] net/ipv4/route.c:1283:9: warning: unused variable 'saddr'
From: David Miller @ 2012-07-12 14:40 UTC (permalink / raw)
To: fengguang.wu; +Cc: kernel-janitors, netdev
In-Reply-To: <20120712143449.GA19890@localhost>
There's not need to report these to kernel-janitors if it's a
net-next specific issue and I'm going to fix it up 5 minutes
after you report it.
====================
[PATCH] ipv4: Fix warnings in ip_do_redirect() for some configurations.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv4/route.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 23bbe29..9319bf1 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1275,12 +1275,9 @@ static void rt_del(unsigned int hash, struct rtable *rt)
static void ip_do_redirect(struct dst_entry *dst, struct sk_buff *skb)
{
- const struct iphdr *iph = (const struct iphdr *) skb->data;
__be32 new_gw = icmp_hdr(skb)->un.gateway;
__be32 old_gw = ip_hdr(skb)->saddr;
struct net_device *dev = skb->dev;
- __be32 daddr = iph->daddr;
- __be32 saddr = iph->saddr;
struct in_device *in_dev;
struct neighbour *n;
struct rtable *rt;
@@ -1336,11 +1333,16 @@ static void ip_do_redirect(struct dst_entry *dst, struct sk_buff *skb)
reject_redirect:
#ifdef CONFIG_IP_ROUTE_VERBOSE
- if (IN_DEV_LOG_MARTIANS(in_dev))
+ if (IN_DEV_LOG_MARTIANS(in_dev)) {
+ const struct iphdr *iph = (const struct iphdr *) skb->data;
+ __be32 daddr = iph->daddr;
+ __be32 saddr = iph->saddr;
+
net_info_ratelimited("Redirect from %pI4 on %s about %pI4 ignored\n"
" Advised path = %pI4 -> %pI4\n",
&old_gw, dev->name, &new_gw,
&saddr, &daddr);
+ }
#endif
;
}
--
1.7.10.4
^ permalink raw reply related
* [patch] qlge: fix an "&&" vs "||" bug
From: Dan Carpenter @ 2012-07-12 14:47 UTC (permalink / raw)
To: Anirban Chakraborty
Cc: Jitendra Kalsaria, Ron Mercer, linux-driver, netdev,
kernel-janitors
The condition is always true so WOL will never work.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
index 3d4462b..6f316ab 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
@@ -440,7 +440,7 @@ static int ql_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
unsigned short ssys_dev = qdev->pdev->subsystem_device;
/* WOL is only supported for mezz card. */
- if (ssys_dev != QLGE_MEZZ_SSYS_ID_068 ||
+ if (ssys_dev != QLGE_MEZZ_SSYS_ID_068 &&
ssys_dev != QLGE_MEZZ_SSYS_ID_180) {
netif_info(qdev, drv, qdev->ndev,
"WOL is only supported for mezz card\n");
^ permalink raw reply related
* [patch -next] tcp: update a call to tcp_metric_set()
From: Dan Carpenter @ 2012-07-12 14:46 UTC (permalink / raw)
To: David S. Miller
Cc: Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
Patrick McHardy, netdev, kernel-janitors
We changed how the metrics were stored so RTAX_CWND needs to be changed
to TCP_METRIC_CWND or it leads to write past the end of the
->tcpm_vals[] array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 1fd83d3..c6b0f20 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -412,7 +412,8 @@ void tcp_update_metrics(struct sock *sk)
max(tp->snd_cwnd >> 1, tp->snd_ssthresh));
if (!tcp_metric_locked(tm, TCP_METRIC_CWND)) {
val = tcp_metric_get(tm, TCP_METRIC_CWND);
- tcp_metric_set(tm, RTAX_CWND, (val + tp->snd_cwnd) >> 1);
+ tcp_metric_set(tm, TCP_METRIC_CWND,
+ (val + tp->snd_cwnd) >> 1);
}
} else {
/* Else slow start did not finish, cwnd is non-sense,
^ permalink raw reply related
* Re: [patch -next] tcp: update a call to tcp_metric_set()
From: David Miller @ 2012-07-12 14:50 UTC (permalink / raw)
To: dan.carpenter; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, kernel-janitors
In-Reply-To: <20120712144637.GA24202@elgon.mountain>
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 12 Jul 2012 17:46:38 +0300
> We changed how the metrics were stored so RTAX_CWND needs to be changed
> to TCP_METRIC_CWND or it leads to write past the end of the
> ->tcpm_vals[] array.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Update your tree, this is already fixed.
^ permalink raw reply
* Re: [net-next:master 90/102] net/ipv4/route.c:1283:9: warning: unused variable 'saddr'
From: Fengguang Wu @ 2012-07-12 14:54 UTC (permalink / raw)
To: David Miller; +Cc: kernel-janitors, netdev
In-Reply-To: <20120712.074058.753681400854318989.davem@davemloft.net>
OK!
On Thu, Jul 12, 2012 at 07:40:58AM -0700, David Miller wrote:
>
> There's not need to report these to kernel-janitors if it's a
> net-next specific issue and I'm going to fix it up 5 minutes
> after you report it.
>
> ====================
> [PATCH] ipv4: Fix warnings in ip_do_redirect() for some configurations.
>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> net/ipv4/route.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 23bbe29..9319bf1 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1275,12 +1275,9 @@ static void rt_del(unsigned int hash, struct rtable *rt)
>
> static void ip_do_redirect(struct dst_entry *dst, struct sk_buff *skb)
> {
> - const struct iphdr *iph = (const struct iphdr *) skb->data;
> __be32 new_gw = icmp_hdr(skb)->un.gateway;
> __be32 old_gw = ip_hdr(skb)->saddr;
> struct net_device *dev = skb->dev;
> - __be32 daddr = iph->daddr;
> - __be32 saddr = iph->saddr;
> struct in_device *in_dev;
> struct neighbour *n;
> struct rtable *rt;
> @@ -1336,11 +1333,16 @@ static void ip_do_redirect(struct dst_entry *dst, struct sk_buff *skb)
>
> reject_redirect:
> #ifdef CONFIG_IP_ROUTE_VERBOSE
> - if (IN_DEV_LOG_MARTIANS(in_dev))
> + if (IN_DEV_LOG_MARTIANS(in_dev)) {
> + const struct iphdr *iph = (const struct iphdr *) skb->data;
> + __be32 daddr = iph->daddr;
> + __be32 saddr = iph->saddr;
> +
> net_info_ratelimited("Redirect from %pI4 on %s about %pI4 ignored\n"
> " Advised path = %pI4 -> %pI4\n",
> &old_gw, dev->name, &new_gw,
> &saddr, &daddr);
> + }
> #endif
> ;
> }
> --
> 1.7.10.4
^ permalink raw reply
* Re: [PATCH v2 0/2] net: support for NS8390 based ethernet on ColdFire CPU boards
From: David Miller @ 2012-07-12 14:55 UTC (permalink / raw)
To: gerg; +Cc: netdev, linux-m68k
In-Reply-To: <1341445800-396-1-git-send-email-gerg@snapgear.com>
From: <gerg@snapgear.com>
Date: Thu, 5 Jul 2012 09:49:58 +1000
>
> This is version 2 of patches that add platform support for using the NS8390
> based ethernet ports used on some ColdFire CPU boards. This version
> incorporates only minor changes from the first.
>
> Patches to use these NS8390 devices on ColdFire boards have existed
> out-of-tree for years. Some of the base IO definitions (those in
> arch/m68k/include/asm/mcfne.h) have been in mainline, but unused for most
> of that time.
>
> The first patch just neatens up mcfne.h (moving it to mcf8390.h). The
> second patch is the platform driver. The first patch would normaly just
> go through the m68knommu git tree, but I figured keeping these together made
> more sense.
Applied, thanks.
Can you explain why we've had this completely unused header
file mcfne.h in the tree? Was it used by some external driver
sources that were never merged?
^ permalink raw reply
* Re: [RFC PATCH v2] tcp: TCP Small Queues
From: Tom Herbert @ 2012-07-12 14:55 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, rick.jones2, ycheng, dave.taht, netdev, codel,
mattmathis, nanditad, ncardwell, andrewmcgr
In-Reply-To: <1342079487.3265.8245.camel@edumazet-glaptop>
On Thu, Jul 12, 2012 at 12:51 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Thu, 2012-07-12 at 00:37 -0700, David Miller wrote:
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Thu, 12 Jul 2012 09:34:19 +0200
>>
>> > On Thu, 2012-07-12 at 01:49 +0200, Eric Dumazet wrote:
>> >
>> >> The 10Gb receiver is a net-next kernel, but the 1Gb receiver is a 2.6.38
>> >> ubuntu kernel. They probably have very different TCP behavior.
>> >
>> >
>> > I tested TSQ on bnx2x and 10Gb links.
>> >
>> > I get full rate even using 65536 bytes for
>> > the /proc/sys/net/ipv4/tcp_limit_output_bytes tunable
>>
>> Great work Eric.
>
> Thanks !
>
This is indeed great work! A couple of comments...
Do you know if there are are any qdiscs that function less efficiently
when we are restricting the number of packets? For instance, will HTB
work as expected in various configurations?
One extension to this work be to make the limit dynamic and mostly
eliminate the tunable. I'm thinking we might be able to correlate the
limit to the BQL limit of the egress queue for the flow it there is
one.
Assuming all work conserving qdiscs the minimal amount of outstanding
host data for a queue could be associated with the BQL limit of the
egress NIC queue. We want to minimize the outstanding data so that:
sum(data_of_tcp_flows_share_same_queue) > bql_limit_for _queue
So this could imply a per flow limit of:
tcp_limit = max(bql_limit - bql_inflight, one_packet)
For a single active connection on a queue, the tcp_limit is equal to
the BQL limit. Once the BQL limit is hit in the NIC, we only need one
packet outstanding per flow to maintain flow control. For fairness,
we might need "one_packet" to actually be max GSO data. Also, this
disregards any latency of scheduling and running the tasklet, that
might need to be taken into account also.
Tom
^ permalink raw reply
* Re: [patch -next] smsc95xx: signedness bug in get_regs()
From: David Miller @ 2012-07-12 14:55 UTC (permalink / raw)
To: dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA
Cc: steve.glendinning-sdUf+H5yV5I,
emeric.vigier-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/,
netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20120711063251.GB11812-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Date: Wed, 11 Jul 2012 09:32:51 +0300
> "retval" has to be a signed integer for the error handling to work.
>
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH net-next v2 0/7] ieee802.15.4 general fixes
From: David Miller @ 2012-07-12 14:56 UTC (permalink / raw)
To: alex.bluesman.smirnov; +Cc: eric.dumazet, netdev
In-Reply-To: <1341991368-11800-1-git-send-email-alex.bluesman.smirnov@gmail.com>
From: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Date: Wed, 11 Jul 2012 11:22:41 +0400
> Dear David, Eric,
>
> this patch-set is mostly intended to fix sparse and LOCKDEP warnings.
> It mostly contains some my previous patches reworked and extended according
> to the hints from Eric Dumazet and Fengguang Wu. Many thanks to they!
>
> Changes since v1:
> 1. A new patch from Tony Cheneau was added. The fragmentation stops working
> after some amount of packets sent. This patch fixes this issue.
> 2. 6lowpan fragment deleting routine: I removed spinlocks from timer_expired
> handler and use spin_lock_bh to disable concurrency races with timer interrupt.
> 3. at86rf230 irq handler was a little bit modified
Series applied, but you don't need to grab a spinlock to only
load one interger from some datastructure. I mean:
lock();
ret = p->foo;
unlock();
is completely pointless.
^ permalink raw reply
* Re: [PATCH net-next] netxen: fix link notification order
From: David Miller @ 2012-07-12 14:57 UTC (permalink / raw)
To: fbl; +Cc: netdev, sony.chacko, rajesh.borundia
In-Reply-To: <1342033015-31442-1-git-send-email-fbl@redhat.com>
From: Flavio Leitner <fbl@redhat.com>
Date: Wed, 11 Jul 2012 15:56:55 -0300
> First update the adapter variables with the current speed and
> mode before fire the notification. Otherwise, the get_settings()
> may provide old values.
>
> Signed-off-by: Flavio Leitner <fbl@redhat.com>
Applied.
^ permalink raw reply
* Re: [PATCH 02/16] ipv4: Deliver ICMP redirects to sockets too.
From: Hiroaki SHIMODA @ 2012-07-12 14:58 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20120712.011049.831106026936792516.davem@davemloft.net>
On Thu, 12 Jul 2012 01:10:49 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
>
> And thus, we can remove the ping_err() hack.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> net/ipv4/icmp.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
> index 18e39d1..5885146 100644
> --- a/net/ipv4/icmp.c
> +++ b/net/ipv4/icmp.c
> @@ -782,13 +782,7 @@ static void icmp_redirect(struct sk_buff *skb)
> break;
> }
>
> - /* Ping wants to see redirects.
> - * Let's pretend they are errors of sorts... */
> - if (iph->protocol == IPPROTO_ICMP &&
> - iph->ihl >= 5 &&
> - pskb_may_pull(skb, (iph->ihl<<2)+8)) {
> - ping_err(skb, icmp_hdr(skb)->un.gateway);
> - }
> + icmp_socket_deliver(skb, icmp_hdr(skb)->un.gateway);
icmp_redirect() just checks skb->len is larger than
sizeof(struct iphdr) and then ping_err() is called.
In ping_err(), *icmph is derived from following code without
sanity check of skb->len. So, I think avobe deleted checks about
skb->len need to move to ping_err() in case of packets are malformed.
struct icmphdr *icmph = (struct icmphdr *)(skb->data+(iph->ihl<<2))
^ permalink raw reply
* Re: [PATCH 1/1] net: sched: add ipset ematch
From: David Miller @ 2012-07-12 15:00 UTC (permalink / raw)
To: fw; +Cc: netdev, kadlec
In-Reply-To: <1342040217-5637-1-git-send-email-fw@strlen.de>
From: Florian Westphal <fw@strlen.de>
Date: Wed, 11 Jul 2012 22:56:57 +0200
> Can be used to match packets against netfilter ip sets created via ipset(8).
> skb->sk_iif is used as 'incoming interface', skb->dev is 'outgoing interface'.
>
> Since ipset is usually called from netfilter, the ematch
> initializes a fake xt_action_param, pulls the ip header into the
> linear area and also sets skb->data to the IP header (otherwise
> matching Layer 4 set types doesn't work).
>
> Tested-by: Mr Dash Four <mr.dash.four@googlemail.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Applied, thanks.
^ permalink raw reply
* Re: [net-next 0/5][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2012-07-12 15:01 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1341997769-22034-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 11 Jul 2012 02:09:24 -0700
> This series contains updates to ixgbe.
>
> The following are changes since commit 4715213d9cf40285492fff4092bb1fa8e982f632:
> bridge: fix endian
> and are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
>
> Alexander Duyck (5):
> ixgbe: count q_vectors instead of MSI-X vectors
> ixgbe: Add upper limit to ring features
> ixgbe: Add feature offset value to ring features
> ixgbe: Clean up a useless switch statement and dead code in
> configure_srrctl
> ixgbe: Merge RSS and flow director ring register caching and
> configuration
Pulled, thanks Jeff.
^ permalink raw reply
* Re: [PATCH 02/16] ipv4: Deliver ICMP redirects to sockets too.
From: David Miller @ 2012-07-12 15:06 UTC (permalink / raw)
To: shimoda.hiroaki; +Cc: netdev
In-Reply-To: <20120712235837.4d611326830a16f9a035dd75@gmail.com>
From: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Date: Thu, 12 Jul 2012 23:58:37 +0900
> So, I think avobe deleted checks about skb->len need to move to
> ping_err() in case of packets are malformed.
You would be wrong, the check belongs in icmp_socket_deliver().
====================
>From f0a70e902f483295a8b6d74ef4393bc577b703d7 Mon Sep 17 00:00:00 2001
From: "David S. Miller" <davem@davemloft.net>
Date: Thu, 12 Jul 2012 08:06:04 -0700
Subject: [PATCH] ipv4: Put proper checks into icmp_socket_deliver().
All handler->err() routines expect that we've done a pskb_may_pull()
test to make sure that IP header length + 8 bytes can be safely
pulled.
Reported-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv4/icmp.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index d01aeb4..ea3a996 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -640,6 +640,12 @@ static void icmp_socket_deliver(struct sk_buff *skb, u32 info)
const struct net_protocol *ipprot;
int protocol = iph->protocol;
+ /* Checkin full IP header plus 8 bytes of protocol to
+ * avoid additional coding at protocol handlers.
+ */
+ if (!pskb_may_pull(skb, iph->ihl * 4 + 8))
+ return;
+
raw_icmp_error(skb, protocol, info);
rcu_read_lock();
@@ -733,12 +739,6 @@ static void icmp_unreach(struct sk_buff *skb)
goto out;
}
- /* Checkin full IP header plus 8 bytes of protocol to
- * avoid additional coding at protocol handlers.
- */
- if (!pskb_may_pull(skb, iph->ihl * 4 + 8))
- goto out;
-
icmp_socket_deliver(skb, info);
out:
--
1.7.10.4
^ permalink raw reply related
* Re: [patch net-next 0/3] team: couple of patches
From: David Miller @ 2012-07-12 15:11 UTC (permalink / raw)
To: jpirko; +Cc: netdev
In-Reply-To: <1342020844-3547-1-git-send-email-jpirko@redhat.com>
From: Jiri Pirko <jpirko@redhat.com>
Date: Wed, 11 Jul 2012 17:34:01 +0200
> Jiri Pirko (3):
> team: use function team_port_txable() for determing enabled and up
> port
> team: add broadcast mode
> team: make team_port_enabled() and team_port_txable() static inline
All applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next 01/11] sfc: Implement 128-bit writes for efx_writeo_page
From: David Miller @ 2012-07-12 15:13 UTC (permalink / raw)
To: bhutchings; +Cc: netdev, linux-net-drivers
In-Reply-To: <1342048518.2613.60.camel@bwh-desktop.uk.solarflarecom.com>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 12 Jul 2012 00:15:18 +0100
> Add support for writing a TX descriptor to the NIC in one PCIe
> transaction on x86_64 machines.
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This absolutely does not belong in a driver.
^ permalink raw reply
* Re: [patch net-next 0/3] team: couple of patches
From: David Miller @ 2012-07-12 15:14 UTC (permalink / raw)
To: jpirko; +Cc: netdev
In-Reply-To: <20120712.081124.1207448876900334978.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Thu, 12 Jul 2012 08:11:24 -0700 (PDT)
> From: Jiri Pirko <jpirko@redhat.com>
> Date: Wed, 11 Jul 2012 17:34:01 +0200
>
>> Jiri Pirko (3):
>> team: use function team_port_txable() for determing enabled and up
>> port
>> team: add broadcast mode
>> team: make team_port_enabled() and team_port_txable() static inline
>
> All applied, thanks.
Jiri, btw, any chance I can convince you to remove the EXPERIMENTAL
Kconfig dependency?
Code I've written and checked in myself over the past few days is
several orders of magnitude more experimental than the team driver
is :-)
^ permalink raw reply
* Re: [PATCH net-next 0/7] be2net updates
From: David Miller @ 2012-07-12 15:16 UTC (permalink / raw)
To: padmanabh.ratnakar; +Cc: netdev
In-Reply-To: <a8f2c513-d398-4be6-a059-242dfc2c052a@exht1.ad.emulex.com>
From: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Date: Thu, 12 Jul 2012 19:25:01 +0530
> Padmanabh Ratnakar (7):
> be2net: Fix error while toggling autoneg of pause parameters
> be2net : Fix die temperature stat for Lancer
> be2net: Fix initialization sequence for Lancer
> be2net: Activate new FW after FW download for Lancer
> be2net: Fix cleanup path when EQ creation fails
> be2net: Fix port name in message during driver load
> be2net: Enable RSS UDP hashing for Lancer and Skyhawk
All applied, but like others have said you should document in
the driver what exactly the chip uses in it's RSS calculations
and in what circumstances.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox