02 May, 2013
1 commit
-
Supply a function (proc_remove()) to remove a proc entry (and any subtree
rooted there) by proc_dir_entry pointer rather than by name and (optionally)
root dir entry pointer. This allows us to eliminate all remaining pde->name
accesses outside of procfs.Signed-off-by: David Howells
Acked-by: Grant Likely
cc: linux-acpi@vger.kernel.org
cc: openipmi-developer@lists.sourceforge.net
cc: devicetree-discuss@lists.ozlabs.org
cc: linux-pci@vger.kernel.org
cc: netdev@vger.kernel.org
cc: netfilter-devel@vger.kernel.org
cc: alsa-devel@alsa-project.org
Signed-off-by: Al Viro
10 Apr, 2013
1 commit
-
The only part of proc_dir_entry the code outside of fs/proc
really cares about is PDE(inode)->data. Provide a helper
for that; static inline for now, eventually will be moved
to fs/proc, along with the knowledge of struct proc_dir_entry
layout.Signed-off-by: Al Viro
19 Feb, 2013
1 commit
-
proc_net_remove is only used to remove proc entries
that under /proc/net,it's not a general function for
removing proc entries of netns. if we want to remove
some proc entries which under /proc/net/stat/, we still
need to call remove_proc_entry.this patch use remove_proc_entry to replace proc_net_remove.
we can remove proc_net_remove after this patch.Signed-off-by: Gao feng
Signed-off-by: David S. Miller
02 Sep, 2012
1 commit
-
Signed-off-by: Anatol Pomozov
Signed-off-by: Jiri Kosina
09 Dec, 2011
1 commit
-
As this structure is priv, name it approprietely. Also for pointer to it
use name "vlan".Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
17 Jun, 2011
1 commit
-
Unnecessary casts of void * clutter the code.
These are the remainder casts after several specific
patches to remove netdev_priv and dev_priv.Done via coccinelle script:
$ cat cast_void_pointer.cocci
@@
type T;
T *pt;
void *pv;
@@- pt = (T *)pv;
+ pt = pv;Signed-off-by: Joe Perches
Acked-by: Paul Moore
Signed-off-by: David S. Miller
03 Jun, 2011
1 commit
-
Use the current logging style.
Add #define pr_fmt and remove embedded prefix from formats.
Not converting the current pr_ uses to netdev_
because all the output here is nicely prefaced with "8021q: ".Remove __func__ use from proc registration failure message.
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
16 Nov, 2010
2 commits
-
net/8021q/vlanproc.c: In function 'vlandev_seq_show':
net/8021q/vlanproc.c:283:20: warning: unused variable 'fmt'Signed-off-by: David S. Miller
-
Now that VLAN packets are tagged in dev_hard_start_xmit()
at the bottom of the stack we no longer need to tag them
in the 8021Q module (Except in the !VLAN_FLAG_REORDER_HDR
case).This allows the accel path and non accel paths to be consolidated.
Here the vlan_tci in the skb is always set and we allow the
stack to add the actual tag in dev_hard_start_xmit().Signed-off-by: John Fastabend
Acked-by: Jesse Gross
Signed-off-by: David S. Miller
08 Jul, 2010
1 commit
-
There is a small possibility that a reader gets incorrect values on 32
bit arches. SNMP applications could catch incorrect counters when a
32bit high part is changed by another stats consumer/provider.One way to solve this is to add a rtnl_link_stats64 param to all
ndo_get_stats64() methods, and also add such a parameter to
dev_get_stats().Rule is that we are not allowed to use dev->stats64 as a temporary
storage for 64bit stats, but a caller provided area (usually on stack)Old drivers (only providing get_stats() method) need no changes.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
13 Jun, 2010
1 commit
-
Use struct rtnl_link_stats64 as the statistics structure.
On 32-bit architectures, insert 32 bits of padding after/before each
field of struct net_device_stats to make its layout compatible with
struct rtnl_link_stats64. Add an anonymous union in net_device; move
stats into the union and add struct rtnl_link_stats64 stats64.Add net_device_ops::ndo_get_stats64, implementations of which will
return a pointer to struct rtnl_link_stats64. Drivers that implement
this operation must not update the structure asynchronously.Change dev_get_stats() to call ndo_get_stats64 if available, and to
return a pointer to struct rtnl_link_stats64. Change callers of
dev_get_stats() accordingly.Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller
18 Jan, 2010
1 commit
-
__net_init/__net_exit are apparently not going away, so use them
to full extent.In some cases __net_init was removed, because it was called from
__net_exit code.Signed-off-by: Alexey Dobriyan
Signed-off-by: David S. Miller
11 Nov, 2009
1 commit
-
Do not need to use read_lock(&dev_base_lock), use RCU instead.
Signed-off-by: Stephen Hemminger
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller
06 Aug, 2009
1 commit
-
String literals are constant, and usually, we can also tag the array
of pointers const too, moving it to the .rodata section.Signed-off-by: Jan Engelhardt
Signed-off-by: David S. Miller
19 May, 2009
1 commit
-
We can update netdev_queue tx_bytes/tx_packets/tx_dropped counters instead
of dev->stats ones, to reduce number of cache lines dirtied in xmit path.This fixes a performance problem on SMP when many different cpus take
vlan tx path.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
11 Nov, 2008
1 commit
-
Signed-off-by: Ferenc Wagner
Signed-off-by: David S. Miller
15 Jul, 2008
1 commit
-
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
08 Jul, 2008
1 commit
-
Use simplified is_vlan_dev function.
Signed-off-by: Joonwoo Park
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
02 May, 2008
1 commit
-
Simply replace proc_create and further data assigned with proc_create_data.
Signed-off-by: Denis V. Lunev
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller
16 Apr, 2008
4 commits
-
This includes moving one on the struct vlan_net and
s/vlan_name_type/vn->name_type/ over the code.Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
It is created in a proper net, so make is show info, related
to this particular net.Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
The proc_vlan_dir and proc_vlan_conf migrate on the struct
vlan_net and their creation uses the struct net.The devices' entries use the corresponding device's net.
Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
All proc files will be created in each net, so prepare them for
this change now, not to mess it with real creation patch.The net != &init_net checks in them are for git-bisect sanity,
but I will drop them soon.Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller
03 Apr, 2008
1 commit
-
Conflicts:
drivers/net/s2io.c
02 Apr, 2008
1 commit
-
This may lead to situations, when each of two proc entries produce
data for the other's device.Looks like a BUG, so this patch is for net-2.6. It will not apply to
net-2.6.26 since dev->nd_net access is replaced with dev_net(dev)
one.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller
06 Mar, 2008
1 commit
-
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison
Signed-off-by: David S. Miller
29 Feb, 2008
1 commit
-
Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.Signed-off-by: Wang Chen
Signed-off-by: David S. Miller
29 Jan, 2008
6 commits
-
Minor sparse warning fix.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller -
Checkpatch cleanups, consisting mainly of overly long lines and
missing spaces.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
- move module init/exit functions to end of file, remove some now unnecessary
forward declarations
- remove some obvious comments
- clean up proc init function and move a proc-related printk thereSigned-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
- use pr_* functions and common prefix for non-device related messages
- remove VLAN_ printk levels
- kill lots of useless debugging statements
- remove a few unnecessary printks like for double VID registration (already
returns -EEXIST) and kill of a number of unnecessary checks in
vlan_proc_{add,rem}_dev() that are already performed by the callerSigned-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
11 Oct, 2007
2 commits
-
This patch makes most of the generic device layer network
namespace safe. This patch makes dev_base_head a
network namespace variable, and then it picks up
a few associated variables. The functions:
dev_getbyhwaddr
dev_getfirsthwbytype
dev_get_by_flags
dev_get_by_name
__dev_get_by_name
dev_get_by_index
__dev_get_by_index
dev_ioctl
dev_ethtool
dev_load
wireless_process_ioctlwere modified to take a network namespace argument, and
deal with it.vlan_ioctl_set and brioctl_set were modified so their
hooks will receive a network namespace argument.So basically anthing in the core of the network stack that was
affected to by the change of dev_base was modified to handle
multiple network namespaces. The rest of the network stack was
simply modified to explicitly use &init_net the initial network
namespace. This can be fixed when those components of the network
stack are modified to handle multiple network namespaces.For now the ifindex generator is left global.
Fundametally ifindex numbers are per namespace, or else
we will have corner case problems with migration when
we get that far.At the same time there are assumptions in the network stack
that the ifindex of a network device won't change. Making
the ifindex number global seems a good compromise until
the network stack can cope with ifindex changes when
you change namespaces, and the like.Signed-off-by: Eric W. Biederman
Signed-off-by: David S. Miller -
This patch makes /proc/net per network namespace. It modifies the global
variables proc_net and proc_net_stat to be per network namespace.
The proc_net file helpers are modified to take a network namespace argument,
and all of their callers are fixed to pass &init_net for that argument.
This ensures that all of the /proc/net files are only visible and
usable in the initial network namespace until the code behind them
has been updated to be handle multiple network namespaces.Making /proc/net per namespace is necessary as at least some files
in /proc/net depend upon the set of network devices which is per
network namespace, and even more files in /proc/net have contents
that are relevant to a single network namespace.Signed-off-by: Eric W. Biederman
Signed-off-by: David S. Miller
15 Aug, 2007
1 commit
-
The Coverity checker spotted that we'd have already oops'ed if
"vlandev" was NULL.Signed-off-by: Adrian Bunk
Signed-off-by: David S. Miller
11 Jul, 2007
2 commits
-
Make all initialized struct seq_operations in net/ const
Signed-off-by: Philippe De Muyter
Signed-off-by: David S. Miller -
skb->priority has only 32 bits and even VLAN uses 32 bit values in its API.
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
04 May, 2007
1 commit
-
Cleanup of dev_base list use, with the aim to simplify making device
list per-namespace. In almost every occasion, use of dev_base variable
and dev->next pointer could be easily replaced by for_each_netdev
loop. A few most complicated places were converted to using
first_netdev()/next_netdev().Signed-off-by: Pavel Emelianov
Acked-by: Kirill Korotaev
Signed-off-by: David S. Miller