All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rose_loopback_timer VC number <= ROSE_DEFAULT_MAXVC
@ 2009-12-12  8:56 Bernard Pidoux
  2009-12-14  3:38 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Bernard Pidoux @ 2009-12-12  8:56 UTC (permalink / raw
  To: Ralf Baechle DL5RB, David Miller, Linux Netdev List

[PATCH] rose_loopback_timer VC number <= ROSE_DEFAULT_MAXVC

On my 2.6.32 kernel compiled for generic x86_64 CPU
cat /proc/net/rose displayed a rose sockets abnormal lci value, i.e. greater than maximum
number of VCs per neighbour allowed.
This out of limits number prevents further comparisons of lci value during rose VC attributions.

Example :
[bernard]# cat /proc/net/rose
dest_addr  dest_call src_addr   src_call  dev   lci neigh st vs vr va   t  t1  t2  t3  hb    idle Snd-Q Rcv-Q inode
*          *         2080175520 F6BVP-1   rose0 000 00000  0  0  0  0   0 200 180 180   5   0/000     0     0 254746
2080175520 FPAD-0    2080175520 WP-0      rose0 FFE 00001  3  0  0  0   0 200 180 180   5   0/000     0     0 12916

Here are the default parameters definitions :
linux/include/net/rose.h:#define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */
linux/net/rose/af_rose.c:int sysctl_rose_maximum_vcs = ROSE_DEFAULT_MAXVC;

With the following patch, rose_loopback_timer() attributes a VC number within limits.

--- a/net/rose/rose_loopback.c	2009-12-03 04:51:21.000000000 +0100
+++ b/net/rose/rose_loopback.c	2009-12-06 23:17:02.267741413 +0100
@@ -75,7 +75,7 @@
		lci_i     = ((skb->data[0] << 8) & 0xF00) + ((skb->data[1] << 0) & 0x0FF);
		frametype = skb->data[2];
		dest      = (rose_address *)(skb->data + 4);
-		lci_o     = 0xFFF - lci_i;
+		lci_o     = ROSE_DEFAULT_MAXVC + 1 - lci_i;

		skb_reset_transport_header(skb);


Bernard Pidoux



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

* Re: [PATCH] rose_loopback_timer VC number <= ROSE_DEFAULT_MAXVC
  2009-12-12  8:56 [PATCH] rose_loopback_timer VC number <= ROSE_DEFAULT_MAXVC Bernard Pidoux
@ 2009-12-14  3:38 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-12-14  3:38 UTC (permalink / raw
  To: bpidoux; +Cc: ralf, netdev

From: Bernard Pidoux <bpidoux@free.fr>
Date: Sat, 12 Dec 2009 09:56:02 +0100

> [PATCH] rose_loopback_timer VC number <= ROSE_DEFAULT_MAXVC

Please see Documentation/SubmittingPatches, you need to
provide a proper "Signed-off-by:" line with your submission
etc.

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

end of thread, other threads:[~2009-12-14  3:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-12  8:56 [PATCH] rose_loopback_timer VC number <= ROSE_DEFAULT_MAXVC Bernard Pidoux
2009-12-14  3:38 ` 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.