11 Feb, 2010
3 commits
-
The static initial tables are pretty large, and after the net
namespace has been instantiated, they just hang around for nothing.
This commit removes them and creates tables on-demand at runtime when
needed.Size shrinks by 7735 bytes (x86_64).
Signed-off-by: Jan Engelhardt
-
The respective xt_table structures already have most of the metadata
needed for hook setup. Add a 'priority' field to struct xt_table so
that xt_hook_link() can be called with a reduced number of arguments.So should we be having more tables in the future, it comes at no
static cost (only runtime, as before) - space saved:
6807373->6806555.Signed-off-by: Jan Engelhardt
-
The calls to ip6t_do_table only show minimal differences, so it seems
like a good cleanup to merge them to a single one too.
Space saving obtained by both patches: 6807725->6807373
("Total" column from `size -A`.)Signed-off-by: Jan Engelhardt
10 Feb, 2010
3 commits
-
This patch combines all the per-hook functions in a given table into
a single function. Together with the 2nd patch, further
simplifications are possible up to the point of output code reduction.Signed-off-by: Jan Engelhardt
-
Signed-off-by: Patrick McHardy
09 Feb, 2010
11 commits
-
Test the value that was just allocated rather than the previously tested one.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@r@
expression *x;
expression e;
identifier l;
@@if (x == NULL || ...) {
... when forall
return ...; }
... when != goto l;
when != x = e
when != &x
*x == NULL
//Signed-off-by: Julia Lawall
Signed-off-by: David S. Miller -
During the rc period, patches that are not bugfixes
should be done using the net-next tree.Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
The action modules have been prefixed with 'act_', but the Kconfig
description was not changed.Signed-off-by: Jan Luebbe
Acked-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
Verify the HW checksum state for frames handed to GRO processing.
Signed-off-by: Divy Le Ray
Signed-off-by: David S. Miller -
Kernel bugzilla #15239
On some workloads, it is quite possible to get a huge dst list to
process in dst_gc_task(), and trigger soft lockup detection.Fix is to call cond_resched(), as we run in process context.
Reported-by: Pawel Staszewski
Tested-by: Pawel Staszewski
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
As noticed by Jon Masters , the conntrack hash
size is global and not per namespace, but modifiable at runtime through
/sys/module/nf_conntrack/hashsize. Changing the hash size will only
resize the hash in the current namespace however, so other namespaces
will use an invalid hash size. This can cause crashes when enlarging
the hashsize, or false negative lookups when shrinking it.Move the hash size into the per-namespace data and only use the global
hash size to initialize the per-namespace value when instanciating a
new namespace. Additionally restrict hash resizing to init_net for
now as other namespaces are not handled currently.Cc: stable@kernel.org
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
As per C99 6.2.4(2) when temporary table data goes out of scope,
the behaviour is undefined:if (compat) {
struct foo tmp;
...
private = &tmp;
}
[dereference private]Signed-off-by: Alexey Dobriyan
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy -
Expectation hashtable size was simply glued to a variable with no code
to rehash expectations, so it was a bug to allow writing to it.
Make "expect_hashsize" readonly.Signed-off-by: Alexey Dobriyan
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy -
nf_conntrack_cachep is currently shared by all netns instances, but
because of SLAB_DESTROY_BY_RCU special semantics, this is wrong.If we use a shared slab cache, one object can instantly flight between
one hash table (netns ONE) to another one (netns TWO), and concurrent
reader (doing a lookup in netns ONE, 'finding' an object of netns TWO)
can be fooled without notice, because no RCU grace period has to be
observed between object freeing and its reuse.We dont have this problem with UDP/TCP slab caches because TCP/UDP
hashtables are global to the machine (and each object has a pointer to
its netns).If we use per netns conntrack hash tables, we also *must* use per netns
conntrack slab caches, to guarantee an object can not escape from one
namespace to another one.Signed-off-by: Eric Dumazet
[Patrick: added unique slab name allocation]
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy -
As discovered by Jon Masters , the "untracked"
conntrack, which is located in the data section, might be accidentally
freed when a new namespace is instantiated while the untracked conntrack
is attached to a skb because the reference count it re-initialized.The best fix would be to use a seperate untracked conntrack per
namespace since it includes a namespace pointer. Unfortunately this is
not possible without larger changes since the namespace is not easily
available everywhere we need it. For now move the untracked conntrack
initialization to the init_net setup function to make sure the reference
count is not re-initialized and handle cleanup in the init_net cleanup
function to make sure namespaces can exit properly while the untracked
conntrack is in use in other namespaces.Cc: stable@kernel.org
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
08 Feb, 2010
1 commit
-
net/ipv4/netfilter/nf_defrag_ipv4.c: In function 'ipv4_conntrack_defrag':
net/ipv4/netfilter/nf_defrag_ipv4.c:62: error: implicit declaration of function 'nf_ct_is_template'Signed-off-by: Florian Westphal
Signed-off-by: Patrick McHardy
06 Feb, 2010
6 commits
-
Early on this was an experimental facility that few
people other than Alexey Kuznetsov played with.Now it's a pretty fundamental thing and as people add
more features to AF_PACKET sockets this config options
creates ifdef spaghetti.So kill it off.
Signed-off-by: David S. Miller
-
The report descriptor is read by user space (via the Service
Discovery Protocol), so it is only available during the ioctl
to connect. However, the HID probe function that needs the
descriptor might not be called until a specific module is
loaded. Keep a copy of the descriptor so it is available for
later use.Signed-off-by: Michael Poole
Signed-off-by: Marcel Holtmann -
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
05 Feb, 2010
15 commits
-
Reported by Stephen Rothwell.
Signed-off-by: David S. Miller
-
This patch removes the unused age_list member from the net_bridge
structure.Signed-off-by: Herbert Xu
Acked-by: Stephen Hemminger
Signed-off-by: David S. Miller -
This patch adds GSO/checksum offload to af_packet sockets using
virtio_net_hdr. Based on Rusty's patch to add this support to tun.
It allows GSO/checksum offload to be enabled when using raw socket
backend with virtio_net.
Adds PACKET_VNET_HDR socket option to prepend virtio_net_hdr in the
receive path and process/skip virtio_net_hdr in the send path. This
option is only allowed with SOCK_RAW sockets attached to ethernet
type devices.v2 updates
----------
Michael's Comments
- Perform length check in packet_snd() when GSO is off even when
vnet_hdr is present.
- Check for SKB_GSO_FCOE type and return -EINVAL
- don't allow tx/rx ring when vnet_hdr is enabled.
Herbert's Comments
- Removed ethernet specific code.
- protocol value is assumed to be passed in by the caller.Signed-off-by: Sridhar Samudrala
Signed-off-by: David S. Miller -
Just reordering this assignment that doesn't depend on any
condition.Signed-off-by: Breno Leitao
Signed-off-by: Ron Mercer
Signed-off-by: David S. Miller -
Currently the qlge_change_mtu() is never called if the new_mtu is
equal current MTU, due this condition on dev_set_mtu():if (new_mtu == dev->mtu)
return 0;So, this block of code is never reached and is being removed.
Signed-off-by: Breno Leitao
Signed-off-by: Ron Mercer
Signed-off-by: David S. Miller -
CONFIG_IP_ROUTE_PERVASIVE is missing a corresponding config
IP_ROUTE_PERVASIVE somewhere in KConfig (and missing it for ages
already) so it looks like some aging artefact no longer needed.Therefor this patch kills of the only remaining reference to that
config Item removing the already unrechable code snipet.Signed-off-by: Christoph Egger
Signed-off-by: David S. Miller -
Add missing try_to_freeze() to one of the pktgen_thread_worker() code
paths so that it doesn't block suspend/hibernation.Fixes http://bugzilla.kernel.org/show_bug.cgi?id=15006
Signed-off-by: Rafael J. Wysocki
Reported-and-tested-by: Ciprian Dorin Craciun
Signed-off-by: David S. Miller -
Update documentation to describe IPv6 parameters.
Reported by .Signed-off-by: Brian Haley
Signed-off-by: David S. Miller -
Add periodic heartbeat register read to trigger the eeh
recovery process.
We see cases where an eeh error was injected and the slot was
suspended. An asic access attempt is required to flush the recovery process,
but without interrupts the process can stall.
Adding this periodic register read causes the recovery process to begin.Signed-off-by: Ron Mercer
Signed-off-by: David S. Miller -
Many drivers do this in them manually. Now they can use this function.
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
This patch introduces the similar helpers as those already done for uc list.
However multicast lists are no list_head lists but "mademanually". The three
macros added by this patch will make the transition of mc_list to list_head
smooth in two steps:1) convert all drivers to use these macros (with the original iterator of type
"struct dev_mc_list")
2) once all drivers are converted, convert list type and iterators to "struct
netdev_hw_addr" in one patch.>From now on, drivers can (and should) use "netdev_for_each_mc_addr" to iterate
over the addresses with iterator of type "struct netdev_hw_addr". Also macros
"netdev_mc_count" and "netdev_mc_empty" to read list's length. This is the state
which should be reached in all drivers.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
This change corrects an issue that will cause false hangs when using either
82575 or 82580 in legacy interrupt mode. The issue is caused when there is
a slow traffic flow and an "ethtool -r" is executed while using legacy or
MSI interrupts. MSI-X is not affected by this issue due to the fact that
we were already reconfiguring the vectors after reset.If possible it would be best to push this for net-2.6 since it is resolving
a bug but if that is not possible then net-next-2.6 will be fine.Signed-off-by: Alexander Duyck
Signed-off-by: Jeff Kirsher
Signed-off-by: David S. Miller -
Signed-off-by: Giuseppe Cavallaro
Signed-off-by: David S. Miller -
Signed-off-by: Thadeu Lima de Souza Cascardo
Signed-off-by: David S. Miller
04 Feb, 2010
1 commit
-
Thanks for your patch. A more general solution would be to move the
rx_dropped up into sky2_receive.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller