All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [ROSE] packet routing improvement
@ 2011-02-14 17:49 Bernard Pidoux
  2011-02-14 21:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Bernard Pidoux @ 2011-02-14 17:49 UTC (permalink / raw)
  To: Linux Netdev List; +Cc: ralf, davem, Bernard Pidoux F6BVP

[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]

Hi,

This is a resend of my dec 12, 2010 post.
It appears that I forgot to Cc to Linux Netdev list.
The reason for this patch follows.
A second one follows in next message.

[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: 1540 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;
 }
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [ROSE] packet routing improvement
  2011-02-14 17:49 [PATCH] [ROSE] packet routing improvement Bernard Pidoux
@ 2011-02-14 21:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-02-14 21:33 UTC (permalink / raw)
  To: bpidoux; +Cc: netdev, ralf, f6bvp

From: Bernard Pidoux <bpidoux@free.fr>
Date: Mon, 14 Feb 2011 18:49:25 +0100

> [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>

Applied to net-next-2.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-14 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 17:49 [PATCH] [ROSE] packet routing improvement Bernard Pidoux
2011-02-14 21:33 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.