From patchwork Thu Jul 30 02:03:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Arad, Ronen" X-Patchwork-Id: 501899 X-Patchwork-Delegate: shemminger@vyatta.com 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.180.67]) by ozlabs.org (Postfix) with ESMTP id D0E451402CD for ; Thu, 30 Jul 2015 12:03:14 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752544AbbG3CDJ (ORCPT ); Wed, 29 Jul 2015 22:03:09 -0400 Received: from mga02.intel.com ([134.134.136.20]:23578 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751371AbbG3CDI (ORCPT ); Wed, 29 Jul 2015 22:03:08 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 29 Jul 2015 19:03:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,574,1432623600"; d="scan'208";a="774060877" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga002.jf.intel.com with ESMTP; 29 Jul 2015 19:03:07 -0700 Received: from orsmsx161.amr.corp.intel.com (10.22.240.84) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 29 Jul 2015 19:03:06 -0700 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.88]) by ORSMSX161.amr.corp.intel.com ([169.254.4.153]) with mapi id 14.03.0224.002; Wed, 29 Jul 2015 19:03:06 -0700 From: "Arad, Ronen" To: Alexandre DERUMIER , netdev CC: pve-devel Subject: RE: bridge vlan range, kernel 4.1 : "message truncated" warning when too much vlans defined Thread-Topic: bridge vlan range, kernel 4.1 : "message truncated" warning when too much vlans defined Thread-Index: AdDKa997+Jjdv4jOQKe3E3pWRc+Dxg== Date: Thu, 30 Jul 2015 02:03:06 +0000 Message-ID: References: <1522237479.23555412.1438194289391.JavaMail.zimbra@oxygem.tv> In-Reply-To: <1522237479.23555412.1438194289391.JavaMail.zimbra@oxygem.tv> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The easiest fix is in iproute2. Increasing the buffer size used in rtnl_dump_filter_l 3x empirically resolves the issue. The root-cause is due to the buffer size calculation of dump request in the kernel. It is based on the total number of VLANs and does not account for compressed vlan requests. The flag argument is not propagated to get size functions. Fixing the size calculation in the kernel would work most of the time but would Fail when the number of ranges (and/or non-contiguous VLANs) exceeds ~1800. Therefore, fixing the size calculation in the kernel does not worth the Effort. Fixing iproute2 seems the easy way to overcome the issue. Ronen >-----Original Message----- >From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On >Behalf Of Alexandre DERUMIER >Sent: Wednesday, July 29, 2015 11:25 AM >To: netdev >Cc: pve-devel >Subject: bridge vlan range, kernel 4.1 : "message truncated" warning when too >much vlans defined > >Hi, > >I'm currently testing vlan range on bridge filtering with kernel 4.1. > > >If I defined too much vlans, or too big vlan range, >I have a warning "message truncated", even if I'm using "-c" > > ># bridge -c vlan >Message truncated >port vlan ids >eth2 1 PVID Egress Untagged > >bond0 1 PVID Egress Untagged >2-1850 > >vmbr0 1 PVID Egress Untagged >94 > > >or ># bridge -c vlan >Message truncated >port vlan ids >eth2 1 PVID Egress Untagged >2-900 >bond0 1 PVID Egress Untagged >2-900 > >vmbr0 1 PVID Egress Untagged >94 > > > >Also, more important, this is also impact "ip", and truncate the output > >#ip link > >Message truncated >1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode >DEFAULT group default >link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 >2: eth2: mtu 9000 qdisc pfifo_fast master >vmbr1 state DOWN mode DEFAULT group default qlen 1000 >link/ether 00:15:17:80:29:e6 brd ff:ff:ff:ff:ff:ff >3: eth3: mtu 1500 qdisc noop state DOWN mode DEFAULT >group default qlen 1000 >link/ether 00:15:17:80:29:e7 brd ff:ff:ff:ff:ff:ff >4: eth0: mtu 1500 qdisc mq master >bond0 state UP mode DEFAULT group default qlen 1000 >link/ether 00:1a:a0:3c:98:c5 brd ff:ff:ff:ff:ff:ff >5: eth5: mtu 9000 qdisc pfifo_fast master >ovs-system state UP mode DEFAULT group default qlen 1000 >link/ether 68:05:ca:09:c3:7c brd ff:ff:ff:ff:ff:ff >6: eth4: mtu 9000 qdisc pfifo_fast master >ovs-system state UP mode DEFAULT group default qlen 1000 >link/ether 68:05:ca:09:c3:7d brd ff:ff:ff:ff:ff:ff >7: eth1: mtu 1500 qdisc mq master >bond0 state UP mode DEFAULT group default qlen 1000 >link/ether 00:1a:a0:3c:98:c5 brd ff:ff:ff:ff:ff:ff >8: ovs-system@NONE: mtu 1500 qdisc noop state DOWN mode >DEFAULT group default >link/ether 7e:dd:5d:ea:ef:26 brd ff:ff:ff:ff:ff:ff >9: vmbr10@NONE: mtu 9000 qdisc noqueue state >UNKNOWN mode DEFAULT group default >link/ether 68:05:ca:09:c3:7d brd ff:ff:ff:ff:ff:ff >10: bond1@NONE: mtu 9000 qdisc noqueue state >UNKNOWN mode DEFAULT group default >link/ether 8a:c3:da:b0:9d:87 brd ff:ff:ff:ff:ff:ff >11: bond0@NONE: mtu 1500 qdisc >noqueue master vmbr0 state UP mode DEFAULT group default >link/ether 00:1a:a0:3c:98:c5 brd ff:ff:ff:ff:ff:ff >12: vmbr0@NONE: mtu 1500 qdisc noqueue state >UP mode DEFAULT group default >link/ether 00:1a:a0:3c:98:c5 brd ff:ff:ff:ff:ff:ff >13: vmbr0.94@vmbr0: mtu 1500 qdisc noqueue >state UP mode DEFAULT group default >link/ether 00:1a:a0:3c:98:c5 brd ff:ff:ff:ff:ff:ff > >---->should have more interfaces here > > >Is it a known bug ? > > > >Regards, > >Alexandre Derumier > >-- >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 diff --git a/lib/libnetlink.c b/lib/libnetlink.c index 901236e..25c1c02 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -198,7 +198,7 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth, .msg_iov = &iov, .msg_iovlen = 1, }; - char buf[16384]; + char buf[3*16384]; int dump_intr = 0; iov.iov_base = buf;