03 May, 2011
1 commit
-
Four years ago, Patrick made a change to hold rtnl mutex during netlink
dump callbacks.I believe it was a wrong move. This slows down concurrent dumps, making
good old /proc/net/ files faster than rtnetlink in some situations.This occurred to me because one "ip link show dev ..." was _very_ slow
on a workload adding/removing network devices in background.All dump callbacks are able to use RCU locking now, so this patch does
roughly a revert of commits :1c2d670f366 : [RTNETLINK]: Hold rtnl_mutex during netlink dump callbacks
6313c1e0992 : [RTNETLINK]: Remove unnecessary locking in dump callbacksThis let writers fight for rtnl mutex and readers going full speed.
It also takes care of phonet : phonet_route_get() is now called from rcu
read section. I renamed it to phonet_route_get_rcu()Signed-off-by: Eric Dumazet
Cc: Patrick McHardy
Cc: Remi Denis-Courmont
Acked-by: Stephen Hemminger
Signed-off-by: David S. Miller
10 Mar, 2011
1 commit
-
This moves most of the accept logic to process context like other
socket stacks do. Then we can use a few more common socket helpers
and simplify a bit.Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
26 Feb, 2011
5 commits
-
* Do not fail if the peer supports more or less than 3 algorithms.
* Ignore unknown congestion control algorithms instead of failing.
* Simplify congestion algorithm negotiation (largest is best).
* Do not use a static buffer.
* Fix off-by-two read overflow.
* Avoid extra memory copy (in addition to skb_copy_bits()).The previous code really made no sense.
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
sk->sk_state already contains the pipe state.
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
11 Jan, 2011
1 commit
-
Dan Rosenberg pointed out that there were some signed comparison bugs
in the phonet protocol.http://marc.info/?l=full-disclosure&m=129424528425330&w=2
The problem is that we check for array overflows but "protocol" is
signed and we don't check for array underflows. If you have already
have CAP_SYS_ADMIN then you could use the bugs to get root, or someone
could cause an oops by mistake.Signed-off-by: Dan Carpenter
Acked-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
14 Oct, 2010
1 commit
-
Based on suggestion by Rémi Denis-Courmont to implement 'connect'
for Pipe controller logic, this patch implements 'connect' socket
call for the Pipe controller logic.
The patch does following:-
- Removes setsockopts for PNPIPE_CREATE and PNPIPE_DESTROY
- Adds setsockopt for setting the Pipe handle value
- Implements connect socket call
- Updates the Pipe controller logicUser-space should now follow below sequence with Pipe controller:-
-socket
-bind
-setsockopt for PNPIPE_PIPE_HANDLE
-connect
-setsockopt for PNPIPE_ENCAP_IP
-setsockopt for PNPIPE_ENABLEGPRS/3G data has been tested working fine with this.
Signed-off-by: Kumar Sanghvi
Acked-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
28 Sep, 2010
1 commit
-
Phonet stack assumes the presence of Pipe Controller, either in Modem or
on Application Processing Engine user-space for the Pipe data.
Nokia Slim Modems like WG2.5 used in ST-Ericsson U8500 platform do not
implement Pipe controller in them.
This patch adds Pipe Controller implemenation to Phonet stack to support
Pipe data over Phonet stack for Nokia Slim Modems.Signed-off-by: Kumar Sanghvi
Acked-by: Linus Walleij
Signed-off-by: David S. Miller
16 Sep, 2010
3 commits
-
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
When both destination device and object are nul, Phonet routes the
packet according to the resource field. In fact, this is the most
common pattern when sending Phonet "request" packets. In this case,
the packet is delivered to whichever endpoint (socket) has
registered the resource.This adds a new table so that Linux processes can register their
Phonet sockets to Phonet resources, if they have adequate privileges.(Namespace support is not implemented at the moment.)
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Closing a pipe endpoint is not normally allowed by the Phonet pipe,
other than as a side after-effect of removing the pipe between two
endpoints. But there is no way to prevent Linux userspace processes
from being killed or suffering from bugs, so this can still happen.
We might as well forcefully close Phonet pipe endpoints then.The cellular modem supports only a few existing pipes at a time. So we
really should not leak them. This change instructs the modem to destroy
the pipe if either of the pipe's endpoint (Linux socket) is closed too
early.Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
10 Jun, 2010
1 commit
-
Use call_rcu rather than synchronize_rcu.
Signed-off-by: Jiri Pirko
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller
07 Jan, 2010
2 commits
-
Send aligned pipe payload if requested to do so. Then, the socket buffer
needs not be fragmented anymore.Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Newer Nokia cellular modems can use aligned payload for their GPRS pipe.
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
19 Nov, 2009
1 commit
-
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
11 Nov, 2009
1 commit
-
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
15 Oct, 2009
3 commits
-
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
The Phonet "universe" only has 64 addresses, so we keep a trivial flat
routing table.Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
24 Jul, 2009
1 commit
-
This provides a list of sockets with their Phonet bind addresses and
some socket debug informations through /proc/net/phonet.Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
25 Jun, 2009
1 commit
-
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
27 Jan, 2009
3 commits
-
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
18 Dec, 2008
1 commit
-
GPRS TX flow control won't need to lock the underlying socket anymore.
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
04 Dec, 2008
1 commit
-
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller
27 Oct, 2008
1 commit
-
This fixes an OOPS in hard_header if a Phonet address is assigned to a
non-Phonet network interface.Signed-off-by: Remi Denis-Courmont
Signed-off-by: David S. Miller
06 Oct, 2008
4 commits
-
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
This protocol provides some connection handling and negotiated
congestion control. Nokia cellular modems use it for bulk transfers.
It provides packet boundaries (hence SOCK_SEQPACKET). Congestion
control is per packet rather per byte, so we do not re-use the
generic socket memory accounting.Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
Signed-off-by: Rémi Denis-Courmont
Acked-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller
23 Sep, 2008
7 commits
-
When there is no listener socket for a received packet, send an error
back to the sender.Signed-off-by: Remi Denis-Courmont
Signed-off-by: David S. Miller -
Phonet endpoints are bound to individual ports.
This provides a /proc/sys/net/phonet (or sysctl) interface for
selecting the range of automatically allocated ports (much like the
ip_local_port_range with IPv4).Signed-off-by: Remi Denis-Courmont
Signed-off-by: David S. Miller -
This provides the basic SOCK_DGRAM transport protocol for Phonet.
Signed-off-by: Remi Denis-Courmont
Signed-off-by: David S. Miller -
This provides the socket API for the Phonet protocols family.
Signed-off-by: Remi Denis-Courmont
Signed-off-by: David S. Miller -
This provides support for configuring Phonet addresses, notifying
Phonet configuration changes, and dumping the configuration.Signed-off-by: Remi Denis-Courmont
Signed-off-by: David S. Miller -
This provides support for adding Phonet addresses to and removing
Phonet addresses from network devices.Signed-off-by: Rémi Denis-Courmont
Signed-off-by: David S. Miller -
This is the basis for the Phonet protocol families, and introduces
the ETH_P_PHONET packet type and the PF_PHONET socket family.Signed-off-by: Remi Denis-Courmont
Signed-off-by: David S. Miller