From: f6bvp <f6bvp@free.fr>
To: ralf@linux-mips.org
Cc: davem@davemloft.net, linux-hams@vger.kernel.org,
Bernard Pidoux <bernard.pidoux@upmc.fr>
Subject: [PATCH] [ROSE] AX25 packet routing improvement
Date: Thu, 02 Dec 2010 13:05:04 +0100 [thread overview]
Message-ID: <4CF78B70.4060907@free.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]
Hi,
Sorry for this second post.
I found that spin_lock_bh was missing in the first loop !
[PATCH] [ROSE] rose AX25 packet routing improvement
FPAC AX25 packet application is using Linux kernel ROSE
routing skills in order to connect or send packets to remote stations
knowing their ROSE address via a network of interconnected nodes.
Each FPAC node has a ROSE routing table that Linux ROSE module is
looking at each time a ROSE frame is relayed by the node or when
a connect request to a neighbor node is received.
A previous patch improved the system time response by looking at
already established routes each time the system was looking for a
route to relay a frame. If a neighbor node routing the destination
address was already connected, then the frame would be sent
through him. If not, a connection request would be issued.
The present patch extends the same routing capability to a connect
request asked by a user locally connected into an FPAC node.
Without this patch, a connect request was not well handled unless it
was directed to an immediate connected neighbor of the local node.
Implemented at a number of ROSE FPAC node stations, the present patch
improved dramatically FPAC ROSE routing time response and efficiency.
Signed-off-by: Bernard Pidoux <f6bvp@free.fr>
[-- Attachment #2: rose_get_neigh.patch --]
[-- Type: text/x-patch, Size: 1539 bytes --]
--- a/net/rose/rose_route.c 2010-08-27 01:47:12.000000000 +0200
+++ b/net/rose/rose_route.c 2010-12-02 12:46:57.724550823 +0100
@@ -672,29 +672,34 @@
* Find a neighbour or a route given a ROSE address.
*/
struct rose_neigh *rose_get_neigh(rose_address *addr, unsigned char *cause,
- unsigned char *diagnostic, int new)
+ unsigned char *diagnostic, int route_frame)
{
struct rose_neigh *res = NULL;
struct rose_node *node;
int failed = 0;
int i;
- if (!new) spin_lock_bh(&rose_node_list_lock);
+ if (!route_frame) spin_lock_bh(&rose_node_list_lock);
for (node = rose_node_list; node != NULL; node = node->next) {
if (rosecmpm(addr, &node->address, node->mask) == 0) {
for (i = 0; i < node->count; i++) {
- if (new) {
- if (node->neighbour[i]->restarted) {
- res = node->neighbour[i];
- goto out;
- }
+ if (node->neighbour[i]->restarted) {
+ res = node->neighbour[i];
+ goto out;
}
- else {
+ }
+ }
+ }
+ if (!route_frame) { /* connect request */
+ for (node = rose_node_list; node != NULL; node = node->next) {
+ if (rosecmpm(addr, &node->address, node->mask) == 0) {
+ for (i = 0; i < node->count; i++) {
if (!rose_ftimer_running(node->neighbour[i])) {
res = node->neighbour[i];
+ failed = 0;
goto out;
- } else
- failed = 1;
+ }
+ failed = 1;
}
}
}
@@ -709,8 +714,7 @@
}
out:
- if (!new) spin_unlock_bh(&rose_node_list_lock);
-
+ if (!route_frame) spin_unlock_bh(&rose_node_list_lock);
return res;
}
next reply other threads:[~2010-12-02 12:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 12:05 f6bvp [this message]
2010-12-20 18:11 ` [PATCH] [ROSE] AX25 packet routing improvement f6bvp
2011-01-21 11:23 ` f6bvp
2010-12-21 10:38 ` Can AX25 socket debug message be removed ? f6bvp
2010-12-21 17:33 ` Ralf Baechle DL5RB
2010-12-22 9:43 ` Bernard Pidoux F6BVP
2011-02-15 14:25 ` f6bvp
2010-12-21 10:41 ` Can ROSE " Bernard Pidoux
-- strict thread matches above, loose matches on Subject: below --
2010-12-02 11:33 [PATCH] [ROSE] AX25 packet routing improvement f6bvp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CF78B70.4060907@free.fr \
--to=f6bvp@free.fr \
--cc=bernard.pidoux@upmc.fr \
--cc=davem@davemloft.net \
--cc=linux-hams@vger.kernel.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox