From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ia0-x230.google.com (mail-ia0-x230.google.com [IPv6:2607:f8b0:4001:c02::230]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id AF5CA21F104 for ; Sat, 20 Apr 2013 02:56:24 -0700 (PDT) Received: by mail-ia0-f176.google.com with SMTP id i9so4094504iad.21 for ; Sat, 20 Apr 2013 02:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=UO0O2Ho8hAdxEOzgTEGhCOyKxDzgtXBYxFVeuNcSzQs=; b=Eeuri4JjmWnUq1ltRRgYeyoYLz/9/7SASSUK4Iy6uGX/Fm2rxTUMwLKDdn/KNQlHRc D4VBpwALWCWUqVsOm5VOMOf+VebdZKCzf1N+DeS3TNmHowBBlNp5hH0vSCttfBdN7DNY ysSW0irR+5BBgJvK88T8/wAkH+SX+YGYcCmRE3RWWSUuq6Unv3qsEDBBewYD+r8dARp0 yYvQwWVSHt4oHW5VvbpAQZwPh28cXZ0862OOnMvf/fBsR+e/fR0PgFWhuZQVEwFsmTt3 yygnfku3/2AEILmCXBmYHkwKq/vYSxo691HNzIBYaO7csSrbPTtauKbnMD4fCc9Pa7sY GmNA== MIME-Version: 1.0 X-Received: by 10.42.247.8 with SMTP id ma8mr9533279icb.1.1366451783949; Sat, 20 Apr 2013 02:56:23 -0700 (PDT) Received: by 10.64.132.71 with HTTP; Sat, 20 Apr 2013 02:56:23 -0700 (PDT) Date: Sat, 20 Apr 2013 02:56:23 -0700 Message-ID: From: Dave Taht To: cerowrt-devel@lists.bufferbloat.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Juliusz Chroboczek Subject: [Cerowrt-devel] atomic route updates? X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2013 09:56:24 -0000 iproute2's ip/iproute2.c code has a function called iproute_modify, which to a blurring eye appears to be capable of doing an atomic route update via it's netlink interface. " if (matches(*argv, "change") =3D=3D 0 || strcmp(*argv, "chg") =3D= =3D 0) return iproute_modify(RTM_NEWROUTE, NLM_F_REPLACE, argc-1, argv+1); if (matches(*argv, "replace") =3D=3D 0) return iproute_modify(RTM_NEWROUTE, NLM_F_CREATE|NLM_F_REPL= ACE, argc-1, argv+1);" The babel native daemon and the quagga-re code, however, does a delete/add, which results in packets dropping on the floor when a route changes. Everyone that's tried to make this code do atomic updates has failed. Juliusz thinks this section of the codebase is cursed, and I personally, gave up, because dave miller had spent most of the last 3+ years eliminating the linux kernel route cache, (which was finally eliminated a few kernel versions back (3.6?)) and I figured all attempts at doing anything fancy with routing during that phase was going to break in odd ways until the new cache-free-linux-kernel routing code stabilized. OK, so, like, it's kernel 3.8 time now, and ... I find myself too scarred by previous attempts to give it a go myself, but I know that out there are intrepid explorers out there, just dying to delve into the gnarly details of netlink programming to keep a few more streams going full throttle in the face of a routing change! Yes? Anyone? So take a look at iproute2 and the relevant netlink code here: git://github.com/Quagga-RE/quagga-RE.git git://github.com/jech/babeld.git I note that I have a few other ideas for netlink-related changes to cero. Two of the big ones is that I'd like to be able to have a userspace daemon get back more details as to when *fq_codel drops a packet (e.g, send a multicast to a listener of the dropped the packet, and why), and get some sort of ongoing bandwidth estimate when it starts dropping, etc. I also have some hope for multi-prefix multi-homed routing too... but I find netlink really intimidating. It has an interface that only a bit-banger would love. --=20 Dave T=E4ht PS: I have a build of 3.8.8 at the moment that uses the new PROCD replacement for init that I'm losing a battle on, too. Also toke has got cero mostly independently buildable now. Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.= html