01 May, 2012
1 commit
-
Some of the comment blocks are floating in limbo between two
functions, or between blocks of code. Delete the extra line
feeds between any comment and its associated following block
of code, to be consistent with the majority of the rest of
the kernel. Also delete trailing newlines at EOF and fix
a couple trivial typos in existing comments.This is a 100% cosmetic change with no runtime impact. We get
rid of over 500 lines of non-code, and being blank line deletes,
they won't even show up as noise in git blame.Signed-off-by: Paul Gortmaker
27 Apr, 2012
9 commits
-
Adds check to ensure TIPC sockets reject incoming payload messages
that have an unrecognized message type.Remove the old open question about whether TIPC_ERR_NO_PORT is
the proper return value. It is appropriate here since there are
valid instances where another node can make use of the reply,
and at this point in time the host is already broadcasting TIPC
data, so there are no real security concerns.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Consolidates validation of scope and name sequence range values into
a single routine where it applies both to local name publications
and to name publications issued by other nodes in the network. This
change means that the scope value for non-local publications is now
validated and the name sequence range for local publications is now
validated only once. Additionally, a publication attempt that fails
validation now creates an entry in the system log file only if debugging
capabilities have been enabled; this prevents the system log from being
cluttered up with messages caused by a defective application or network
node.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Replaces two identical chunks of code that delete an unused name
sequence structure from TIPC's name table with calls to a new routine
that performs this operation.This change is cosmetic and doesn't impact the operation of TIPC.
Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Eliminate code to zero-out the main topology service structure,
which is already zeroed-out.Get rid of a comment documenting a field of the main topology
service structure that no longer exists.Both are cosmetic changes with no impact on runtime behaviour.
Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Initialization now occurs in the calling thread of control,
rather than being deferred to the TIPC tasklet. With the
current codebase, the deferral is no longer necessary.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Streamlines the job of re-initializing TIPC's network topology service
when a node's network address is first assigned. Rather than destroying
the topology server port and breaking its connections to existing
subscribers, TIPC now simply lets the service continue running (since
the change to the port identifier of each port used by the topology
service no longer impacts the flow of messages between the service and
its subscribers).This enhancement means that applications that utilize the topology
service prior to the assignment of TIPC's network address no longer need
to re-establish their subscriptions when the address is finally assigned.However, it is worth noting that any subsequent events for existing
subscriptions report the new port identifier of the publishing port,
rather than the original port identifier. (For example, a name that was
previously reported as being published by may be subsequently
withdrawn by .)This doesn't impact any of the existing known userspace in tipc-utils,
since (a) TIPC continues to treat references to the original port ID
correctly and (b) normal use cases assign an address before active use.However if there does happen to be some rare/custom application out
there that was relying on this, they can simply bypass the enhancement
by issuing a subscription to {0,0} and break its connection to the
topology service, if an associated withdrawal event occurs.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Termination no longer tests to see if the configuration service
port was successfully created or not. In the unlikely event that the
port was not created, attempting to delete the non-existent port is
detected gracefully and causes no harm.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Initialization now occurs in the calling thread of control,
rather than being deferred to the TIPC tasklet. With the
current codebase, the deferral is no longer necessary.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Streamlines the job of re-initializing TIPC's configuration service
when a node's network address is first assigned. Rather than destroying
the configuration server port and then recreating it, TIPC now simply
withdraws the existing {0,} name publication and creates a new
{0,} name publication that identifies the node's network address
to interested subscribers.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
24 Apr, 2012
2 commits
-
Untie gcc's hands and let it do what it wants within the
individual source files. There are two files, node.c and
port.c -- only the latter effectively changes (gcc-4.5.2).
Objdump shows gcc deciding to not inline port_peernode().Suggested-by: David S. Miller
Signed-off-by: Paul Gortmaker
Signed-off-by: David S. Miller -
sk_add_backlog() & sk_rcvqueues_full() hard coded sk_rcvbuf as the
memory limit. We need to make this limit a parameter for TCP use.No functional change expected in this patch, all callers still using the
old sk_rcvbuf limit.Signed-off-by: Eric Dumazet
Cc: Neal Cardwell
Cc: Tom Herbert
Cc: Maciej Żenczykowski
Cc: Yuchung Cheng
Cc: Ilpo Järvinen
Cc: Rick Jones
Signed-off-by: David S. Miller
20 Apr, 2012
14 commits
-
Enhances command validation done by TIPC's configuration service so
that it works properly even if the node's network address is changed in
mid-operation. The default node address of is now recognized as an
alias for "this node" even after a new network address has been assigned.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Revises handling of a rejected message to ensure that a locally
originated message is returned properly even if the node's network
address is changed in mid-operation. The routine now treats the
default node address of as an alias for "this node" when
determining where to send a returned message.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Revises handling of send routines for payload messages to ensure that
they are processed properly even if the node's network address is
changed in mid-operation. The routines now treat the default node
address of as an alias for "this node" when determining where
to send an outgoing message.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
There are two send routines that might conceivably be asked by an
application to send a message off-node when the node is still using
the default network address. These now have an added check that
detects this and rejects the message gracefully.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
The routine that changes the node's network address now takes TIPC's
network lock in write mode while the main address variable and associated
data structures are being changed; this is needed to ensure that the
link subsystem won't attempt to send a message off-node until the sending
port's message header template has been updated with the node's new
network address.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Revises routines that deal with connections between two ports on
the same node to ensure the connection is not impacted if the node's
network address is changed in mid-operation. The routines now treat
the default node address of as an alias for "this node" in
the following situations:1) Incoming messages destined to a connected port now handle the alias
properly when validating that the message was sent by the expected
peer port, ensuring that the message will be accepted regardless of
whether it specifies the node's old network address or it's current one.2) The code which completes connection establishment now handles the
alias properly when determining if the peer port is on the same node
as the connected port.An added benefit of addressing issue 1) is that some peer port
validation code has been relocated to TIPC's socket subsystem, which
means that validation is no longer done twice when a message is
sent to a non-socket port (such as TIPC's configuration service or
network topology service).Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Prior to commit 23dd4cce387124ec3ea06ca30d17854ae4d9b772
"tipc: Combine port structure with tipc_port structure"
there was a need for the two sets of helper functions. But
now they are just duplicates. Remove the globally visible
ones, and mark the remaining ones as inline.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Re-orders port creation logic so that the initialization of a new
port's message header template occurs while the port list lock is
held. This ensures that a change to the node's network address that
occurs at the same time as the port is being created does not result
in the template identifying the sender using the former network
address. The new approach guarantees that the new port's template is
using the current network address or that it will be updated when
the address changes.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Removes an unnecessary check in the logic that updates the message
header template for existing ports when a node's network address is
first assigned. There is no longer any need to check to see if the
node's network address has actually changed since the calling routine
has already verified that this is so.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Revises routines that add and remove an entry from a node's name table
so that the publication scope lists are updated properly even if the
node's network address is changed in mid-operation. The routines now
recognize the default node address of as an alias for "this node"
even after a new network address has been assigned.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Introduces routines that test whether a given network address is
equal to a node's own network address or if it lies within the node's
own network cluster, and which work properly regardless of whether
the node is using the default network address or a non-zero
network address that is assigned later on. In essence, these routines
ensure that address is treated as an alias for "this node",
regardless of which network address the node is actually using.Old users of the pre-existing more strict match in_own_cluster()
have been accordingly redirected to what is now called
in_own_cluster_exact() --- which does not extend matching to .Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
No longer increments counter of number of publications by a node
if an attempt to add a new publication fails. This prevents TIPC from
incorrectly blocking future publications because the configured maximum
number of publications has been reached.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Ensures that node-scope name publications that exist prior to the
configuration of a node's network address are properly re-initialized
with that address when it is assigned. TIPC's node-scope publications
are now tracked using a publications list like the lists used for
cluster-scope and zone-scope publications so they can be easily updated
when required.The inclusion of node scope name publications in a conventional publication
list means that they must now also be withdrawn, just like cluster and zone
scope publications are currently withdrawn. So some conditional tests on
scope ==/!= TIPC_NODE_SCOPE are inserted/removed accordingly.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Utilizes distinct lists to track zone-scope and cluster-scope names
published by a node. For now, TIPC continues to process the entries
in both lists in the same way; however, an upcoming patch will utilize
the existence of the lists to prevent the sending of cluster-scope names
to nodes that are not part of the local cluster.To achieve this, an array of publication lists is introduced, so
that they can be iterated over and accessed via publ->scope as
an index where convenient.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
18 Apr, 2012
2 commits
-
This is done so that it can be reused with differing publication
lists, instead of being hard coded to the cluster publicaton list.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
There is currently a single list that is containing both cluster-scope and
zone-scope publications, and the list count is a separate free floating
variable. Create a struct to bind the count to the list, and to pave
the way for factoring out the publications into zone/cluster/node scope.The current "publ_root" most matches what will be the cluster scope
list, so it is named accordingly in this commit.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
16 Apr, 2012
1 commit
-
Use of "unsigned int" is preferred to bare "unsigned" in net tree.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
01 Mar, 2012
3 commits
-
Optimizes routines that send payload messages so that they no longer
update the "originating node" and "originating port" fields of the
outgoing message header template, since these fields are initialized
when the sending port is created and never change thereafter. Also
optimizes the routine which updates the message header template when
a connection to a port is established, for the same reason.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Removes code that updated the "previous node" field of an out-going
message over TIPC's links. Such updating is unnecessary since the
removal of the prototype multi-cluster capability means that all
outgoing messages are generated locally and already have this field
populated correctly.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Converts a non-trivial routine from inline to non-inline form
to avoid bloating the TIPC code base with 6 copies of its body.This change is essentially cosmetic, and doesn't change existing
TIPC behavior.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker
25 Feb, 2012
8 commits
-
Removes all references to the global variable that records whether
TIPC is running in "single node" mode or "network" mode, since this
information can be easily deduced from the global variable that
records TIPC's network address. (i.e. a non-zero network address
means that TIPC is running in network mode.)The changes made update most existing mode-based checks to use the
network address global variable. A few checks that are no longer
needed are removed entirely, along with any associated code lying on
non-executable control paths.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Removes all references to TIPC's "not running" mode, since the
removal of support for the native API means that there is no longer
any way to interact with TIPC if it has not been initialized.The changes made consist of removing mode-based checks that are no
longer needed, along with any associated code lying on non-executable
control paths.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Restores name table translation using a non-zero domain that is
"out of scope", which was broken by an earlier commit
(5d9c54c1e9ececcf7e99c4f014f9bec7ee3a7def). Comments have now been
added to the name table translation routine to make it clear that
there are actually three possible outcomes to a translation request
(found/not found/deferred), rather than just two (found/not found).Note that a straightforward revert of the earlier commit is not
possible, as other changes to the name table translation logic
have occurred since the incorrect optimization was made.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Optimizes processing done when contact with a neighboring node is
established to avoid recording the current state of outgoing broadcast
messages if the neighboring node isn't a valid broadcast link destination,
since this state information isn't needed for such nodes.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Eliminates a block of comments that describe how routing table updates
are to be handled. These comments no longer apply following the removal
of TIPC's prototype multi-cluster support.Note that these changes are essentially cosmetic in nature, and have
no impact on the actual operation of TIPC.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Gets rid of two inlined routines that simply call existing sk_buff
manipulation routines, since there is no longer any extra processing
done by the helper routines.Note that these changes are essentially cosmetic in nature, and have
no impact on the actual operation of TIPC.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Relocates information about the size of TIPC's node table index and
its associated hash function, since only node subsystem routines need
to have access to this information.Note that these changes are essentially cosmetic in nature, and have
no impact on the actual operation of TIPC.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker -
Simplifies a comparison operation to eliminate a useless test that
checks if an unsigned value is less than zero.Signed-off-by: Allan Stephens
Signed-off-by: Paul Gortmaker