From patchwork Sat Jan 23 04:53:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edwin Peer X-Patchwork-Id: 12041095 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MIME_NO_TEXT,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C9F4C433E0 for ; Sat, 23 Jan 2021 04:54:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 624D723A84 for ; Sat, 23 Jan 2021 04:54:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726662AbhAWEyQ (ORCPT ); Fri, 22 Jan 2021 23:54:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbhAWEyJ (ORCPT ); Fri, 22 Jan 2021 23:54:09 -0500 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B87C06174A for ; Fri, 22 Jan 2021 20:53:28 -0800 (PST) Received: by mail-pg1-x536.google.com with SMTP id p18so5206126pgm.11 for ; Fri, 22 Jan 2021 20:53:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=V/IQLdGVNKOhFlkJ7y6qwsXf4DTwRjGP0jAl6GlQ9+0=; b=FpUnmMaqvTr1oKTl4GiEW6KrFfYs9WCfDkokK442bDt3Vibjr8/9YX21xqk0N89vjY EjLLljU1CdOUHdWQ4da8clzC25uD9/bP7wdD/O2OJO89HuzVxsnTKyFqTLY8g944zM8c V/dmlfoKjyfmAxKqZy9l8kkT0K57qVgupLy5U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=V/IQLdGVNKOhFlkJ7y6qwsXf4DTwRjGP0jAl6GlQ9+0=; b=PUbzBHg7uBmZQU0j1uYgTwmrewszELNqvxkHsWYmjx3BhHqfpigrYAS5RU4dzo+60z nkeL4ckCCzlndD8CrTiH/vyBZ94+ywn7f/CqmK8JMET1CrdgZCJcLdAhNIysjQHkn3wk KoSVo0U9svaAF7qm3Z2Jb5/nNAyogPcJRCKxpbi2+22wiDPZqfLNWXsJUVNS3J5kPRu3 P31c56JnsJGyevDcZY1H2QIrNMk3vr5e2JWBk4rygl4gvVm2IUtxJJg2wAEadNdqfcx2 fAcCfsevlISJgVTw4p6ctOtm4VVO38VrmHfogG2EaoZXdukg4kX1tmtIiU6shug5YllY QZog== X-Gm-Message-State: AOAM533803qNHiVhrCD8uJIZLxFl6fJn3XPEFwuYwIhmox45hDu3ogHe +ZhyIqyqldrtC2/z/nRyeHszBqkk8/6EKu0r4Syvsj4VZ+GxHtMZPplW5+O7jHvPCbfR/7yFFEo n2NHfeqguEJK4miJe1sUcddLlOrnbgJQnesH1R7RAVybaOjnwxdjbB7WJviCXMMBPHmQElJT+ X-Google-Smtp-Source: ABdhPJxz2DlwR/Vm3s2byAKpB0nzcWcC7mxLyv5J7iPKH3Qoxi0FMeU7RfsIXmTAPBFMyMWVSHhB0Q== X-Received: by 2002:a62:4d03:0:b029:1ac:6159:4572 with SMTP id a3-20020a624d030000b02901ac61594572mr8574230pfb.10.1611377607491; Fri, 22 Jan 2021 20:53:27 -0800 (PST) Received: from hex.swdvt.lab.broadcom.net ([2600:8802:d04:de02::77c]) by smtp.gmail.com with ESMTPSA id d2sm10725832pjd.29.2021.01.22.20.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 20:53:25 -0800 (PST) From: Edwin Peer To: netdev@vger.kernel.org Cc: Edwin Peer , Jakub Kicinski , Andrew Gospodarek , Michael Chan , Stephen Hemminger , Michal Kubecek , David Ahern Subject: [PATCH net-next 0/4] support for 256 VFs in RTM_GETLINK Date: Fri, 22 Jan 2021 20:53:17 -0800 Message-Id: <20210123045321.2797360-1-edwin.peer@broadcom.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org RTM_GETLINK for greater than about 220 VFs truncates IFLA_VFINFO_LIST due to the maximum reach of nlattr's nla_len being exceeded. There is not a lot of enthusiasm for extensive fixes to the deprecated netlink ABI for VF config, but there appears to be even less appetite for the kinds of work arounds that would be necessitated in order to truly keep it frozen [1]. This series first addresses nla_nest_end()'s propensity to generate malformed netlink messages. The balance of the series comprises very minor ABI updates intended to be low impact, in order to address the remaining issues. First, the existing RTEXT_FILTER_SKIP_STATS is called upon to alleviate the problem when user space does not want statistics and then a minor tweak is introduced in two steps in order to promote the stats one level up in the hierarchy with the minimum of code churn. Finally, the kernel series is followed by an iproute2 series to take advantage of the changes. [1] https://lore.kernel.org/netdev/20210115225950.18762-1-edwin.peer@broadcom.com/ Edwin Peer (4): netlink: truncate overlength attribute list in nla_nest_end() rtnetlink: extend RTEXT_FILTER_SKIP_STATS to IFLA_VF_INFO rtnetlink: refactor IFLA_VF_INFO stats into rtnl_fill_vfstats() rtnetlink: promote IFLA_VF_STATS to same level as IFLA_VF_INFO include/net/netlink.h | 11 ++- include/uapi/linux/if_link.h | 1 + include/uapi/linux/netlink.h | 1 + include/uapi/linux/rtnetlink.h | 1 + lib/nlattr.c | 27 +++++++ net/core/rtnetlink.c | 132 +++++++++++++++++++++------------ 6 files changed, 122 insertions(+), 51 deletions(-)