All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [ROSE] AX25 packet routing improvement
@ 2010-12-02 11:33 f6bvp
  0 siblings, 0 replies; 6+ messages in thread
From: f6bvp @ 2010-12-02 11:33 UTC (permalink / raw)
  To: ralf; +Cc: davem, linux-hams, Bernard Pidoux

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

[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_f6bvp.patch --]
[-- Type: text/x-patch, Size: 1631 bytes --]

--- a/net/rose/rose_route.c	2010-08-27 01:47:12.000000000 +0200
+++ b/net/rose/rose_route.c	2010-11-25 15:50:30.885623929 +0100
@@ -672,34 +672,41 @@
  *	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);
 	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 */
+		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 (!rose_ftimer_running(node->neighbour[i])) {
 						res = node->neighbour[i];
+						failed = 0;
+						spin_unlock_bh(&rose_node_list_lock);
 						goto out;
-					} else
-						failed = 1;
+					}
+					failed = 1;
 				}
 			}
 		}
+		spin_unlock_bh(&rose_node_list_lock);
 	}
-
+	
 	if (failed) {
 		*cause      = ROSE_OUT_OF_ORDER;
 		*diagnostic = 0;
@@ -709,8 +716,6 @@
 	}
 
 out:
-	if (!new) spin_unlock_bh(&rose_node_list_lock);
-
 	return res;
 }
 

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

* Re: [PATCH] [ROSE] AX25 packet routing improvement
  2011-02-14 17:52 ` Bernard Pidoux
@ 2011-02-14 21:35   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-02-14 21:35 UTC (permalink / raw)
  To: bernard.pidoux; +Cc: netdev, ralf, f6bvp

From: Bernard Pidoux <bernard.pidoux@upmc.fr>
Date: Mon, 14 Feb 2011 18:52:09 +0100

> [PATCH] [ROSE] [AX25] finding routes simplification
> 
> With previous patch, rose_get_neigh() routine
> investigates the full list of neighbor nodes
> until it finds or not an already connected node whether
> it is called locally or through a level 3 transit frame.
> If no routes are opened through an adjacent connected node
> then a classical connect request is attempted.
> 
> Then there is no more reason for an extra loop such
> as the one removed by this patch.
> 
> Signed-off-by: Bernard Pidoux <f6bvp@free.fr>

Also applied to net-next-2.6, thanks!

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

* Re: [PATCH] [ROSE] AX25 packet routing improvement
  2010-12-02 12:05 f6bvp
  2010-12-20 18:11 ` f6bvp
@ 2011-02-14 17:52 ` Bernard Pidoux
  2011-02-14 21:35   ` David Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Bernard Pidoux @ 2011-02-14 17:52 UTC (permalink / raw)
  To: Linux Netdev List; +Cc: ralf, davem, Bernard Pidoux F6BVP

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

Hi,

Here is a second try for this patch that completes the previous one.

[PATCH] [ROSE] [AX25] finding routes simplification

With previous patch, rose_get_neigh() routine
investigates the full list of neighbor nodes
until it finds or not an already connected node whether
it is called locally or through a level 3 transit frame.
If no routes are opened through an adjacent connected node
then a classical connect request is attempted.

Then there is no more reason for an extra loop such
as the one removed by this patch.

Signed-off-by: Bernard Pidoux <f6bvp@free.fr>

[-- Attachment #2: af_rose.patch --]
[-- Type: text/x-patch, Size: 727 bytes --]

--- a/net/rose/af_rose.c	2010-12-09 23:17:27.000000000 +0100
+++ b/net/rose/af_rose.c	2010-12-19 15:06:44.399455216 +0100
@@ -803,7 +803,6 @@
 
 		rose_insert_socket(sk);		/* Finish the bind */
 	}
-rose_try_next_neigh:
 	rose->dest_addr   = addr->srose_addr;
 	rose->dest_call   = addr->srose_call;
 	rose->rand        = ((long)rose & 0xFFFF) + rose->lci;
@@ -865,12 +864,6 @@
 	}
 
 	if (sk->sk_state != TCP_ESTABLISHED) {
-	/* Try next neighbour */
-		rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic, 0);
-		if (rose->neighbour)
-			goto rose_try_next_neigh;
-
-		/* No more neighbours */
 		sock->state = SS_UNCONNECTED;
 		err = sock_error(sk);	/* Always set at this point */
 		goto out_release;


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

* Re: [PATCH] [ROSE] AX25 packet routing improvement
  2010-12-20 18:11 ` f6bvp
@ 2011-01-21 11:23   ` f6bvp
  0 siblings, 0 replies; 6+ messages in thread
From: f6bvp @ 2011-01-21 11:23 UTC (permalink / raw)
  To: ralf; +Cc: davem, linux-hams, C Schuman

Hi Ralf,

One month ago I sent two patches for ROSE aimed at
improving rose network routing, especially when
a user sends a connect request on a local node.

They have been implemented on a dozen of ROSE FPAC nodes in the
United States and other countries in the world and seem to be
quite efficient and cause no problem.

As I have no feedback since, I am a little bit puzzled.
Could you tell us if you have any restrictive opinion about
applying these patches ?

73 de Bernard, f6bvp


Le 20/12/2010 19:11, f6bvp a écrit :
> Hi Ralf,
>
> Here is a new patch that completes the one I sent recently.
>
> I hope you will find time to have a look at both patches
> and approve them.
>
> ----------
>
> [PATCH] [ROSE] [AX25] finding routes simplification
>
> With previous patch, rose_get_neigh() routine
> investigates the full list of neighbor nodes
> until it finds or not an already connected node whether
> it is called locally or through a level 3 transit frame.
> If no routes are opened through an adjacent connected node
> then a classical connect request is attempted.
>
> Then there is no more reason for an extra loop such
> as the one removed by this patch.
>
> Signed-off-by: Bernard Pidoux <f6bvp@free.fr>
>
>
>
> Le 02/12/2010 13:05, f6bvp a écrit :
>> 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>
>>
>>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] [ROSE] AX25 packet routing improvement
  2010-12-02 12:05 f6bvp
@ 2010-12-20 18:11 ` f6bvp
  2011-01-21 11:23   ` f6bvp
  2011-02-14 17:52 ` Bernard Pidoux
  1 sibling, 1 reply; 6+ messages in thread
From: f6bvp @ 2010-12-20 18:11 UTC (permalink / raw)
  To: ralf; +Cc: davem, linux-hams, Bernard Pidoux

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

Hi Ralf,

Here is a new patch that completes the one I sent recently.

I hope you will find time to have a look at both patches
and approve them.

----------

[PATCH] [ROSE] [AX25] finding routes simplification

With previous patch, rose_get_neigh() routine
investigates the full list of neighbor nodes
until it finds or not an already connected node whether
it is called locally or through a level 3 transit frame.
If no routes are opened through an adjacent connected node
then a classical connect request is attempted.

Then there is no more reason for an extra loop such
as the one removed by this patch.

Signed-off-by: Bernard Pidoux <f6bvp@free.fr>



Le 02/12/2010 13:05, f6bvp a écrit :
> 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: af_rose.patch --]
[-- Type: text/x-patch, Size: 726 bytes --]

--- a/net/rose/af_rose.c	2010-12-09 23:17:27.000000000 +0100
+++ b/net/rose/af_rose.c	2010-12-19 15:06:44.399455216 +0100
@@ -803,7 +803,6 @@
 
 		rose_insert_socket(sk);		/* Finish the bind */
 	}
-rose_try_next_neigh:
 	rose->dest_addr   = addr->srose_addr;
 	rose->dest_call   = addr->srose_call;
 	rose->rand        = ((long)rose & 0xFFFF) + rose->lci;
@@ -865,12 +864,6 @@
 	}
 
 	if (sk->sk_state != TCP_ESTABLISHED) {
-	/* Try next neighbour */
-		rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic, 0);
-		if (rose->neighbour)
-			goto rose_try_next_neigh;
-
-		/* No more neighbours */
 		sock->state = SS_UNCONNECTED;
 		err = sock_error(sk);	/* Always set at this point */
 		goto out_release;

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

* [PATCH] [ROSE] AX25 packet routing improvement
@ 2010-12-02 12:05 f6bvp
  2010-12-20 18:11 ` f6bvp
  2011-02-14 17:52 ` Bernard Pidoux
  0 siblings, 2 replies; 6+ messages in thread
From: f6bvp @ 2010-12-02 12:05 UTC (permalink / raw)
  To: ralf; +Cc: davem, linux-hams, Bernard Pidoux

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

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-02 11:33 [PATCH] [ROSE] AX25 packet routing improvement f6bvp
2010-12-02 12:05 f6bvp
2010-12-20 18:11 ` f6bvp
2011-01-21 11:23   ` f6bvp
2011-02-14 17:52 ` Bernard Pidoux
2011-02-14 21:35   ` 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.