From owner-freebsd-arch@FreeBSD.ORG Sun Jan 26 23:35:47 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54D9F9F2; Sun, 26 Jan 2014 23:35:47 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id 1FE04228D; Sun, 26 Jan 2014 23:35:45 +0000 (UTC) Message-ID: <52E59B93.90304@FreeBSD.org> Date: Mon, 27 Jan 2014 03:34:43 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: "Alexander V. Chernikov" , "net@freebsd.org" Subject: Re: "slow path" in network code || IPv6 panic on inteface removal References: <52E21721.5010309@yandex-team.ru> In-Reply-To: <52E21721.5010309@yandex-team.ru> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, hackers@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jan 2014 23:35:47 -0000 Hello, Alexander, probably it would be better, it you split your patch into two. The one, that implements this: > What exactly is proposed: > - Another one netisr queue for handling different types of packets > - metainfo is stored in mbuf_tag attached to packet > - ifnet departure handler taking care of packets queued from/to killed > ifnet > - API to register/unregister/dispath given type of traffic And second, that shows usage example: > #5 T2 calls nd6_ifptomac() which reads interface MAC from ifp->if_addr > > #6 User inspects core generated by previous call > > Using new API, we can avoid #6 by making the following code changes: > * LLE timer does not drop/reacquire LLE lock > * we require nd6_ns_output callers to lock LLE if it is provided > * nd6_ns_output() uses "slow" path instead of sending mbuf to > ip6_output() immediately if LLE is not NULL. -- WBR, Andrey V. Elsukov From owner-freebsd-arch@FreeBSD.ORG Mon Jan 27 20:23:09 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F40EDDC8; Mon, 27 Jan 2014 20:23:08 +0000 (UTC) Received: from mail-qc0-x22c.google.com (mail-qc0-x22c.google.com [IPv6:2607:f8b0:400d:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4C801DB2; Mon, 27 Jan 2014 20:23:08 +0000 (UTC) Received: by mail-qc0-f172.google.com with SMTP id c9so8901270qcz.31 for ; Mon, 27 Jan 2014 12:23:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=RxCkGlcbLExsPnrxDNQgyQLespxWMTFSwvuizWE5Nnc=; b=lXszfcnSV4653QWrbUQQ6DJ98UXQCXBtFtc5N1kPoEIMQ7aKRzLZKOkKeEFouqDwwo 0OpIaq4u7Dfm519qhifPY5fLmUsqoyosgEvoazKHQXZlL+JYI08bsFAhqkuEPFcU+LEC cedDuoCvYjsNAT+RXHZK1zvBzZKWcvBf/BSxLsapQTRpDqTMriKbri1xSywfONpXjeTx uqodbxQQpVeQkJQm5gclue0JLMGtSD1hJ3vZaYoU7nq90OSnSnOLDKiYhlNsXp2kdmjM ZfmSoiR5chW/FkbBdHNvURS9BXnRRQI7YSvVZ97+PCDgTTc7kf0+nHzOWnya7un9RT5R lsiQ== MIME-Version: 1.0 X-Received: by 10.224.122.208 with SMTP id m16mr46425650qar.55.1390854187930; Mon, 27 Jan 2014 12:23:07 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Mon, 27 Jan 2014 12:23:07 -0800 (PST) Date: Mon, 27 Jan 2014 12:23:07 -0800 X-Google-Sender-Auth: VrWtfFIAKoQaqamrf79udvoViok Message-ID: Subject: flowtable - FL_HASH_ALL From: Adrian Chadd To: "freebsd-arch@freebsd.org" , FreeBSD Net Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2014 20:23:09 -0000 Hi, What's FL_HASH_ALL supposed to do? Is the flowtable code going to do any kind of 4-tuple hashing if it isn't set? -a From owner-freebsd-arch@FreeBSD.ORG Thu Jan 30 15:18:29 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71788CE6; Thu, 30 Jan 2014 15:18:29 +0000 (UTC) Received: from mail-qc0-x234.google.com (mail-qc0-x234.google.com [IPv6:2607:f8b0:400d:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 229411601; Thu, 30 Jan 2014 15:18:29 +0000 (UTC) Received: by mail-qc0-f180.google.com with SMTP id i17so5178873qcy.11 for ; Thu, 30 Jan 2014 07:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=ugcUvCRSsoGpTtfZbv0Uhnr4LqgB0lzB/VnS6jy4UO4=; b=pl2xqtvo2xByrojDI07wxBJuZQHV3freN+XlfHzdCDo1GOHkZNAJmcJp6r5HxFwRSP QsgtoBoHFM4MO7AFvUphy2Cr13fRvOh2MppC44R/MXuyFvrg/bgsBhHTH54uzspd7I9v HUBiKAnhxtd3zb/R5wWY5kDANHHPzhEwFqYCOYbW59W1IkEUbct3EgAJHkfN/117P1yy rTwCJeeMIfDp6btQy50fjlgEeOhLbT6zCqGhpwXCec3rhciSEcUhYlCZ5wfQ41toOJTQ EsvhM0xOnsrJ/sVy9N64+ICFzbnmHEL/ggqevC8DKPdtHKFbutWHZhDu3t9gIuEX5q7k ttPQ== MIME-Version: 1.0 X-Received: by 10.229.35.194 with SMTP id q2mr22669825qcd.7.1391095108227; Thu, 30 Jan 2014 07:18:28 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Thu, 30 Jan 2014 07:18:28 -0800 (PST) Date: Thu, 30 Jan 2014 07:18:28 -0800 X-Google-Sender-Auth: b7mz-_vmvNsP2ykU0q8_bR9XTA8 Message-ID: Subject: From: Adrian Chadd To: FreeBSD Net , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jan 2014 15:18:29 -0000 Hi, I'd like to disable the code in flowtable.c that assigns the mbuf flowid. I'd like to ensure that any mbuf flowid that's set is (eventually) going to be consistently toeplitz in the future (to match what NICs are doing on the RX side) and this may cause the flowid to be set to something completely different. I've only done some light production testing with this so far, to no visible ill effects. What do people think? Thanks, -a Index: sys/net/flowtable.c =================================================================== --- sys/net/flowtable.c (revision 261001) +++ sys/net/flowtable.c (working copy) @@ -1102,10 +1102,12 @@ if (af == AF_INET6) fle = flowtable_lookup_mbuf6(ft, m); #endif +#if 0 if (fle != NULL && m != NULL && (m->m_flags & M_FLOWID) == 0) { m->m_flags |= M_FLOWID; m->m_pkthdr.flowid = fle->f_fhash; } +#endif return (fle); } From owner-freebsd-arch@FreeBSD.ORG Thu Jan 30 18:40:44 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABF44B87; Thu, 30 Jan 2014 18:40:44 +0000 (UTC) Received: from mail-qc0-x22c.google.com (mail-qc0-x22c.google.com [IPv6:2607:f8b0:400d:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B9B21909; Thu, 30 Jan 2014 18:40:44 +0000 (UTC) Received: by mail-qc0-f172.google.com with SMTP id c9so5627888qcz.31 for ; Thu, 30 Jan 2014 10:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=uiFIhVVAE6V9Nvpvo/jiWNAsVutM+eIUHimqf4JIi8M=; b=i/WGkaTck6R5QkObIVBYWjQKlR+76HfqpcZjJHsW0JRsVaX/yzwkZCegd1dSdDvwBm 1qlm0fY/M23u+SspaMJFURsFvQ3tZG96S9SxZv540bcPcTHqaByErk8N6gb+mC9ZrvX4 D+JOE6dns5n6xwEhAhK5u1LKeLEYyVuxbD5D9ztEAyiGMpM7mOJRvDH7uxtatYGjUsvH 8/jWRMazBOrNJkf9t9w3OLvTARaeIx4X/4OmrMD94PMz+AfmqGZ3jnQeqiPPziLXN9II 3YBs66a0lJQWC23bHne7h1lhacSkIYpWDeTRu63KmsZi+5ymrISnNRJQetPedS8ZdDgG fMYw== MIME-Version: 1.0 X-Received: by 10.140.96.180 with SMTP id k49mr22717122qge.4.1391107243141; Thu, 30 Jan 2014 10:40:43 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Thu, 30 Jan 2014 10:40:43 -0800 (PST) Date: Thu, 30 Jan 2014 10:40:43 -0800 X-Google-Sender-Auth: _UpKv-12afRRAdwR0t63cd57tik Message-ID: Subject: Re: (removing mbuf flowid setup in flowtable.c) From: Adrian Chadd To: FreeBSD Net , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jan 2014 18:40:44 -0000 On 30 January 2014 07:18, Adrian Chadd wrote: > Hi, > > I'd like to disable the code in flowtable.c that assigns the mbuf flowid. > > I'd like to ensure that any mbuf flowid that's set is (eventually) > going to be consistently toeplitz in the future (to match what NICs > are doing on the RX side) and this may cause the flowid to be set to > something completely different. > > I've only done some light production testing with this so far, to no > visible ill effects. > > What do people think? Someone pointed out privately that doing this would mean that UDP flows without flow ids would suddenly not have flowids any longer and thus wouldn't use multiple output queues. So, I'll leave this alone for now until I can import the toeplitz hash code into -HEAD and add an option to tag outbound udp frames with this particular flowid hash. Thanks, -a > Thanks, > > > -a > > > Index: sys/net/flowtable.c > =================================================================== > --- sys/net/flowtable.c (revision 261001) > +++ sys/net/flowtable.c (working copy) > @@ -1102,10 +1102,12 @@ > if (af == AF_INET6) > fle = flowtable_lookup_mbuf6(ft, m); > #endif > +#if 0 > if (fle != NULL && m != NULL && (m->m_flags & M_FLOWID) == 0) { > m->m_flags |= M_FLOWID; > m->m_pkthdr.flowid = fle->f_fhash; > } > +#endif > return (fle); > } From owner-freebsd-arch@FreeBSD.ORG Thu Jan 30 18:49:07 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1591BD64 for ; Thu, 30 Jan 2014 18:49:07 +0000 (UTC) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D23861960 for ; Thu, 30 Jan 2014 18:49:06 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id ar20so3669989iec.10 for ; Thu, 30 Jan 2014 10:49:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=G6zJZbKaq2ujxL42jBzDatR2Zr2Mcq4ojANg6Msl+JY=; b=SiOQYouAtaWeWa997mYo7oQirvGOBmaxUYFAPxRzOo8uy8fif/hO/hluJ6pu7gD9/g byS8H7bzmqZF8S23vVpSOW0UT4NOCuDjMvVWw2H4t1RNMj++gSRJ7Dtxtj/0h2miJrIV 6xG4F1dtXgnv7BHXQur2UL/Y0Md6Vc9bsLH/fA9wZ3ZmYHafy/A4+kEQtBARA0QDMC8f /YkImMuDYHQ52lvh0Fht7QLh4Nl6kzUWBLHFAemKTrJ0TAmIhzY+diAramidvDaerdB5 0LX7dP1X9PBbprMQWiX33ECqdZuVw6+lPZ/A4bB0J3LvteXel/Nbel/NPg6EWqNsrlSe AWbA== X-Gm-Message-State: ALoCoQmILiMlyCNlPlLCclnGdcI8QW8uf1jR1y42TtPyhZDwPzHYwuB6W6KZFkF6NkMUgloA6AwE X-Received: by 10.50.138.37 with SMTP id qn5mr18540543igb.36.1391107740401; Thu, 30 Jan 2014 10:49:00 -0800 (PST) Received: from fusionlt2834a.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPSA id t4sm81981674igm.10.2014.01.30.10.48.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 10:48:59 -0800 (PST) Sender: Warner Losh Subject: Re: (removing mbuf flowid setup in flowtable.c) Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Thu, 30 Jan 2014 11:48:57 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <87746AA8-4759-4302-883C-25CDAC95C322@bsdimp.com> References: To: Adrian Chadd X-Mailer: Apple Mail (2.1085) Cc: FreeBSD Net , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jan 2014 18:49:07 -0000 On Jan 30, 2014, at 11:40 AM, Adrian Chadd wrote: > On 30 January 2014 07:18, Adrian Chadd wrote: >> Hi, >>=20 >> I'd like to disable the code in flowtable.c that assigns the mbuf = flowid. >>=20 >> I'd like to ensure that any mbuf flowid that's set is (eventually) >> going to be consistently toeplitz in the future (to match what NICs >> are doing on the RX side) and this may cause the flowid to be set to >> something completely different. >>=20 >> I've only done some light production testing with this so far, to no >> visible ill effects. >>=20 >> What do people think? >=20 > Someone pointed out privately that doing this would mean that UDP > flows without flow ids would suddenly not have flowids any longer and > thus wouldn't use multiple output queues. >=20 > So, I'll leave this alone for now until I can import the toeplitz hash > code into -HEAD and add an option to tag outbound udp frames with this > particular flowid hash. toeplitz is a funky kind of matrix, according to google. What does that = have to do with mbufs? :) Warner From owner-freebsd-arch@FreeBSD.ORG Thu Jan 30 18:50:32 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B194F81; Thu, 30 Jan 2014 18:50:32 +0000 (UTC) Received: from mail-qc0-x22c.google.com (mail-qc0-x22c.google.com [IPv6:2607:f8b0:400d:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 38D1E1977; Thu, 30 Jan 2014 18:50:32 +0000 (UTC) Received: by mail-qc0-f172.google.com with SMTP id c9so5647531qcz.31 for ; Thu, 30 Jan 2014 10:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=nDUF5NlLj7vyiYJ7D9I5i7McjwlQ38+thwDPkwxt9SY=; b=i/MNjsSJ0WTffo7iHwtzQVUrvv/IgwfvFP057VWD3YO+jHhFy9yoI2E2otlLKjq3Tw 4BFj46BlGmlBgTKs0gnFK1XX1ZwljAEzMiyhq0b+DRnH4CaeyUFSdh6rynwLcSWos9CZ myQ+QB9z82T1tM3Kx9toFFqHgUZttu5LCI5L8ND+knd7WdRq+4jqgkG1rVnUeb5VdnxS 8/8gSWaURDDQddh/HYNplDJ2jzZ6RZp+SeoVm7MgsKVYGV3VfCGG/+u80boxIhbL/On/ 5vMWH3lX4uDv827tuhz3QZaIasbDxTW686DU/h090Gta6h14YQtxDMnZ/FO7FP8TIV7U G3fg== MIME-Version: 1.0 X-Received: by 10.140.24.71 with SMTP id 65mr23460311qgq.12.1391107831471; Thu, 30 Jan 2014 10:50:31 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Thu, 30 Jan 2014 10:50:31 -0800 (PST) In-Reply-To: <87746AA8-4759-4302-883C-25CDAC95C322@bsdimp.com> References: <87746AA8-4759-4302-883C-25CDAC95C322@bsdimp.com> Date: Thu, 30 Jan 2014 10:50:31 -0800 X-Google-Sender-Auth: iLb-IZ3u7wCTL9TuDs_QIrhanZk Message-ID: Subject: Re: (removing mbuf flowid setup in flowtable.c) From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Net , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jan 2014 18:50:32 -0000 On 30 January 2014 10:48, Warner Losh wrote: > > toeplitz is a funky kind of matrix, according to google. What does that have to do with mbufs? :) google "toeplitz hash rss". :-) -a