From owner-freebsd-net@FreeBSD.ORG Fri Feb 9 13:58:23 2007 Return-Path: X-Original-To: freebsd-net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 689F016A401 for ; Fri, 9 Feb 2007 13:58:23 +0000 (UTC) (envelope-from Artis.Caune@latnet.lv) Received: from krauklis.latnet.lv (krauklis.latnet.lv [159.148.19.113]) by mx1.freebsd.org (Postfix) with ESMTP id 20D2113C49D for ; Fri, 9 Feb 2007 13:58:23 +0000 (UTC) (envelope-from Artis.Caune@latnet.lv) Received: from localhost (localhost.localdomain [127.0.0.1]) by krauklis.latnet.lv (Postfix) with ESMTP id B3CE82BDF37 for ; Fri, 9 Feb 2007 15:58:21 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at krauklis.latnet.lv Received: from krauklis.latnet.lv ([127.0.0.1]) by localhost (krauklis.latnet.lv [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G+ieJXnYwt2q for ; Fri, 9 Feb 2007 15:58:21 +0200 (EET) Received: from [159.148.108.180] (artis.latnet.lv [159.148.108.180]) by krauklis.latnet.lv (Postfix) with ESMTP id 0EE012BDBFA for ; Fri, 9 Feb 2007 15:58:21 +0200 (EET) Message-ID: <45CC7DFC.7020306@latnet.lv> Date: Fri, 09 Feb 2007 15:58:20 +0200 From: Artis Caune User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 To: freebsd-net@FreeBSD.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: synchronising information between kernel modules X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2007 13:58:23 -0000 I would like to hear some ideas about how to synchronise information over network between two or more kernel modules. Topology: We have to FreeBSD boxes, which sit between two cisco switches and do traffic policy(shaping). Switches are connected with GigaChannel link (two physical links) and load balance traffic based on src,dst IP address. FreeBSD boxes sit between each physical GigaChannel link. Kernel module: It simpy pass or drop packets and increment counters. After every pass or drop or configuration change I need to tell other boxes about this action. I can use multicasts, like pfsync does, but multicasts are not reliable. If pfsync update is lost, it will be updated in next update or state time out. If our update is lost, specialy configuration update, bad things can happen. And there is problem with registering this module as kernel level multicast protocol - need to modify kernel sorurce and recompile. I can use ip_output and catch it on other box with pfil hooks, but it's not reliable. Maybe some kind of send_update + wait_for_ack option? I can also use userland daemon which establish conection with all peers and send/receive updates. Updates must be copied between kernel and userland.