* Re: pull request: wireless-next-2.6 2010-07-29
From: David Miller @ 2010-07-31 4:49 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20100729191245.GF2424@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Thu, 29 Jul 2010 15:12:46 -0400
> Yet another slew of changes intended for 2.6.36...
>
> For the first time, this pull request includes a batch of bluetooth
> stuff by way of Marcel. Some upcoming developments are likely to
> require more extensive integration between 802.11 and Bluetooth bits, so
> Marcel's tree will be feeding wireless-next-2.6 for a while.
>
> The rest is the usual stuff from the usual suspects -- mostly driver
> updates with the usual strong showings from ath9k and iwlwifi, this time
> joined by libertas in particular.
>
> This is a "for-davem" branch, so hopefully there will be no pain for you
> to pull this time. :-)
Pulled, thanks a lot John.
^ permalink raw reply
* Re: [PATCH v4] can: Add driver for esd CAN-USB/2 device
From: David Miller @ 2010-07-31 4:57 UTC (permalink / raw)
To: matthias.fuchs-iOnpLzIbIdM
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
Socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
linux-usb-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <201007271542.40997.matthias.fuchs-iOnpLzIbIdM@public.gmane.org>
From: Matthias Fuchs <matthias.fuchs-iOnpLzIbIdM@public.gmane.org>
Date: Tue, 27 Jul 2010 15:42:40 +0200
> +#ifdef CONFIG_SYSFS
> + if (device_create_file(&intf->dev, &dev_attr_firmware))
> + dev_err(&intf->dev,
> + "Couldn't create device file for firmware\n");
This ifdef protection is unnecessary, device_create_file() et al.
are available always, so please remove these SYSFS ifdef tests.
Thanks.
--
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] tun: keep link (carrier) state up to date
From: David Miller @ 2010-07-31 5:06 UTC (permalink / raw)
To: nolan; +Cc: netdev
In-Reply-To: <1280274823.23381.59.camel@voxel>
From: Nolan Leake <nolan@cumulusnetworks.com>
Date: Tue, 27 Jul 2010 16:53:43 -0700
> Currently, only ethtool can get accurate link state of a tap device.
> With this patch, IFF_RUNNING and IF_OPER_UP/DOWN are kept up to date as
> well.
>
> Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>
Applied, thanks Nolan.
^ permalink raw reply
* Re: [PATCH] ucc_geth: fix UCC device number in debug message
From: David Miller @ 2010-07-31 5:09 UTC (permalink / raw)
To: geomatsi; +Cc: netdev, leoli
In-Reply-To: <1280340321-20276-1-git-send-email-geomatsi@gmail.com>
From: Sergey Matyukevich <geomatsi@gmail.com>
Date: Wed, 28 Jul 2010 22:05:21 +0400
> This patch contains a fix for UCC device number in verbose debug message.
>
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Applied, thank you.
^ permalink raw reply
* Re: [PATCH -next] net: ks8842 depends on DMA_ENGINE
From: David Miller @ 2010-07-31 5:10 UTC (permalink / raw)
To: randy.dunlap; +Cc: sfr, linux-next, linux-kernel, netdev
In-Reply-To: <20100729101427.2aafd6e7.randy.dunlap@oracle.com>
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Thu, 29 Jul 2010 10:14:27 -0700
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> ks8842 uses dma channel functions, so it should depend on DMA_ENGINE.
>
> ERROR: "__dma_request_channel" [drivers/net/ks8842.ko] undefined!
> ERROR: "dma_release_channel" [drivers/net/ks8842.ko] undefined!
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Applied, thanks Randy.
^ permalink raw reply
* Re: [PATCH] drivers: Fixes a typo from "dev" to "ndev" that caused compilation erros.
From: David Miller @ 2010-07-31 5:20 UTC (permalink / raw)
To: henrique.camargo
Cc: chaithrika, srk, khilman, jpirko, netdev, linux-kernel, segooon
In-Reply-To: <AANLkTiko540hMAUhaJr5mNKzFK2-vBOTZmEOxZWZv7ci@mail.gmail.com>
From: Henrique Camargo <henrique.camargo@ensitec.com.br>
Date: Thu, 29 Jul 2010 12:51:49 -0300
> From: Henrique Camargo
>From lines need valid email addresses. But in this case since you
are the person who wrote the patch, adding another From: tag in
the message body is superfluous and you can just omit it.
> diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> index 25e14d2..b89b7bf 100644
> --- a/drivers/net/davinci_emac.c
> +++ b/drivers/net/davinci_emac.c
> @@ -1182,8 +1182,8 @@ static int emac_net_tx_complete(struct emac_priv *priv,
> struct net_device *ndev = priv->ndev;
> u32 cnt;
>
> - if (unlikely(num_tokens && netif_queue_stopped(dev)))
> - netif_start_queue(dev);
> + if (unlikely(num_tokens && netif_queue_stopped(ndev)))
> + netif_start_queue(ndev);
Your patch is corrupted, tab characters have been turned into spaces by
your email client.
This makes your patch unusable.
Please fix up these errors and resubmit your patch.
Thank you.
^ permalink raw reply
* Re: [PATCH] tcp: cookie transactions setsockopt memory leak
From: David Miller @ 2010-07-31 6:05 UTC (permalink / raw)
To: dp
Cc: kuznet, jmorris, kaber, pekkas, yoshfuji, eric.dumazet,
ilpo.jarvinen, akpm, steve, netdev, linux-kernel,
william.allen.simpson
In-Reply-To: <AANLkTinHWJviHmhVcFQkobsgxa4-AaFUpHmd1wybiB+u@mail.gmail.com>
From: Dmitry Popov <dp@highloadlab.com>
Date: Thu, 29 Jul 2010 15:59:36 +0400
> From: Dmitry Popov <dp@highloadlab.com>
>
> There is a bug in do_tcp_setsockopt(net/ipv4/tcp.c),
> TCP_COOKIE_TRANSACTIONS case.
> In some cases (when tp->cookie_values == NULL) new tcp_cookie_values
> structure can be allocated (at cvp), but not bound to
> tp->cookie_values. So a memory leak occurs.
>
> Signed-off-by: Dmitry Popov <dp@highloadlab.com>
Applied and queued up for -stable, thanks Dmitry.
^ permalink raw reply
* Re: [PATCH net-next] drivers/net/vxge/vxge-main.c: Use pr_<level> and netdev_<level>
From: David Miller @ 2010-07-31 6:28 UTC (permalink / raw)
To: jon.mason; +Cc: joe, Ramkrishna.Vepa, Sreenivasa.Honnur, netdev, linux-kernel
In-Reply-To: <20100728032117.GL28630@exar.com>
From: Jon Mason <jon.mason@exar.com>
Date: Tue, 27 Jul 2010 22:21:18 -0500
> On Tue, Jul 27, 2010 at 02:47:03PM -0700, Joe Perches wrote:
>> Use pr_fmt, pr_<level> and netdev_<level> where appropriate.
>>
>> Signed-off-by: Joe Perches <joe@perches.com>
>
> Acked-by: Jon Mason <jon.mason@exar.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] bonding: take rtnl in bond_loadbalance_arp_mon
From: David Miller @ 2010-07-31 6:28 UTC (permalink / raw)
To: fubar; +Cc: andy, netdev
In-Reply-To: <23558.1280425791@death>
From: Jay Vosburgh <fubar@us.ibm.com>
Date: Thu, 29 Jul 2010 10:49:51 -0700
> Andy Gospodarek <andy@greyhouse.net> wrote:
>
>>[PATCH net-next] bonding: prevent sysfs from allowing arp monitoring with alb/tlb
>>
>>When using module options arp monitoring and balance-alb/balance-tlb
>>are mutually exclusive options. Anytime balance-alb/balance-tlb are
>>enabled mii monitoring is forced to 100ms if not set. When configuring
>>via sysfs no checking is currently done.
>>
>>Handling these cases with sysfs has to be done a bit differently because
>>we do not have all configuration information available at once. This
>>patch will not allow a mode change to balance-alb/balance-tlb if
>>arp_interval is already non-zero. It will also not allow the user to
>>set a non-zero arp_interval value if the mode is already set to
>>balance-alb/balance-tlb. They are still mutually exclusive on a
>>first-come, first serve basis.
>>
>>Tested with initscripts on Fedora and manual setting via sysfs.
>>
>>Signed-off-by: Andy Gospodarek <gospo@redhat.com>
>
> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Applied, thanks guys.
^ permalink raw reply
* Re: [patch] dnet: fixup error handling in initialization
From: David Miller @ 2010-07-31 6:29 UTC (permalink / raw)
To: error27
Cc: netdev, shemminger, eric.dumazet, elendil, richard.cochran,
kernel-janitors
In-Reply-To: <20100729082729.GS26313@bicker>
From: Dan Carpenter <error27@gmail.com>
Date: Thu, 29 Jul 2010 10:27:29 +0200
> There were two problems here. We returned success if dnet_mii_init()
> failed and there was a release_mem_region() missing.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Applied, thanks.
^ permalink raw reply
* Re: [BUG] bridge leaks 3 references on lo per up&down
From: David Miller @ 2010-07-31 6:37 UTC (permalink / raw)
To: herbert; +Cc: equinox, netdev, shemminger, bridge
In-Reply-To: <20100729111231.GA30021@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 29 Jul 2010 19:12:31 +0800
> bridge: Fix skb leak when multicast parsing fails on TX
>
> On the bridge TX path we're leaking an skb when br_multicast_rcv
> returns an error.
>
> Reported-by: David Lamparter <equinox@diac24.net>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied to net-2.6, thanks!
^ permalink raw reply
* Re: bridge: Allow multicast snooping to be disabled before ifup
From: David Miller @ 2010-07-31 6:37 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <20100729104529.GA29678@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 29 Jul 2010 18:45:30 +0800
> bridge: Allow multicast snooping to be disabled before ifup
>
> Currently you cannot disable multicast snooping while a device is
> down. There is no good reason for this restriction and this patch
> removes it.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
I'll apply this to net-next-2.6, thanks Herbert.
^ permalink raw reply
* Re: [PATCH 1/3] TI DaVinci EMAC : Implement interrupt pacing functionality.
From: David Miller @ 2010-07-31 6:56 UTC (permalink / raw)
To: srk; +Cc: netdev, davinci-linux-open-source, nsekhar, anantgole
In-Reply-To: <1280406840-27393-1-git-send-email-srk@ti.com>
From: Sriramakrishnan <srk@ti.com>
Date: Thu, 29 Jul 2010 18:03:58 +0530
> DaVinci EMAC module includes an interrupt pacing block that can
> be programmed to throttle the rate at which interrupts are
> generated. This patch implements interrupt pacing logic that can
> be controlled through the ethtool interface(only rx_coalesce_usecs
> param is honored)
>
> Signed-off-by: Sriramakrishnan <srk@ti.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/3] TI DaVinci EMAC: Fix asymmetric handling of packets in NAPI Poll function.
From: David Miller @ 2010-07-31 6:56 UTC (permalink / raw)
To: srk; +Cc: netdev, davinci-linux-open-source, nsekhar, anantgole
In-Reply-To: <1280406840-27393-2-git-send-email-srk@ti.com>
From: Sriramakrishnan <srk@ti.com>
Date: Thu, 29 Jul 2010 18:03:59 +0530
> The current implementation of NAPI poll function in the driver does not service
> Rx packets, error condition even if a single Tx packet gets serviced in
> the napi poll call. This behavior severely affects performance for specific use
> cases. This patch modifies the poll function implementation to service tx/rx
> packets in an identical manner.
>
> Signed-off-by: Sriramakrishnan <srk@ti.com>
Applied.
^ permalink raw reply
* Re: [PATCH 3/3] TI DaVinci EMAC: Fix incorrect reference to EMAC_CTRL registers.
From: David Miller @ 2010-07-31 6:56 UTC (permalink / raw)
To: srk; +Cc: netdev, davinci-linux-open-source, nsekhar, anantgole
In-Reply-To: <1280406840-27393-3-git-send-email-srk@ti.com>
From: Sriramakrishnan <srk@ti.com>
Date: Thu, 29 Jul 2010 18:04:00 +0530
> The EMAC modules control registers vary as per the version of the
> EMAC module. EMAC_CTRL_EWCTL,EMAC_CTRL_EWINTTCNT are available
> only on EMAC_VERSION_1. The emac_dump_regs() function accesses
> these indiscriminately. This patch fixes the issue.
>
> Signed-off-by: Sriramakrishnan <srk@ti.com>
Also applied, thank you.
^ permalink raw reply
* [PATCH] nf: make skb_make_writable() return bool
From: Changli Gao @ 2010-07-31 6:56 UTC (permalink / raw)
To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
include/linux/netfilter.h | 2 +-
net/netfilter/core.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 89341c3..9dc919b 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -243,7 +243,7 @@ int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, int optval,
/* Call this before modifying an existing packet: ensures it is
modifiable and linear to the point you care about (writable_len).
Returns true or false. */
-extern int skb_make_writable(struct sk_buff *skb, unsigned int writable_len);
+extern bool skb_make_writable(struct sk_buff *skb, unsigned int writable_len);
struct flowi;
struct nf_queue_entry;
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 78b505d..274ab8c 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -189,17 +189,17 @@ next_hook:
EXPORT_SYMBOL(nf_hook_slow);
-int skb_make_writable(struct sk_buff *skb, unsigned int writable_len)
+bool skb_make_writable(struct sk_buff *skb, unsigned int writable_len)
{
if (writable_len > skb->len)
- return 0;
+ return false;
/* Not exclusive use of packet? Must copy. */
if (!skb_cloned(skb)) {
if (writable_len <= skb_headlen(skb))
- return 1;
+ return true;
} else if (skb_clone_writable(skb, writable_len))
- return 1;
+ return true;
if (writable_len <= skb_headlen(skb))
writable_len = 0;
^ permalink raw reply related
* Re: [PATCH] sky2: Code style fixes
From: David Miller @ 2010-07-31 6:59 UTC (permalink / raw)
To: shemminger; +Cc: mikem, netdev
In-Reply-To: <20100729102730.0c941791@nehalam>
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Thu, 29 Jul 2010 10:27:30 -0700
> On Thu, 29 Jul 2010 22:34:52 +0900
> Mike McCormack <mikem@ring3k.org> wrote:
>
>> Fix selected style problems reported by checkpatch.
>>
>> Signed-off-by: Mike McCormack <mikem@ring3k.org>
>
> Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 1/4] be2net: fix to correctly know if driver needs to run for a VF or a PF
From: David Miller @ 2010-07-31 6:59 UTC (permalink / raw)
To: ajitk; +Cc: netdev
In-Reply-To: <20100729161522.GA15448@serverengines.com>
From: Ajit Khaparde <ajitk@serverengines.com>
Date: Thu, 29 Jul 2010 21:45:32 +0530
> Move be_check_sriov_fn_type to appropriate place to correctly determine
> if the be2net driver needs to work as a VF driver or a PF driver.
>
> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 2/4] be2net: add code to dump registers for debug
From: David Miller @ 2010-07-31 6:59 UTC (permalink / raw)
To: ajitk; +Cc: netdev
In-Reply-To: <20100729161624.GA15482@serverengines.com>
From: Ajit Khaparde <ajitk@serverengines.com>
Date: Thu, 29 Jul 2010 21:46:33 +0530
> when the BE device becomes unresponsive, dump the registers to help debugging
>
> Signed-off-by: Somnath K <somnathk@serverengines.com>
> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 3/4] be2net: change to show correct physical link status
From: David Miller @ 2010-07-31 6:59 UTC (permalink / raw)
To: ajitk; +Cc: netdev
In-Reply-To: <20100729161707.GA15506@serverengines.com>
From: Ajit Khaparde <ajitk@serverengines.com>
Date: Thu, 29 Jul 2010 21:47:17 +0530
> link status is wrongly displayed under certain circumstances.
> This change fixes it.
>
> Signed-off-by: Somnath K <somnathk@serverengines.com>
> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 4/4] be2net: fix to avoid sending get_stats request if one is already being processed.
From: David Miller @ 2010-07-31 6:59 UTC (permalink / raw)
To: ajitk; +Cc: netdev
In-Reply-To: <20100729161849.GA15529@serverengines.com>
From: Ajit Khaparde <ajitk@serverengines.com>
Date: Thu, 29 Jul 2010 21:48:58 +0530
> GET_STATS request uses the same memory region as the response.
> If a new request for get stats is fired before the response for
> the previous get_stats request is received, the response will
> corrupt the new request, causing the f/w to misbehave.
>
> Signed-off-by: Somnath K <somnathk@serverengines.com>
> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Applied.
^ permalink raw reply
* [PATCH v2 1/2] nf_nat: make unique_tuple return void
From: Changli Gao @ 2010-07-31 7:08 UTC (permalink / raw)
To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao
the only user of unique_tuple() get_unique_tuple() doesn't care about the
return value of unique_tuple(), so make unique_tuple() return void (nothing).
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
include/net/netfilter/nf_nat_protocol.h | 8 ++++----
net/ipv4/netfilter/nf_nat_proto_common.c | 8 ++++----
net/ipv4/netfilter/nf_nat_proto_dccp.c | 6 +++---
net/ipv4/netfilter/nf_nat_proto_gre.c | 8 ++++----
net/ipv4/netfilter/nf_nat_proto_icmp.c | 6 +++---
net/ipv4/netfilter/nf_nat_proto_sctp.c | 6 +++---
net/ipv4/netfilter/nf_nat_proto_tcp.c | 5 ++---
net/ipv4/netfilter/nf_nat_proto_udp.c | 5 ++---
net/ipv4/netfilter/nf_nat_proto_udplite.c | 6 +++---
net/ipv4/netfilter/nf_nat_proto_unknown.c | 4 ++--
10 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/include/net/netfilter/nf_nat_protocol.h b/include/net/netfilter/nf_nat_protocol.h
index c398017..df17bac 100644
--- a/include/net/netfilter/nf_nat_protocol.h
+++ b/include/net/netfilter/nf_nat_protocol.h
@@ -27,9 +27,9 @@ struct nf_nat_protocol {
/* Alter the per-proto part of the tuple (depending on
maniptype), to give a unique tuple in the given range if
- possible; return false if not. Per-protocol part of tuple
- is initialized to the incoming packet. */
- bool (*unique_tuple)(struct nf_conntrack_tuple *tuple,
+ possible. Per-protocol part of tuple is initialized to the
+ incoming packet. */
+ void (*unique_tuple)(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
const struct nf_conn *ct);
@@ -63,7 +63,7 @@ extern bool nf_nat_proto_in_range(const struct nf_conntrack_tuple *tuple,
const union nf_conntrack_man_proto *min,
const union nf_conntrack_man_proto *max);
-extern bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
+extern void nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
const struct nf_conn *ct,
diff --git a/net/ipv4/netfilter/nf_nat_proto_common.c b/net/ipv4/netfilter/nf_nat_proto_common.c
index 6c4f11f..2844a03 100644
--- a/net/ipv4/netfilter/nf_nat_proto_common.c
+++ b/net/ipv4/netfilter/nf_nat_proto_common.c
@@ -34,7 +34,7 @@ bool nf_nat_proto_in_range(const struct nf_conntrack_tuple *tuple,
}
EXPORT_SYMBOL_GPL(nf_nat_proto_in_range);
-bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
+void nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
const struct nf_conn *ct,
@@ -53,7 +53,7 @@ bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
if (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED)) {
/* If it's dst rewrite, can't change port */
if (maniptype == IP_NAT_MANIP_DST)
- return false;
+ return;
if (ntohs(*portptr) < 1024) {
/* Loose convention: >> 512 is credential passing */
@@ -87,9 +87,9 @@ bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
continue;
if (!(range->flags & IP_NAT_RANGE_PROTO_RANDOM))
*rover = off;
- return true;
+ return;
}
- return false;
+ return;
}
EXPORT_SYMBOL_GPL(nf_nat_proto_unique_tuple);
diff --git a/net/ipv4/netfilter/nf_nat_proto_dccp.c b/net/ipv4/netfilter/nf_nat_proto_dccp.c
index 22485ce..570faf2 100644
--- a/net/ipv4/netfilter/nf_nat_proto_dccp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_dccp.c
@@ -22,14 +22,14 @@
static u_int16_t dccp_port_rover;
-static bool
+static void
dccp_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
const struct nf_conn *ct)
{
- return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
- &dccp_port_rover);
+ nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
+ &dccp_port_rover);
}
static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c
index d7e8920..89933ab 100644
--- a/net/ipv4/netfilter/nf_nat_proto_gre.c
+++ b/net/ipv4/netfilter/nf_nat_proto_gre.c
@@ -37,7 +37,7 @@ MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
MODULE_DESCRIPTION("Netfilter NAT protocol helper module for GRE");
/* generate unique tuple ... */
-static bool
+static void
gre_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
@@ -50,7 +50,7 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple,
/* If there is no master conntrack we are not PPTP,
do not change tuples */
if (!ct->master)
- return false;
+ return;
if (maniptype == IP_NAT_MANIP_SRC)
keyptr = &tuple->src.u.gre.key;
@@ -71,11 +71,11 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple,
for (i = 0; i < range_size; i++, key++) {
*keyptr = htons(min + key % range_size);
if (!nf_nat_used_tuple(tuple, ct))
- return true;
+ return;
}
pr_debug("%p: no NAT mapping\n", ct);
- return false;
+ return;
}
/* manipulate a GRE packet according to maniptype */
diff --git a/net/ipv4/netfilter/nf_nat_proto_icmp.c b/net/ipv4/netfilter/nf_nat_proto_icmp.c
index 19a8b0b..97003fe 100644
--- a/net/ipv4/netfilter/nf_nat_proto_icmp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_icmp.c
@@ -27,7 +27,7 @@ icmp_in_range(const struct nf_conntrack_tuple *tuple,
ntohs(tuple->src.u.icmp.id) <= ntohs(max->icmp.id);
}
-static bool
+static void
icmp_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
@@ -46,9 +46,9 @@ icmp_unique_tuple(struct nf_conntrack_tuple *tuple,
tuple->src.u.icmp.id = htons(ntohs(range->min.icmp.id) +
(id % range_size));
if (!nf_nat_used_tuple(tuple, ct))
- return true;
+ return;
}
- return false;
+ return;
}
static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_sctp.c b/net/ipv4/netfilter/nf_nat_proto_sctp.c
index 3fc598e..756331d 100644
--- a/net/ipv4/netfilter/nf_nat_proto_sctp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_sctp.c
@@ -16,14 +16,14 @@
static u_int16_t nf_sctp_port_rover;
-static bool
+static void
sctp_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
const struct nf_conn *ct)
{
- return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
- &nf_sctp_port_rover);
+ nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
+ &nf_sctp_port_rover);
}
static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_tcp.c b/net/ipv4/netfilter/nf_nat_proto_tcp.c
index 399e2cf..aa460a5 100644
--- a/net/ipv4/netfilter/nf_nat_proto_tcp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_tcp.c
@@ -20,14 +20,13 @@
static u_int16_t tcp_port_rover;
-static bool
+static void
tcp_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
const struct nf_conn *ct)
{
- return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
- &tcp_port_rover);
+ nf_nat_proto_unique_tuple(tuple, range, maniptype, ct, &tcp_port_rover);
}
static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_udp.c b/net/ipv4/netfilter/nf_nat_proto_udp.c
index 9e61c79..dfe65c7 100644
--- a/net/ipv4/netfilter/nf_nat_proto_udp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_udp.c
@@ -19,14 +19,13 @@
static u_int16_t udp_port_rover;
-static bool
+static void
udp_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
const struct nf_conn *ct)
{
- return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
- &udp_port_rover);
+ nf_nat_proto_unique_tuple(tuple, range, maniptype, ct, &udp_port_rover);
}
static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_udplite.c b/net/ipv4/netfilter/nf_nat_proto_udplite.c
index 440a229..3cc8c8a 100644
--- a/net/ipv4/netfilter/nf_nat_proto_udplite.c
+++ b/net/ipv4/netfilter/nf_nat_proto_udplite.c
@@ -18,14 +18,14 @@
static u_int16_t udplite_port_rover;
-static bool
+static void
udplite_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
const struct nf_conn *ct)
{
- return nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
- &udplite_port_rover);
+ nf_nat_proto_unique_tuple(tuple, range, maniptype, ct,
+ &udplite_port_rover);
}
static bool
diff --git a/net/ipv4/netfilter/nf_nat_proto_unknown.c b/net/ipv4/netfilter/nf_nat_proto_unknown.c
index 14381c6..a50f2bc 100644
--- a/net/ipv4/netfilter/nf_nat_proto_unknown.c
+++ b/net/ipv4/netfilter/nf_nat_proto_unknown.c
@@ -26,14 +26,14 @@ static bool unknown_in_range(const struct nf_conntrack_tuple *tuple,
return true;
}
-static bool unknown_unique_tuple(struct nf_conntrack_tuple *tuple,
+static void unknown_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
const struct nf_conn *ct)
{
/* Sorry: we can't help you; if it's not unique, we can't frob
anything. */
- return false;
+ return;
}
static bool
^ permalink raw reply related
* [PATCH v2 2/2] nf_nat: don't check if the tuple is unique when there isn't any other choice
From: Changli Gao @ 2010-07-31 7:09 UTC (permalink / raw)
To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao
the tuple got from unique_tuple() doesn't need to be really unique, so the
check for the unique tuple isn't necessary, when there isn't any other
choice. Eliminating the unnecessary nf_nat_used_tuple() can save some CPU
cycles too.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
net/ipv4/netfilter/nf_nat_proto_common.c | 4 ++--
net/ipv4/netfilter/nf_nat_proto_gre.c | 4 ++--
net/ipv4/netfilter/nf_nat_proto_icmp.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/netfilter/nf_nat_proto_common.c b/net/ipv4/netfilter/nf_nat_proto_common.c
index 2844a03..95aa286 100644
--- a/net/ipv4/netfilter/nf_nat_proto_common.c
+++ b/net/ipv4/netfilter/nf_nat_proto_common.c
@@ -81,9 +81,9 @@ void nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple,
else
off = *rover;
- for (i = 0; i < range_size; i++, off++) {
+ for (i = 0; ; ++off) {
*portptr = htons(min + off % range_size);
- if (nf_nat_used_tuple(tuple, ct))
+ if (++i != range_size && nf_nat_used_tuple(tuple, ct))
continue;
if (!(range->flags & IP_NAT_RANGE_PROTO_RANDOM))
*rover = off;
diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c
index 89933ab..1669be6 100644
--- a/net/ipv4/netfilter/nf_nat_proto_gre.c
+++ b/net/ipv4/netfilter/nf_nat_proto_gre.c
@@ -68,9 +68,9 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple,
pr_debug("min = %u, range_size = %u\n", min, range_size);
- for (i = 0; i < range_size; i++, key++) {
+ for (i = 0; ; ++key) {
*keyptr = htons(min + key % range_size);
- if (!nf_nat_used_tuple(tuple, ct))
+ if (++i == range_size || !nf_nat_used_tuple(tuple, ct))
return;
}
diff --git a/net/ipv4/netfilter/nf_nat_proto_icmp.c b/net/ipv4/netfilter/nf_nat_proto_icmp.c
index 97003fe..f6b07c9 100644
--- a/net/ipv4/netfilter/nf_nat_proto_icmp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_icmp.c
@@ -42,10 +42,10 @@ icmp_unique_tuple(struct nf_conntrack_tuple *tuple,
if (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED))
range_size = 0xFFFF;
- for (i = 0; i < range_size; i++, id++) {
+ for (i = 0; ; ++id) {
tuple->src.u.icmp.id = htons(ntohs(range->min.icmp.id) +
(id % range_size));
- if (!nf_nat_used_tuple(tuple, ct))
+ if (++i == range_size || !nf_nat_used_tuple(tuple, ct))
return;
}
return;
^ permalink raw reply related
* Re: [RFC PATCH v8 00/16] Provide a zero-copy method on KVM virtio-net.
From: Arnd Bergmann @ 2010-07-31 9:30 UTC (permalink / raw)
To: Shirley Ma
Cc: Xin, Xiaohui, netdev@vger.kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, mst@redhat.com, mingo@elte.hu,
davem@davemloft.net, herbert@gondor.apana.org.au,
jdike@linux.intel.com
In-Reply-To: <1280505112.9058.31.camel@localhost.localdomain>
On Friday 30 July 2010 17:51:52 Shirley Ma wrote:
> On Fri, 2010-07-30 at 16:53 +0800, Xin, Xiaohui wrote:
> > >Since vhost-net already supports macvtap/tun backends, do you think
> > >whether it's better to implement zero copy in macvtap/tun than
> > inducing
> > >a new media passthrough device here?
> > >
> >
> > I'm not sure if there will be more duplicated code in the kernel.
>
> I think it should be less duplicated code in the kernel if we use
> macvtap to support what media passthrough driver here. Since macvtap has
> support virtio_net head and offloading already, the only missing func is
> zero copy. Also QEMU supports macvtap, we just need add a zero copy flag
> in option.
Yes, I fully agree and that was one of the intended directions for
macvtap to start with. Thank you so much for following up on that,
I've long been planning to work on macvtap zero-copy myself but it's
now lower on my priorities, so it's good to hear that you made progress
on it, even if there are still performance issues.
Arnd
^ permalink raw reply
* [PATCH] Tulip: don't initialize SBE xT3E3 WAN ports.
From: Krzysztof Halasa @ 2010-07-31 9:32 UTC (permalink / raw)
To: David Miller; +Cc: netdev
SBE 2T3E3 cards use DECchips 21143 but they need a different driver.
Don't even try to use a normal tulip driver with them.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -1309,6 +1309,12 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
if (pdev->subsystem_vendor == PCI_VENDOR_ID_LMC) {
pr_err(PFX "skipping LMC card\n");
return -ENODEV;
+ } else if (pdev->subsystem_vendor == PCI_VENDOR_ID_SBE &&
+ (pdev->subsystem_device == PCI_SUBDEVICE_ID_SBE_T3E3 ||
+ pdev->subsystem_device == PCI_SUBDEVICE_ID_SBE_2T3E3_P0 ||
+ pdev->subsystem_device == PCI_SUBDEVICE_ID_SBE_2T3E3_P1)) {
+ pr_err(PFX "skipping SBE T3E3 port\n");
+ return -ENODEV;
}
/*
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1494,6 +1494,9 @@
#define PCI_DEVICE_ID_SBE_WANXL100 0x0301
#define PCI_DEVICE_ID_SBE_WANXL200 0x0302
#define PCI_DEVICE_ID_SBE_WANXL400 0x0104
+#define PCI_SUBDEVICE_ID_SBE_T3E3 0x0009
+#define PCI_SUBDEVICE_ID_SBE_2T3E3_P0 0x0901
+#define PCI_SUBDEVICE_ID_SBE_2T3E3_P1 0x0902
#define PCI_VENDOR_ID_TOSHIBA 0x1179
#define PCI_DEVICE_ID_TOSHIBA_PICCOLO_1 0x0101
^ 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