Cover Letter Detail
Show a cover letter.
GET /api/covers/813275/?format=api
{ "id": 813275, "url": "http://patchwork.ozlabs.org/api/covers/813275/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/cover/1505296780-8444-1-git-send-email-liuhangbin@gmail.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1505296780-8444-1-git-send-email-liuhangbin@gmail.com>", "list_archive_url": null, "date": "2017-09-13T09:59:38", "name": "[PATCHv2,iproute2,0/2] libnetlink: malloc correct buff at run time", "submitter": { "id": 15639, "url": "http://patchwork.ozlabs.org/api/people/15639/?format=api", "name": "Hangbin Liu", "email": "liuhangbin@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/cover/1505296780-8444-1-git-send-email-liuhangbin@gmail.com/mbox/", "series": [ { "id": 2859, "url": "http://patchwork.ozlabs.org/api/series/2859/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=2859", "date": "2017-09-13T09:59:38", "name": "libnetlink: malloc correct buff at run time", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2859/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/813275/comments/", "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"kJyIkK0V\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xscbr0w5Dz9s76\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 13 Sep 2017 20:00:23 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751703AbdIMKAT (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 13 Sep 2017 06:00:19 -0400", "from mail-pf0-f194.google.com ([209.85.192.194]:33265 \"EHLO\n\tmail-pf0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751054AbdIMKAQ (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 13 Sep 2017 06:00:16 -0400", "by mail-pf0-f194.google.com with SMTP id h4so7334319pfk.0\n\tfor <netdev@vger.kernel.org>; Wed, 13 Sep 2017 03:00:16 -0700 (PDT)", "from leo.usersys.redhat.com ([209.132.188.80])\n\tby smtp.gmail.com with ESMTPSA id\n\ts62sm26284740pfe.91.2017.09.13.03.00.12\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 13 Sep 2017 03:00:14 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=zzu5ZGgZi/VHcAmY6yfBGmP1fkgnspjBeBP9yV086TA=;\n\tb=kJyIkK0VH5tKVOUsEKQpeLxqP6on+PJz4KPj4RyJV/Ebxge18ggyDmbCJflQEoGTLT\n\tITrw6khNYLhgqW26L1IFaQRSMnJZgHehMKX8YkGxdnRJOysryoKIl3vCgxUfK/F3qh9D\n\tMt+t+fXnag8q4vRBvc5mW+5djR3HKZjL8e2SXPOe46WsEuE35VxeK5TxSLLVfuembfZy\n\tNqeIwGZyRrPreokcNO8bH8q8UQ1eiqkwTP1LhVwuChgeF1Kj4xkKRQ+75c1Ra4310X8u\n\tkEuxfhK6n/G+/EjQImExahTM+Mk/1NW7WPhJY0I4/m++I31P/3zFtsEUAFIS8G3cY1eu\n\t0OJA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=zzu5ZGgZi/VHcAmY6yfBGmP1fkgnspjBeBP9yV086TA=;\n\tb=JTXj/5mKE9+wnN7qCOx0OPKIo//L+EoKTRmt61HYgqfPpfPyyeTFWRPZ0VgCk3hqvf\n\tA8zysez01bHt2cwq6qpYxvjhbKR+i290WVZlafDIFA58kxM3KjGBqtZaiMgcNpNLg8dB\n\tTXcl8Y8UUReRO1TO1dF5qspZ+HVwbruTC211QVvxbaS/WUOY2nNda876TUI+losbwi0u\n\tQX+6qhr0LZMcZTWNhwP46+IDvNwz5IMho/l8PKvOcqsUjgQ6+6BAz4639BI89DXKBO57\n\t3/XQVPCK3ASjgjf4D4Krjf3vyj8480FeWCCWSl8AsLBmFbOzgDTtD0h8ITdZwB14FPY+\n\t1ibA==", "X-Gm-Message-State": "AHPjjUgovXhg3IFGgx6FHBY6GcI4WeuDZvx58gyLmMSekqdTylO6Tsc2\n\t5xhhIRPiQjSeE9Cn", "X-Google-Smtp-Source": "ADKCNb4LYdduIM1FRZn78ya88/kr8Seu1cpEX8/6zKAeFhw8NNaMmuUfrmeTD1/0pQJjdHUxiNWyLw==", "X-Received": "by 10.84.224.66 with SMTP id a2mr20143750plt.207.1505296815482; \n\tWed, 13 Sep 2017 03:00:15 -0700 (PDT)", "From": "Hangbin Liu <liuhangbin@gmail.com>", "To": "netdev@vger.kernel.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n\tMichal Kubecek <mkubecek@suse.cz>, Phil Sutter <phil@nwl.cc>,\n\tHangbin Liu <liuhangbin@gmail.com>", "Subject": "[PATCHv2 iproute2 0/2] libnetlink: malloc correct buff at run time", "Date": "Wed, 13 Sep 2017 17:59:38 +0800", "Message-Id": "<1505296780-8444-1-git-send-email-liuhangbin@gmail.com>", "X-Mailer": "git-send-email 2.5.5", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "With commit 72b365e8e0fd (\"libnetlink: Double the dump buffer size\") and\n460c03f3f3cc (\"iplink: double the buffer size also in iplink_get()\"), we\nextend the buffer size to avoid truncated message with large numbers of\nVFs. But just as Michal said, this is not future-proof since the NIC\nnumber is increasing. We have customer even has 220+ VFs now.\n\nThis is not make sense to hard code the buffer and increase it all the time.\nSo let's just malloc the correct buff size at run time.\n\nTested with most ip cmds and all look good.\n\n---\nChanges since v1 by Phil:\n* rtnl_recvmsg():\n * Rename output buffer pointer arg to 'answer'.\n * Use realloc() and make sure old buffer is freed on error.\n * Always return a newly allocated buffer for caller to free.\n * Retry on EINTR or EAGAIN so caller doesn't have to.\n * Return well-known negative error codes instead of just -1 on error.\n * Simplify goto label names.\n * If no answer pointer was passed, just free the buffer.\n* rtnl_dump_filter_l():\n * Don't retry if rtnl_recvmsg() returns 0 as this can't happen\n anymore.\n * Free buffer returned by rtnl_recvmsg().\n* __rtnl_talk():\n * Don't retry if rtnl_recvmsg() returns 0 as this can't happen\n anymore.\n * Free buffer returned by rtnl_recvmsg().\n * Return a newly allocated buffer for callers to free.\n* genl_ctrl_resolve_family()\n * Replace 'ghdr + GENL_HDRLEN' to 'answer + NLMSG_LENGTH(GENL_HDRLEN)'\n* tc_action_gd()\n * Call print_action() only if cmd == RTM_GETACTION\n* Change callers of rtnl_talk*() to always free the answer buffer if\n they passed one.\n* Drop extra request buffer space in callers if only used for holding\n output data.\n* Drop initialization of answer pointer if not necessary.\n* Change callers to pass NULL instead of answer pointer if they don't\n use it afterwards.\n\n\nHangbin Liu (2):\n lib/libnetlink: re malloc buff if size is not enough\n lib/libnetlink: update rtnl_talk to support malloc buff at run time\n\n bridge/fdb.c | 2 +-\n bridge/link.c | 2 +-\n bridge/mdb.c | 2 +-\n bridge/vlan.c | 2 +-\n genl/ctrl.c | 19 +++++---\n include/libnetlink.h | 6 +--\n ip/ipaddress.c | 4 +-\n ip/ipaddrlabel.c | 4 +-\n ip/ipfou.c | 4 +-\n ip/ipila.c | 4 +-\n ip/ipl2tp.c | 8 ++--\n ip/iplink.c | 38 +++++++--------\n ip/iplink_vrf.c | 44 ++++++++---------\n ip/ipmacsec.c | 2 +-\n ip/ipneigh.c | 2 +-\n ip/ipnetns.c | 23 +++++----\n ip/ipntable.c | 2 +-\n ip/iproute.c | 26 ++++++----\n ip/iprule.c | 6 +--\n ip/ipseg6.c | 8 ++--\n ip/iptoken.c | 2 +-\n ip/link_gre.c | 11 +++--\n ip/link_gre6.c | 11 +++--\n ip/link_ip6tnl.c | 11 +++--\n ip/link_iptnl.c | 10 ++--\n ip/link_vti.c | 11 +++--\n ip/link_vti6.c | 11 +++--\n ip/tcp_metrics.c | 8 ++--\n ip/xfrm_policy.c | 25 +++++-----\n ip/xfrm_state.c | 30 ++++++------\n lib/libgenl.c | 9 +++-\n lib/libnetlink.c | 132 +++++++++++++++++++++++++++++++++------------------\n misc/ss.c | 2 +-\n tc/m_action.c | 12 ++---\n tc/tc_class.c | 2 +-\n tc/tc_filter.c | 8 ++--\n tc/tc_qdisc.c | 2 +-\n 37 files changed, 296 insertions(+), 209 deletions(-)" }