From patchwork Sat Dec 12 08:56:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernard Pidoux X-Patchwork-Id: 40963 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 42457B6F16 for ; Sat, 12 Dec 2009 19:56:22 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757836AbZLLI4J (ORCPT ); Sat, 12 Dec 2009 03:56:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757838AbZLLI4I (ORCPT ); Sat, 12 Dec 2009 03:56:08 -0500 Received: from smtp5-g21.free.fr ([212.27.42.5]:48079 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757788AbZLLI4I (ORCPT ); Sat, 12 Dec 2009 03:56:08 -0500 Received: from smtp5-g21.free.fr (localhost [127.0.0.1]) by smtp5-g21.free.fr (Postfix) with ESMTP id 422F7D48114; Sat, 12 Dec 2009 09:56:05 +0100 (CET) Received: from [192.168.0.68] (car75-2-82-66-61-83.fbx.proxad.net [82.66.61.83]) by smtp5-g21.free.fr (Postfix) with ESMTP id 3FBB3D48131; Sat, 12 Dec 2009 09:56:02 +0100 (CET) Message-ID: <4B235AA2.1040608@free.fr> Date: Sat, 12 Dec 2009 09:56:02 +0100 From: Bernard Pidoux User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Ralf Baechle DL5RB , David Miller , Linux Netdev List Subject: [PATCH] rose_loopback_timer VC number <= ROSE_DEFAULT_MAXVC Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org [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. Bernard Pidoux --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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);