Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp145830iob; Tue, 17 May 2022 21:48:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuFoUTYZ7lG++vMhrtCeaPHnbn0IJ8ExXyku+cYIPdgpfR+yHTDrJ3cZTH1Y7O5BpA8PO8 X-Received: by 2002:a17:90b:3884:b0:1dc:53dc:2703 with SMTP id mu4-20020a17090b388400b001dc53dc2703mr28861881pjb.104.1652849286016; Tue, 17 May 2022 21:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652849286; cv=none; d=google.com; s=arc-20160816; b=rrPhiljdZtN4KctgTLpoEfza0jMwHlihtdtJNE5yQZYMj1qdGrxZeWRTsjIhnHxz59 zbFaFpqzRC63XG6QBnH8Vs6Cd4WKhsF4gku2XzfrlU8YrOpOj0jNl34aI16wTNgsusR/ IbZPrTbX77y9St+djejEyjM7lzXyvsYNWE9jKnzIMYNWfCHyVv1IBBHeHWPpJeMANkQi bC+JOa+tXiY5u3Vu6/t/41jyVj0tw3s6f4MJgyOTVuCOBSf9kvOHYhrxVg/LrGnpUjcb wgEIaXatPlfzprd7/fBKiWXLT1r9hlBEHSaBeBo++Y9uJsejOFR8Bj9IwJIJMPWUuTbW aKjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=8U1UMJO6lMuPvxVoVzvgi2MLyng4q5uGVH6c9a5w1Bw=; b=NkIqz8Va78bktOuuRJPaH0E9A/EH8r65Pv9Si8OjhAH7ULbhxFY3I0YmZFOz3TRKQf SZcIDoNJgzzMkXPlh6sjZKYh8to7h3tvs9UKIDLTJBgQWZHaskuFgSc1fVum73r1CpQA j68kgYfStNbDbRlLbULdM8VgJoHwL0gvwOnXg7Ogj/pULae07umNqYDLp8ZL6WSotK7Z FFH87Ue+a9rV5AKRerp2kamyfXdFKUF/fTrZpO3LYuh7p+wafUIIDA5L2yHHdCT1JSdX 70fqIHuk24mSzU/NLywgn97Y2cKL8BL2VFoPM8by7+qdEAWccNjicu/GAVR2gs244ra8 NVnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20210112.gappssmtp.com header.s=20210112 header.b=gOnMTaEd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l30-20020a635b5e000000b003ab7a1a2193si1318472pgm.151.2022.05.17.21.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:48:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20210112.gappssmtp.com header.s=20210112 header.b=gOnMTaEd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 42F3F119934; Tue, 17 May 2022 20:59:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231348AbiEQWoZ (ORCPT + 99 others); Tue, 17 May 2022 18:44:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231219AbiEQWoY (ORCPT ); Tue, 17 May 2022 18:44:24 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DC464551B for ; Tue, 17 May 2022 15:44:22 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id u15so402024pfi.3 for ; Tue, 17 May 2022 15:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8U1UMJO6lMuPvxVoVzvgi2MLyng4q5uGVH6c9a5w1Bw=; b=gOnMTaEdFttEm6/q8XtGmPklahi2Ik82IJeay691COcljHc/LzBEOEZ+QVt5k3HkLF UnL/oGGGW2/VFzZgtbsSAur2VSqGY+QcnetKELX4zENMxP2HF4AD0pYpvRUUnfx5QxJJ /NYylHnGAula72P6fk/YTbEvjagUiN1WY+5HPfUadvcw/S7lMRuvf3B/RrMmhU6ZgDHg 0rBZ2xIkZ3i89x5tTMwUXfLT9vrslj1/p4kUQ4Lkfb9kV57oIL17dphdh2ka/Dw05b6q qUrM6QxLItmWu8bqC4Z9casbE/DLbJUeElEtqSO36fYxetMDZr4cbiCjhETywSexSnUx v8ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8U1UMJO6lMuPvxVoVzvgi2MLyng4q5uGVH6c9a5w1Bw=; b=hZxtC672Ei+lHEoJUrNitqOtH/rdZRyTbp+n0BM42b5QiuPCGFVgVbAGXnLtOI4McO uaQ8umN3kIt53yW0Yg7/XN3QxWXQbQO6+eDgXXueLgntBLhIlEIGdu34BT45k2XC0d1U aLWxhVIQcU9M4Io5rkp/T+stk+X0gmP/XE/yYlPICedhQkz6hxuKoQaLkxb4uxyTYlBe p9Us2z5Z6tm/gpPmwlLz0sevV3+EhSUiVHmIxr3IZLo1c4EpT4lA5caqVPGqd0Llo2MX nLa40MtJnxuWLJFwS64b5uq11m25AHVRWSafTqdl/Ooj1n451dqpEw6Y4c0xvc6SF2Qa Zvxw== X-Gm-Message-State: AOAM5323K1LDC4yMJIMHbC9PeeG+q1Gg+IlOrwF2okL+4euk/T1Jcn2K i+BEsagH7gzezCaWpCwKTioXSw== X-Received: by 2002:a63:1645:0:b0:3c2:4706:f62b with SMTP id 5-20020a631645000000b003c24706f62bmr21634955pgw.11.1652827462116; Tue, 17 May 2022 15:44:22 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id i24-20020a056a00225800b0050dc7628168sm257134pfu.66.2022.05.17.15.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 15:44:21 -0700 (PDT) Date: Tue, 17 May 2022 15:44:19 -0700 From: Stephen Hemminger To: Jonathan Toppins Cc: netdev@vger.kernel.org, Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org Subject: Re: [RFC net-next] bonding: netlink error message support for options Message-ID: <20220517154419.44a1cb6a@hermes.local> In-Reply-To: <5a6ba6f14b0fad6d4ba077a5230ee71cbf970934.1652819479.git.jtoppins@redhat.com> References: <5a6ba6f14b0fad6d4ba077a5230ee71cbf970934.1652819479.git.jtoppins@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 May 2022 16:31:19 -0400 Jonathan Toppins wrote: > This is an RFC because the current NL_SET_ERR_MSG() macros do not support > printf like semantics so I rolled my own buffer setting in __bond_opt_set(). > The issue is I could not quite figure out the life-cycle of the buffer, if > rtnl lock is held until after the text buffer is copied into the packet > then we are ok, otherwise, some other type of buffer management scheme will > be needed as this could result in corrupted error messages when modifying > multiple bonds. Might be better for others in long term if NL_SET_ERR_MSG() had printf like semantics. Surely this isn't going to be first or last case. Then internally, it could print right to the netlink message.