Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next-2.6] net: cleanup include/net
From: David Miller @ 2009-11-04 13:07 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <4AF02F6B.6040405@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 03 Nov 2009 14:26:03 +0100

> This cleanup patch puts struct/union/enum opening braces,
> in first line to ease grep games.
> 
> struct something
> {
> 
> becomes :
> 
> struct something {
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] trivial: remove duplicated MIN macro from tehuti.
From: David Miller @ 2009-11-04 13:07 UTC (permalink / raw)
  To: tfransosi
  Cc: trivial, yanghy, baum, andy, shemminger, apkm, ben, netdev,
	linux-kernel
In-Reply-To: <1257253829-4531-1-git-send-email-tfransosi@gmail.com>

From: Thiago Farina <tfransosi@gmail.com>
Date: Tue,  3 Nov 2009 08:10:29 -0500

> Since the kernel api already has the macro "min",
> just use it instead of declaring another one.
> 
> Signed-off-by: Thiago Farina <tfransosi@gmail.com>

Applied to net-next-2.6, thanks!

^ permalink raw reply

* Re: [PATCH net-next] Phonet: remove tautologies
From: David Miller @ 2009-11-04 13:08 UTC (permalink / raw)
  To: remi; +Cc: netdev, remi.denis-courmont
In-Reply-To: <1257237688-19068-1-git-send-email-remi@remlab.net>

From: Rémi Denis-Courmont <remi@remlab.net>
Date: Tue,  3 Nov 2009 10:41:28 +0200

> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 
> These checks don't make sense anymore since rtnl_notify() cannot fail.
> 
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Applied, thanks!

^ permalink raw reply

* Re: [PATCH net-next-2.6] bnx2: avoid compiler warnings
From: David Miller @ 2009-11-04 13:08 UTC (permalink / raw)
  To: mchan; +Cc: eric.dumazet, netdev
In-Reply-To: <1257271294.8625.9.camel@HP1>

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 3 Nov 2009 10:01:34 -0800

> 
> On Tue, 2009-11-03 at 01:17 -0800, Eric Dumazet wrote:
>> drivers/net/bnx2.c: In function ‘bnx2_enable_forced_2g5’:
>> drivers/net/bnx2.c:1447: warning: ‘bmcr’ may be used uninitialized in this function
>> drivers/net/bnx2.c: In function ‘bnx2_disable_forced_2g5’:
>> drivers/net/bnx2.c:1482: warning: ‘bmcr’ may be used uninitialized in this function
>> 
>> One fix would be to have an initial value, but a plain return might be better.
> 
> I agree that plain return is better.  Thanks.
> 
> Acked-by: Michael Chan <mchan@broadcom.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server
From: Michael S. Tsirkin @ 2009-11-04 13:08 UTC (permalink / raw)
  To: Andi Kleen
  Cc: netdev, virtualization, kvm, linux-kernel, mingo, linux-mm, akpm
In-Reply-To: <20091104125957.GL31511@one.firstfloor.org>

On Wed, Nov 04, 2009 at 01:59:57PM +0100, Andi Kleen wrote:
> > Fine?
> 
> I cannot say -- are there paths that could drop the device beforehand?

Do you mean drop the mm reference?

> (as in do you hold a reference to it?)

By design I think I always have a reference to mm before I use it.

This works like this:
ioctl SET_OWNER - calls get_task_mm, I think this gets a reference to mm
ioctl SET_BACKEND - checks that SET_OWNER was run, starts virtqueue
ioctl RESET_OWNER - stops virtqueues, drops the reference to mm
file close - stops virtqueues, if we still have it then drops mm

This is why I think I can call use_mm/unuse_mm while virtqueue is running,
safely.
Makes sense?

> -Andi
> -- 
> ak@linux.intel.com -- Speaking for myself only.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server
From: Andi Kleen @ 2009-11-04 13:15 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Andi Kleen, netdev, virtualization, kvm, linux-kernel, mingo,
	linux-mm, akpm
In-Reply-To: <20091104130828.GC8920@redhat.com>

On Wed, Nov 04, 2009 at 03:08:28PM +0200, Michael S. Tsirkin wrote:
> On Wed, Nov 04, 2009 at 01:59:57PM +0100, Andi Kleen wrote:
> > > Fine?
> > 
> > I cannot say -- are there paths that could drop the device beforehand?
> 
> Do you mean drop the mm reference?

No the reference to the device, which owns the mm for you.

> 
> > (as in do you hold a reference to it?)
> 
> By design I think I always have a reference to mm before I use it.
> 
> This works like this:
> ioctl SET_OWNER - calls get_task_mm, I think this gets a reference to mm
> ioctl SET_BACKEND - checks that SET_OWNER was run, starts virtqueue
> ioctl RESET_OWNER - stops virtqueues, drops the reference to mm
> file close - stops virtqueues, if we still have it then drops mm
> 
> This is why I think I can call use_mm/unuse_mm while virtqueue is running,
> safely.
> Makes sense?

Do you protect against another thread doing RESET_OWNER in parallel while
RESET_OWNER runs?

-Andi

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

^ permalink raw reply

* Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server
From: Michael S. Tsirkin @ 2009-11-04 13:17 UTC (permalink / raw)
  To: Andi Kleen
  Cc: netdev, virtualization, kvm, linux-kernel, mingo, linux-mm, akpm
In-Reply-To: <20091104131533.GM31511@one.firstfloor.org>

On Wed, Nov 04, 2009 at 02:15:33PM +0100, Andi Kleen wrote:
> On Wed, Nov 04, 2009 at 03:08:28PM +0200, Michael S. Tsirkin wrote:
> > On Wed, Nov 04, 2009 at 01:59:57PM +0100, Andi Kleen wrote:
> > > > Fine?
> > > 
> > > I cannot say -- are there paths that could drop the device beforehand?
> > 
> > Do you mean drop the mm reference?
> 
> No the reference to the device, which owns the mm for you.

The device is created when file is open and destroyed
when file is closed. So I think the fs code handles the
reference counting for me: it won't call file cleanup
callback while some userspace process has the file open.
Right?

> > 
> > > (as in do you hold a reference to it?)
> > 
> > By design I think I always have a reference to mm before I use it.
> > 
> > This works like this:
> > ioctl SET_OWNER - calls get_task_mm, I think this gets a reference to mm
> > ioctl SET_BACKEND - checks that SET_OWNER was run, starts virtqueue
> > ioctl RESET_OWNER - stops virtqueues, drops the reference to mm
> > file close - stops virtqueues, if we still have it then drops mm
> > 
> > This is why I think I can call use_mm/unuse_mm while virtqueue is running,
> > safely.
> > Makes sense?
> 
> Do you protect against another thread doing RESET_OWNER in parallel while
> RESET_OWNER runs?

Yes, I have a mutex in the device for that. Same with SET_BACKEND.

> -Andi
> 
> -- 
> ak@linux.intel.com -- Speaking for myself only.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* Re: [PATCH] TI DaVinci EMAC: Add suspend/resume capability
From: David Miller @ 2009-11-04 13:22 UTC (permalink / raw)
  To: ranjithl; +Cc: netdev, davinci-linux-open-source, chaithrika
In-Reply-To: <1257338991-19792-1-git-send-email-ranjithl@ti.com>

From: Ranjith Lohithakshan <ranjithl@ti.com>
Date: Wed,  4 Nov 2009 18:19:51 +0530

> Add suspend/resume capability to TI DaVinci EMAC driver.
> 
> Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com>
> Signed-off-by: Chaithrika U S <chaithrika@ti.com>
> ---
> Applies to net-next-2.6

I don't think the CONFIG_PM CPP ifdefs are necessary.

Drivers generally don't do this, and they build just fine
on sparc64 which never sets CONFIG_PM ;-)

^ permalink raw reply

* Re: [PATCH net-next-2.6] em_meta: avoid one dev_put()
From: David Miller @ 2009-11-04 13:23 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <4AF0A2E9.1080505@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 03 Nov 2009 22:38:49 +0100

> Another rcu conversion to avoid one dev_hold()/dev_put() pair
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks Eric.

^ permalink raw reply

* Re: [PATCH torvalds-2.6] cdc_ether: additional Ericsson MBM PID's to the whitelist
From: David Miller @ 2009-11-04 13:25 UTC (permalink / raw)
  To: torgny.johansson; +Cc: netdev, saurin.shah
In-Reply-To: <200911032228.05527.torgny.johansson@gmail.com>

From: Torgny Johansson <torgny.johansson@gmail.com>
Date: Tue, 3 Nov 2009 22:28:05 +0100

> Trying with another e-mail client to see if that works better. I've
> sent it to my own gmail first and if I "view original" in gmail the
> patch works and applies cleanly after downloading it so I'm hoping
> it will work for you guys too.

Looks good, applied to net-2.6, thanks!

^ permalink raw reply

* Re: [PATCH 1/1] Use defaults when no route options are available
From: David Miller @ 2009-11-04 13:28 UTC (permalink / raw)
  To: gilad; +Cc: Valdis.Kletnieks, netdev, ori, linux-kernel, akpm
In-Reply-To: <1257276085-13681-1-git-send-email-gilad@codefidence.com>

From: Gilad Ben-Yossef <gilad@codefidence.com>
Date: Tue,  3 Nov 2009 21:21:25 +0200

> Trying to parse the option of a SYN packet that we have
> no route entry for should just use global wide defaults
> for route entry options.
> 
> Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>

The tester has indicated that this doesn't solve things
for them.  I suspect there is another dependency on 'dst'
not being NULL in another path somewhere.

So until this is fully resolved I'm holding off on applying
this patch.

^ permalink raw reply

* Re: [PATCHv7 1/3] tun: export underlying socket
From: David Miller @ 2009-11-04 13:30 UTC (permalink / raw)
  To: mst
  Cc: netdev, virtualization, kvm, linux-kernel, mingo, linux-mm, akpm,
	hpa, gregory.haskins, rusty, s.hetze
In-Reply-To: <20091103172400.GB5591@redhat.com>

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Tue, 3 Nov 2009 19:24:00 +0200

> Assuming it's okay with davem, I think it makes sense to merge this
> patch through Rusty's tree because vhost is the first user of the new
> interface.  Posted here for completeness.

I'm fine with that, please add my:

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: CLONE_NEWNET requires CAP_NET_RAW (and the intended CAP_SYS_ADMIN)
From: David Miller @ 2009-11-04 13:33 UTC (permalink / raw)
  To: eparis; +Cc: netdev, nhorman, acme, dwalsh
In-Reply-To: <1257279352.2891.202.camel@dhcp231-106.rdu.redhat.com>

From: Eric Paris <eparis@redhat.com>
Date: Tue, 03 Nov 2009 15:15:52 -0500

> Do people see an issue with me passing kern down to create?

This sounds fine.

> Anyone have problems with me ripping out the half ass unused
> security infrastructure?

If you can simplify it as you describe, indeed this sounds
like a great change to make.

^ permalink raw reply

* Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server
From: Andi Kleen @ 2009-11-04 13:37 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Andi Kleen, netdev, virtualization, kvm, linux-kernel, mingo,
	linux-mm, akpm
In-Reply-To: <20091104131735.GD8920@redhat.com>

On Wed, Nov 04, 2009 at 03:17:36PM +0200, Michael S. Tsirkin wrote:
> On Wed, Nov 04, 2009 at 02:15:33PM +0100, Andi Kleen wrote:
> > On Wed, Nov 04, 2009 at 03:08:28PM +0200, Michael S. Tsirkin wrote:
> > > On Wed, Nov 04, 2009 at 01:59:57PM +0100, Andi Kleen wrote:
> > > > > Fine?
> > > > 
> > > > I cannot say -- are there paths that could drop the device beforehand?
> > > 
> > > Do you mean drop the mm reference?
> > 
> > No the reference to the device, which owns the mm for you.
> 
> The device is created when file is open and destroyed
> when file is closed. So I think the fs code handles the
> reference counting for me: it won't call file cleanup
> callback while some userspace process has the file open.
> Right?

Yes.

But the semantics when someone inherits such a fd through exec
or through file descriptor passing would be surely "interesting"
You would still do IO on the old VM.

I guess it would be a good way to confuse memory accounting schemes 
or administrators @)

It would be all saner if this was all a single atomic step.

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* Re: HTB accuracy on 10GbE
From: Jarek Poplawski @ 2009-11-04 13:39 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Ryousei Takano, Stephen Hemminger, Patrick McHardy,
	Linux Netdev List, takano-ryousei
In-Reply-To: <4AF1660E.1080401@gmail.com>

On 04-11-2009 12:31, Eric Dumazet wrote:
....
> Maybe you can try changing class mtu to 40000 instead of 9000, and quantum to 60000 too
> 
> tc class add dev $DEV parent 1: classid 1:1 htb rate ${rate}mbit mtu 40000 quantum 60000
> 
> (because your tcp stack sends large buffers ( ~ 60000 bytes) as your NIC can offload tcp segmentation)
> 

Hmm..., testing htb scheduling exactness with tso/gso on seems kind of
weather reporting. On the other hand, depending on hardware, these
rates could be available with mtu 9000 and tso/gso off, unless I
miss something. So maybe such a test would be interesting too?
Then I'd suggest this one, erlier mentioned, patch to iproute2:
http://marc.info/?l=linux-netdev&m=124453482324409&w=2

Best regards,
Jarek P.

^ permalink raw reply

* Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server
From: Michael S. Tsirkin @ 2009-11-04 13:41 UTC (permalink / raw)
  To: Andi Kleen
  Cc: netdev, virtualization, kvm, linux-kernel, mingo, linux-mm, akpm
In-Reply-To: <20091104133728.GN31511@one.firstfloor.org>

On Wed, Nov 04, 2009 at 02:37:28PM +0100, Andi Kleen wrote:
> On Wed, Nov 04, 2009 at 03:17:36PM +0200, Michael S. Tsirkin wrote:
> > On Wed, Nov 04, 2009 at 02:15:33PM +0100, Andi Kleen wrote:
> > > On Wed, Nov 04, 2009 at 03:08:28PM +0200, Michael S. Tsirkin wrote:
> > > > On Wed, Nov 04, 2009 at 01:59:57PM +0100, Andi Kleen wrote:
> > > > > > Fine?
> > > > > 
> > > > > I cannot say -- are there paths that could drop the device beforehand?
> > > > 
> > > > Do you mean drop the mm reference?
> > > 
> > > No the reference to the device, which owns the mm for you.
> > 
> > The device is created when file is open and destroyed
> > when file is closed. So I think the fs code handles the
> > reference counting for me: it won't call file cleanup
> > callback while some userspace process has the file open.
> > Right?
> 
> Yes.
> 
> But the semantics when someone inherits such a fd through exec
> or through file descriptor passing would be surely "interesting"
> You would still do IO on the old VM.
> 
> I guess it would be a good way to confuse memory accounting schemes 
> or administrators @)
> It would be all saner if this was all a single atomic step.
> 
> -Andi

I have this atomic actually. A child process will first thing
do SET_OWNER: this is required before any other operation.

SET_OWNER atomically (under mutex) does two things:
- check that there is no other owner
- get mm and set current process as owner

I hope this addresses your concern?

-- 
MST

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* Re: [PATCH net-next-2.6] net: Introduce for_each_netdev_rcu() iterator
From: David Miller @ 2009-11-04 13:43 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <4AEEF908.8070900@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 02 Nov 2009 16:21:44 +0100

> [PATCH net-next-2.6 take2] net: Introduce for_each_netdev_rcu() iterator
...
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Looks great Eric, applied.

^ permalink raw reply

* Re: [PATCH 1/1] DaVinci EMAC: correct param for ISR
From: David Miller @ 2009-11-04 13:45 UTC (permalink / raw)
  To: Bo.Liu; +Cc: khilman, davinci-linux-open-source-bounces, netdev
In-Reply-To: <4AEF8CD6.9060804@windriver.com>

From: Tonyliu <Bo.Liu@windriver.com>
Date: Tue, 03 Nov 2009 09:52:22 +0800

> Subject: [PATCH 1/1] DaVinci EMAC: correct param for ISR
> 
> emac_irq is declared as:
> 
> static irqreturn_t emac_irq(int irq, void *dev_id)
> {
>        struct net_device *ndev = (struct net_device *)dev_id;
>        struct emac_priv *priv = netdev_priv(ndev);
>     ... 
> 
> 	Clearly emac_irq() needs "struct net_device *" as "void *dev_id", so correct this.
> 
> Signed-off-by: Tonyliu <Bo.Liu@windriver.com>

Applied to net-2.6, thank you.

^ permalink raw reply

* virtio-net: new section mismatch warning. revert patch?
From: Michael S. Tsirkin @ 2009-11-04 14:17 UTC (permalink / raw)
  To: Uwe Kleine-König, Sam Ravnborg
  Cc: David S. Miller, Rusty Russell, Alex Williamson, Mark McLoughlin,
	netdev, linux-kernel

With v2.6.32-rcX I started getting section mismatch warnings for
virtio_net.
make with CONFIG_DEBUG_SECTION_MISMATCH=y shows:

WARNING: drivers/net/virtio_net.o(.data+0x90): Section mismatch in
reference from the variable virtio_net to the function
.devexit.text:virtnet_remove()                                                                    
The variable virtio_net references                                                                            
the function __devexit virtnet_remove()                                                                       
If the reference is valid then annotate the                                                                   
variable with __exit* (see linux/init.h) or name the variable:                                                
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,                                  

virtnet_remove was converted to devexit by this commit:

	commit 3d1285beff2e8467b8c3884d83b7a91a99aa9fcd
	Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
	Date:   Wed Sep 30 22:28:34 2009 +0000

	    move virtnet_remove to .devexit.text

We didn't have these warnings in v2.6.31, so this is a regression.
revert?

-- 
MST

^ permalink raw reply

* RE: PATCH: Network Device Naming mechanism and policy
From: Narendra_K @ 2009-11-04 14:23 UTC (permalink / raw)
  To: bryan
  Cc: dannf, bhutchings, netdev, linux-hotplug, Matt_Domsch,
	Jordan_Hargrave, Charles_Rose, Sandeep_K_Shandilya
In-Reply-To: <4ADC906E.2050909@kadzban.is-a-geek.net>


>>> Matt, Ben and I talked about a few other possibilities on IRC. The 
>>> one I like the most at the moment is an idea Ben had to creat dummy 
>>> files named after the ifindex. Then, use symlinks for the 
>kernel name 
>>> and the various by-$property subdirectories. This means the KOBJ 
>>> events will need to expose the ifindex.
>>> 
>> 
>> I suppose the KOBJ events already expose the ifindex of a network 
>> interface. The file "/sys/class/net/ethN/uevent" contains 
>> INTERFACE=ethN and IFINDEX=n already. But it looks like udev doesn't 
>> use it in any way.
>
>Right; it could simply do the equivalent of:
>
>touch /dev/netdev/$env{IFINDEX}
>
>instead of its normal mknod(2), and then do normal SYMLINK processing.
>That last part is what would link 
>/dev/netdev/by-name/$env{INTERFACE} to that device, along with 
>/dev/netdev/by-mac/*, /dev/netdev/by-path/*, etc., etc., in as 
>many different ways as people want to add rules.
>
>(Or /dev/net/by-* instead of netdev; I'm mostly ambivalent 
>about the first-level directory under /dev.  Looks like 
>libnetdevname requires /dev/netdev though.)
>
>> For example, with the kernel patch the "/sys/class/net/ethN/uevent" 
>> contains in addition to the above details, MAJOR=M and MINOR=m which 
>> the udev knows how to make use of with a rule like
>> 
>> SUBSYSTEM=="net", KERNEL!="tun", NAME="netdev/%k", MODE="0600".
>
>And if the only point is to get the ifindex via stat(2) on the 
>resulting symlinks, but people don't like device files, then 
>why not get the ifindex via readlink(2) (and a bit of string 
>parsing, and a strtol(3) or
>strtoul(3) call) instead?  :-)


I suppose this issue can also be addressed in another way. Currently,
the sysfs contains various attributes of a network interface under the
directory "/sys/class/net/ethN", for example
"/sys/class/net/ethN/address". This will be used by udev as below -

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:1d:09:6a:78:ec", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth1".

Similarly, export an attribute named "smbios_name" to sysfs, i.e
"/sys/class/net/eth0/smbios_name". "Cat /sys/class/net/eth0/smbios_name"
would show "Embedded_NIC_1[23..]" and this can be used by udev in
70-persistent-net.rules as 

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{smbios_name}=="Embedded_NIC_1", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth0".

I suppose this would not need any changes to the udev code and existing
udev infrastructure can be used as udev is capable handling
ATTR{something}.

This would also ensure that whichever device is "Embedded_NIC_1" as per
the BIOS, will also be "eth0" in the os.

Netdev, What are your views on this idea ?

With regards,
Narendra K  

^ permalink raw reply

* [PATCH] tc: remove dlfcn.h from files that dont need it
From: Mike Frysinger @ 2009-11-04 14:26 UTC (permalink / raw)
  To: stephen.hemminger, netdev
In-Reply-To: <1257344795-8665-1-git-send-email-vapier@gentoo.org>

A bunch of source files look like they're copy & pasted from other files,
and some include header files that they don't actually need.  Since dlfcn
has very specific usage (and is a pain on a static-only system), drop it
where it isn't really needed.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 tc/em_cmp.c   |    1 -
 tc/em_meta.c  |    1 -
 tc/em_nbyte.c |    1 -
 tc/em_u32.c   |    1 -
 tc/m_nat.c    |    1 -
 tc/m_xt.c     |    1 -
 6 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/tc/em_cmp.c b/tc/em_cmp.c
index ce72a42..6addce0 100644
--- a/tc/em_cmp.c
+++ b/tc/em_cmp.c
@@ -18,7 +18,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <string.h>
-#include <dlfcn.h>
 #include <errno.h>
 
 #include "m_ematch.h"
diff --git a/tc/em_meta.c b/tc/em_meta.c
index ee6034f..033e29f 100644
--- a/tc/em_meta.c
+++ b/tc/em_meta.c
@@ -18,7 +18,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <string.h>
-#include <dlfcn.h>
 #include <errno.h>
 
 #include "m_ematch.h"
diff --git a/tc/em_nbyte.c b/tc/em_nbyte.c
index 242c361..87f3e9d 100644
--- a/tc/em_nbyte.c
+++ b/tc/em_nbyte.c
@@ -18,7 +18,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <string.h>
-#include <dlfcn.h>
 #include <errno.h>
 
 #include "m_ematch.h"
diff --git a/tc/em_u32.c b/tc/em_u32.c
index 402bea0..21ed70f 100644
--- a/tc/em_u32.c
+++ b/tc/em_u32.c
@@ -18,7 +18,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <string.h>
-#include <dlfcn.h>
 #include <errno.h>
 
 #include "m_ematch.h"
diff --git a/tc/m_nat.c b/tc/m_nat.c
index 6e7fd05..01ec032 100644
--- a/tc/m_nat.c
+++ b/tc/m_nat.c
@@ -19,7 +19,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <string.h>
-#include <dlfcn.h>
 #include "utils.h"
 #include "tc_util.h"
 #include <linux/tc_act/tc_nat.h>
diff --git a/tc/m_xt.c b/tc/m_xt.c
index 0fe6189..0c7ec60 100644
--- a/tc/m_xt.c
+++ b/tc/m_xt.c
@@ -25,7 +25,6 @@
 #include "tc_util.h"
 #include <linux/tc_act/tc_ipt.h>
 #include <stdio.h>
-#include <dlfcn.h>
 #include <getopt.h>
 #include <errno.h>
 #include <string.h>
-- 
1.6.5.1


^ permalink raw reply related

* [PATCH] ignore gdb/patch related files
From: Mike Frysinger @ 2009-11-04 14:26 UTC (permalink / raw)
  To: stephen.hemminger, netdev

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 .gitignore |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index 8199aae..5a3d20f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,12 @@
 Config
+.gdbinit
+.gdb_history
 *.o
 *.a
 *.so
+*.gdb
 *~
+*.diff
+*.patch
+*.orig
+*.rej
-- 
1.6.5.1


^ permalink raw reply related

* [PATCH] ifstat/nstat/rtacct: use daemon()
From: Mike Frysinger @ 2009-11-04 14:26 UTC (permalink / raw)
  To: stephen.hemminger, netdev
In-Reply-To: <1257344795-8665-1-git-send-email-vapier@gentoo.org>

A bunch of misc utils basically reimplement the daemon() function (the
whole fork/close/chdir/etc...).  Rather than do that, use daemon() as
that will work under nommu Linux systems that lack fork().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 misc/ifstat.c |    8 ++++----
 misc/nstat.c  |    8 ++++----
 misc/rtacct.c |    8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/misc/ifstat.c b/misc/ifstat.c
index 68dfdee..0ce8c92 100644
--- a/misc/ifstat.c
+++ b/misc/ifstat.c
@@ -663,10 +663,10 @@ int main(int argc, char *argv[])
 			perror("ifstat: listen");
 			exit(-1);
 		}
-		if (fork())
-			exit(0);
-		chdir("/");
-		close(0); close(1); close(2); setsid();
+		if (daemon(0, 0)) {
+			perror("ifstat: daemon");
+			exit(-1);
+		}
 		signal(SIGPIPE, SIG_IGN);
 		signal(SIGCHLD, sigchild);
 		server_loop(fd);
diff --git a/misc/nstat.c b/misc/nstat.c
index 80e695f..2e44ed2 100644
--- a/misc/nstat.c
+++ b/misc/nstat.c
@@ -513,10 +513,10 @@ int main(int argc, char *argv[])
 			perror("nstat: listen");
 			exit(-1);
 		}
-		if (fork())
-			exit(0);
-		chdir("/");
-		close(0); close(1); close(2); setsid();
+		if (daemon(0, 0)) {
+			perror("nstat: daemon");
+			exit(-1);
+		}
 		signal(SIGPIPE, SIG_IGN);
 		signal(SIGCHLD, sigchild);
 		server_loop(fd);
diff --git a/misc/rtacct.c b/misc/rtacct.c
index eb3ea9e..a247dfd 100644
--- a/misc/rtacct.c
+++ b/misc/rtacct.c
@@ -524,10 +524,10 @@ int main(int argc, char *argv[])
 			perror("rtacct: listen");
 			exit(-1);
 		}
-		if (fork())
-			exit(0);
-		chdir("/");
-		close(0); close(1); close(2); setsid();
+		if (daemon(0, 0)) {
+			perror("rtacct: daemon");
+			exit(-1);
+		}
 		signal(SIGPIPE, SIG_IGN);
 		signal(SIGCHLD, sigchild);
 		server_loop(fd);
-- 
1.6.5.1


^ permalink raw reply related

* Re: [PATCH 1/1] Use defaults when no route options are available
From: Gilad Ben-Yossef @ 2009-11-04 14:27 UTC (permalink / raw)
  To: David Miller; +Cc: Valdis.Kletnieks, netdev, ori, linux-kernel, akpm
In-Reply-To: <20091104.052816.74593826.davem@davemloft.net>

David Miller wrote:

> From: Gilad Ben-Yossef <gilad@codefidence.com>
> Date: Tue,  3 Nov 2009 21:21:25 +0200
>
>   
>> Trying to parse the option of a SYN packet that we have
>> no route entry for should just use global wide defaults
>> for route entry options.
>>
>> Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
>>     
>
> The tester has indicated that this doesn't solve things
> for them.  I suspect there is another dependency on 'dst'
> not being NULL in another path somewhere.
>
> So until this is fully resolved I'm holding off on applying
> this patch.
>
>   
Yes, indeed.

I managed to replicate it here. Looking into it right now.

Thanks,
Gilad


-- 
Gilad Ben-Yossef
Chief Coffee Drinker & CTO
Codefidence Ltd.

Web:   http://codefidence.com
Cell:  +972-52-8260388
Skype: gilad_codefidence
Tel:   +972-8-9316883 ext. 201
Fax:   +972-8-9316884
Email: gilad@codefidence.com

Check out our Open Source technology and training blog - http://tuxology.net

	"The biggest risk you can take it is to take no risk."
		-- Mark Zuckerberg and probably others

^ permalink raw reply

* Re: [announce] new rt2800 drivers for Ralink wireless & project tree
From: John W. Linville @ 2009-11-04 14:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Ivo van Doorn, Bartlomiej Zolnierkiewicz,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, Randy Dunlap, Luis Correia,
	Johannes Berg, Jarek Poplawski, Pekka Enberg, David Miller
In-Reply-To: <20091104083737.GA16978-X9Un+BFzKDI@public.gmane.org>

On Wed, Nov 04, 2009 at 09:37:37AM +0100, Ingo Molnar wrote:

<snip>

> Really, you should listen to contrary opinion and _you_ should work 
> _hard_ to integrate Bart socially and open up your close circle of 
> wireless insiders instead of fighting his 'outsider' contributions every 
> which way. We dont care if people are rough, express displeasure and 
> show strong opinion about crappy code - but the moment you are 
> _excluding_ capable people and playing petty office politics (like you 
> are very clearly doing it with Bart here) everyone loses.

Ivo almost immediately ACKed 10 of Bart's patches (despite Bart's
failure to post them to the mailing list directly per convention),
so you criticize Ivo for saying he needed time to review the rest?
And you accuse him of excluding Bart's contributions when they have
only just arrived?

> Guys, show some minimal amount of honesty, openness and critical 
> thinking please ...

I would ask the same of you, Ingo.  You have burst onto the scene
only recently, full of accusations and blame for one side and
apparently unable to recognize the faults of the other.  You fail to
recognize that this set of patches is essentially the _first_ time
Bart has actually made any attempt to work on the rt2x00 drivers.
Your partisanship is clear.

At least Bart has finally made some rt2x00 patches available.  That is
how things get done.  You continuing to defend him as some sort of
martyr is completely unhelpful.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox