aboutsummaryrefslogtreecommitdiff
path: root/net/core/utils.c
AgeCommit message (Collapse)AuthorFilesLines
2008-07-25printk ratelimiting rewriteDave Young1-3/+2
All ratelimit user use same jiffies and burst params, so some messages (callbacks) will be lost. For example: a call printk_ratelimit(5 * HZ, 1) b call printk_ratelimit(5 * HZ, 1) before the 5*HZ timeout of a, then b will will be supressed. - rewrite __ratelimit, and use a ratelimit_state as parameter. Thanks for hints from andrew. - Add WARN_ON_RATELIMIT, update rcupreempt.h - remove __printk_ratelimit - use __ratelimit in net_ratelimit Signed-off-by: Dave Young <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Dave Young <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-01-28[NET] core/utils.c: digit2bin is dead static inlineIlpo Järvinen1-11/+0
Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-01-28[NET]: Move netfilter checksum helpers to net/core/utils.cPatrick McHardy1-0/+16
This allows to get rid of the CONFIG_NETFILTER dependency of NET_ACT_NAT. This patch redefines the old names to keep the noise low, the next patch converts all users. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-08-07[NET] net/core/utils: fix sparse warningJohannes Berg1-0/+1
net_msg_warn is not defined because it is in net/sock.h which isn't included. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-05-31[NET]: parse ip:port strings correctly in in4_ptonJerome Borsboom1-3/+3
in4_pton converts a textual representation of an ip4 address into an integer representation. However, when the textual representation is of in the form ip:port, e.g. 192.168.1.1:5060, and 'delim' is set to -1, the function bails out with an error when reading the colon. It makes sense to allow the colon as a delimiting character without explicitly having to set it through the 'delim' variable as there can be no ambiguity in the point where the ip address is completely parsed. This function is indeed called from nf_conntrack_sip.c in this way to parse textual ip:port combinations which fails due to the reason stated above. Signed-off-by: Jerome Borsboom <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-04-25[NET]: New sysctls should use __read_mostly tagsEric Dumazet1-3/+3
net_msg_warn should be placed in the read_mostly section, to avoid performance problems on SMP Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-04-25[NET]: Replace CONFIG_NET_DEBUG with sysctl.Stephen Hemminger1-0/+2
Covert network warning messages from a compile time to runtime choice. Removes kernel config option and replaces it with new /proc/sys/net/core/warnings. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-02-10[NET] CORE: Fix whitespace errors.YOSHIFUJI Hideaki1-2/+2
Signed-off-by: YOSHIFUJI Hideaki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-12-02[NET]: Accept wildcard delimiters in in[46]_ptonPatrick McHardy1-4/+6
Accept -1 as delimiter to abort parsing without an error at the first unknown character. This is needed by the upcoming nf_conntrack SIP helper, where addresses are delimited by either '\r' or '\n' characters. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-10-17[PATCH] rename net_random to random32Stephen Hemminger1-116/+0
Make net_random() more widely available by calling it random32 akpm: hopefully this will permit the removal of carta_random32. That needs confirmation from Stephane - this code looks somewhat more computationally expensive, and has a different (ie: callee-stateful) interface. [[email protected]: lots of build fixes, cleanups] Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]> Cc: Stephane Eranian <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-09-28[NET]: is it Andy or Andi ??Steven Rostedt1-1/+1
I don't know of any Andy Kleen's but I do know a Andi Kleen. Signed-off-by: Steven Rostedt <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET] in6_pton: Kill errant printf statement.David S. Miller1-2/+0
Signed-off-by: David S. Miller <[email protected]>
2006-09-22[NET]: Add common helper functions to convert IPv6/IPv4 address string to ↵YOSHIFUJI Hideaki1-0/+215
network address structure. These helpers can be used in netfilter, cifs etc. Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
2006-08-17[NET]: Fix potential stack overflow in net/core/utils.cSuresh Siddha1-3/+4
On High end systems (1024 or so cpus) this can potentially cause stack overflow. Fix the stack usage. Signed-off-by: Suresh Siddha <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2006-04-11[PATCH] for_each_possible_cpu: network codesKAMEZAWA Hiroyuki1-2/+2
for_each_cpu() actually iterates across all possible CPUs. We've had mistakes in the past where people were using for_each_cpu() where they should have been iterating across only online or present CPUs. This is inefficient and possibly buggy. We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the future. This patch replaces for_each_cpu with for_each_possible_cpu under /net Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Acked-by: "David S. Miller" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-02-05[PATCH] percpu data: only iterate over possible CPUsEric Dumazet1-2/+2
percpu_data blindly allocates bootmem memory to store NR_CPUS instances of cpudata, instead of allocating memory only for possible cpus. As a preparation for changing that, we need to convert various 0 -> NR_CPUS loops to use for_each_cpu(). (The above only applies to users of asm-generic/percpu.h. powerpc has gone it alone and is presently only allocating memory for present CPUs, so it's currently corrupting memory). Signed-off-by: Eric Dumazet <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: James Bottomley <[email protected]> Acked-by: Ingo Molnar <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Anton Blanchard <[email protected]> Acked-by: William Irwin <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-01-06[NET]: Endian-annotate in_aton()Alexey Dobriyan1-1/+1
Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2005-11-13[PATCH] net: allow newline terminated IP addresses in in_atonMitch Williams1-1/+1
in_aton() gives weird results if it sees a newline at the end of the input. This patch makes it able to handle such input correctly. Signed-off-by: Mitch Williams <[email protected]> Acked-by: Jay Vosburgh <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2005-08-29[NET]: Fix sparse warningsArnaldo Carvalho de Melo1-0/+2
Of this type, mostly: CHECK net/ipv6/netfilter.c net/ipv6/netfilter.c:96:12: warning: symbol 'ipv6_netfilter_init' was not declared. Should it be static? net/ipv6/netfilter.c:101:6: warning: symbol 'ipv6_netfilter_fini' was not declared. Should it be static? Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2005-07-27[NET]: Move in_aton from net/ipv4/utils.c to net/core/utils.cMatt Mackall1-1/+36
Move in_aton to allow netpoll and pktgen to work without the rest of the IPv4 stack. Fix whitespace and add comment for the odd placement. Delete now-empty net/ipv4/utils.c Re-enable netpoll/netconsole without CONFIG_INET Signed-off-by: Matt Mackall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+155
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!