09 May, 2008
1 commit
-
This patch increases the headroom TIPC reserves in each sk_buff
to accommodate the largest possible link level device header.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller
28 Apr, 2008
1 commit
-
Signed-off-by: Al Viro
Signed-off-by: David S. Miller
25 Apr, 2008
1 commit
-
I found some places, that erroneously return the value obtained from
the copy_to_user() call: if some amount of bytes were not able to get
to the user (this is what this one returns) the proper behavior is to
return the -EFAULT error, not that number itself.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller
17 Apr, 2008
3 commits
-
This patch is a largely cosmetic cleanup of the TIPC reference
table code.
- The object reference field in each table entry is now single
32-bit integer instead of a union of two 32-bit integers.
- Variable naming has been made more consistent.
- Error message output has been made more consistent.
- Useless #includes have been eliminated.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch modifies TIPC's reference table code to delay initializing
table entries until they are actually needed by applications.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch converts the TIPC reference table locking routines
into non-inlined routines, since they are mainly called from
non-performance critical areas of TIPC and the added code
footprint incurred through inlining can no longer be justified.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller
16 Apr, 2008
4 commits
-
This patch ensures that TIPC properly handles incoming messages
that have incorrect or unexpected formats. Most significantly,
it now ensures that each sl_buff has at least as much data as
the message header indicates it should, and that the entire
message header is stored contiguously; this prevents TIPC from
accidentally accessing memory that is not part of the sk_buff.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch allows TIPC to process incoming messages that are
stored in a fragmented sk_buff, by forcing the linearization
of any such messages it receives.Note: This is an interim solution to allow TIPC to operate with
Ethernet devices that generate non-linear buffers (such as the
gianfar driver), until such time as the rest of TIPC is enhanced
to handle sk_buffs with multiple data areas.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch causes TIPC to allocate fast clonable sk_buffs,
rather than standard ones. This speeds up the cloning
operation done by the link code each time a message is sent
off-node.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch eliminates a null pointer check when discarding a
TIPC message buffer, since kfree_skb() already handles this
situation.Acknowledgements to Florian Westphal (fw@strlen.de> for
suggesting this enhancement.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller
15 Apr, 2008
7 commits
-
This patch modifies TIPC's socket code to follow the same approach
used by other protocols. This change eliminates the need for a
mutex in the TIPC-specific portion of the socket protocol data
structure -- in its place, the standard Linux socket backlog queue
and associated locking routines are utilized. These changes fix
a long-standing receive queue bug on SMP systems, and also enable
individual read and write threads to utilize a socket without
unnecessarily interfering with each other.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch fixes TIPC's connect routine to conform to Linux
kernel style norms of indentation, line length, etc.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch causes TIPC to return an error indication if the non-
blocking form of connect() is requested (which TIPC does not yet
support).Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch fixes a bug that allowed TIPC to queue 1 more message
than allowed by the socket receive queue threshold limits. The
patch also improves the threshold code's logic and naming to help
prevent this sort of error from recurring in the future.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch ensures that padding bytes appearing at the end of
an incoming TIPC message are not returned as valid stream data.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch allows a stream socket to receive data from multiple
TIPC messages in its receive queue, without requiring the use of
the MSG_WAITALL flag.Acknowledgements to Florian Westphal for
identifying this issue and suggesting how to correct it.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch optimizes the receive path for SOCK_DGRAM and SOCK_RDM
messages by skipping over code that handles connection-based flow
control.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller
14 Apr, 2008
2 commits
-
This patch modifies TIPC's socket code to use standard kernel
routines to handle time conversions between jiffies and ms.
This ensures proper operation even when HZ isn't 1000.Acknowledgements to Eric Sesterhenn for
identifying this issue and proposing a solution.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch eliminates re-initialization of the standard socket
wait queue used for sleeping in TIPC's socket creation code.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller
27 Mar, 2008
1 commit
-
This patch eliminates an unnecessary poll-related routine
by merging it into TIPC's main polling routine, and updates
the comments associated with this code.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller
26 Mar, 2008
2 commits
-
Introduce per-sock inlines: sock_net(), sock_net_set()
and per-inet_timewait_sock inlines: twsk_net(), twsk_net_set().
Without CONFIG_NET_NS, no namespace other than &init_net exists.
Let's explicitly define them to help compiler optimizations.Signed-off-by: YOSHIFUJI Hideaki
-
Introduce per-net_device inlines: dev_net(), dev_net_set().
Without CONFIG_NET_NS, no namespace other than &init_net exists.
Let's explicitly define them to help compiler optimizations.Signed-off-by: YOSHIFUJI Hideaki
07 Mar, 2008
7 commits
-
This patch updates TIPC's version number to 1.6.3.
Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch makes two enhancements to the routine used to
set bit fields within a TIPC message header:1) It now ignores any bits of the new field value that are not
covered by the mask being used. (Previously, if the new value
exceeded the size of the mask the extra bits could corrupt
other fields in the message header word being updated.)2) The code has been optimized to minimize the number of run-time
endianness conversion operations by leveraging the fact that the
mask (and, in some cases, the value as well) is constant and the
necessary conversion can be performed by the compiler.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch ensures that the 3-bit version field of the TIPC
message header is masked correctly when written into a message.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch eliminates some unused or duplicate message header
symbols, and fixes up the comments and/or location of a few
other symbols.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch eliminates warnings about undeclared symbols.
Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch validates that the "how" argument to shutdown()
is SHUT_RDWR, since this is the only form that TIPC supports.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch removes code associated with optional, user-specified
fields of the TIPC message header. Such fields were never
utilized by TIPC, and have now been removed from the protocol
specification.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller
04 Mar, 2008
1 commit
-
The semaphore tsock->sem is used as mutex, convert it to the mutex API
Signed-off-by: Matthias Kaehlcke
Signed-off-by: David S. Miller
25 Feb, 2008
1 commit
-
net/tipc/cluster.c:145:2: warning: Using plain integer as NULL pointer
net/tipc/link.c:3254:36: warning: Using plain integer as NULL pointer
net/tipc/ref.c:151:15: warning: Using plain integer as NULL pointer
net/tipc/zone.c:85:2: warning: Using plain integer as NULL pointerSigned-off-by: Harvey Harrison
Signed-off-by: David S. Miller
08 Feb, 2008
2 commits
-
Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller -
All these static inlines are unused:
in_own_zone 1 (net/tipc/addr.h)
msg_dataoctet 1 (net/tipc/msg.h)
msg_direct 1 (include/net/tipc/tipc_msg.h)
msg_options 1 (include/net/tipc/tipc_msg.h)
tipc_nmap_get 1 (net/tipc/bcast.h)Signed-off-by: Ilpo Järvinen
Signed-off-by: David S. Miller
29 Jan, 2008
2 commits
-
The file net/tipc/port.c takes a lock using the function tipc_port_lock and
then releases the lock sometimes using tipc_port_unlock and sometimes using
spin_unlock_bh(p_ptr->publ.lock). tipc_port_unlock simply does the
spin_unlock_bh, but it seems cleaner to use it everywhere.The problem was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)//
@@
struct port *p_ptr;
@@p_ptr = tipc_port_lock(...)
...
(
p_ptr = tipc_port_lock(...);
|
?- spin_unlock_bh(p_ptr->publ.lock);
+ tipc_port_unlock(p_ptr);
)
//Signed-off-by: Julia Lawall
Acked-by: Jon Paul Maloy
Signed-off-by: David S. Miller -
Many-many code in the kernel initialized the timer->function
and timer->data together with calling init_timer(timer). There
is already a helper for this. Use it for networking code.The patch is HUGE, but makes the code 130 lines shorter
(98 insertions(+), 228 deletions(-)).Signed-off-by: Pavel Emelyanov
Acked-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller
15 Dec, 2007
1 commit
-
As noted by Kevin, tipc's release() does down_interruptible() and
ignores the return value. So if signal_pending() we'll end up doing
up() on a non-downed semaphore. Fix.Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller
01 Nov, 2007
1 commit
-
Finally, the zero_it argument can be completely removed from
the callers and from the function prototype.Besides, fix the checkpatch.pl warnings about using the
assignments inside if-s.This patch is rather big, and it is a part of the previous one.
I splitted it wishing to make the patches more readable. Hope
this particular split helped.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller
11 Oct, 2007
3 commits
-
Add inline for common usage of hardware header creation, and
fix bug in IPV6 mcast where the assumption about negative return is
an errno. Negative return from hard_header means not enough space
was available,(ie -N bytes).Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller -
This is nicer than the MAC_FMT stuff.
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
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