Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7546911rdb; Wed, 3 Jan 2024 22:50:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiY6H+xlO9pkqDhjqYGrpz//UMs4H139qpcd0f8FO7ASJYEw+7gPlPCWzfwjEYEfznAAEt X-Received: by 2002:a17:90a:2dce:b0:28c:e6c4:2af2 with SMTP id q14-20020a17090a2dce00b0028ce6c42af2mr194679pjm.59.1704351044636; Wed, 03 Jan 2024 22:50:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704351044; cv=none; d=google.com; s=arc-20160816; b=a/j9x2+b/2y2fbo8xVHMIVrjtLaBpzXVAHGEbWbsbEVX1y3ibcDaikQ4sVoGmFl7wZ gZ2jvrkoSIFkuDDVQDMmebn0EwS7ZrGK8UPzTO+4uSaCYLsYP//570RbYjFt7PorqbhK e0N28Xk0D9nT437VD817cLjw2OkWceadkyix5RMbOPgSO1iQq0xWoAGTbpQ2SBO/Dv0p Dn9hYw15LxXyJXC8fzQKydYCwQrlVivBx5ZByGW/Tw89exPrLz+5SzGjzrW/LGdp/2eR Rb/sp2FWXetAYLLYpafhaGXAs2D9PgBuhHxGv2iW1639UkUrI+apCKf3kSxo4nxC2asb OyzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=aJl+oHXDo4ELtFcCjq6IsOosLDZjjl73qKxSGl/upMk=; fh=u9/zwhYyDoRWCWcU++eJmD2N5WN1UdWwpq/fHlAry9U=; b=h4/fcW4rH27Z9lf2TTODma4bpIqYRBiFls/fbIyuZySlBrzsnHE+pVR447wgAWj3H+ MNQG4muRAqWA7qs30tuRNx0hYiBLCHxaih6dkCRQVYsPY/kxIbvRh2c7mHk5QGwt6J4f LEGObLB+IUv++zmIsGOjPWU4YVlvu66Sk8l5rHG4C8eM5aYOiq0f7Cn2hRRyPXqqQ0kR Xddcp9AyIQfjHSCVjwKl2XuUCDcIQaJwlLx3sfjPYlRFTvfuGYIClVjJ9HVDK+DZgxiI KRlVRaRCKD9jQj8mcV+Vj6g8yHD8EK+ywpFP1SsjnYVEtZLNS7c1h8mf705R6Av+OBwH TtJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b="Sd/Ezowo"; spf=pass (google.com: domain of linux-kernel+bounces-16294-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16294-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id hg24-20020a17090b301800b0028ced82a7dcsi1960845pjb.4.2024.01.03.22.50.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 22:50:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16294-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b="Sd/Ezowo"; spf=pass (google.com: domain of linux-kernel+bounces-16294-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16294-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A6104B2250C for ; Thu, 4 Jan 2024 06:50:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44AEB1DFE2; Thu, 4 Jan 2024 06:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=codeconstruct.com.au header.i=@codeconstruct.com.au header.b="Sd/Ezowo" X-Original-To: linux-kernel@vger.kernel.org Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 868131D532; Thu, 4 Jan 2024 06:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codeconstruct.com.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=codeconstruct.com.au Received: from pecola.lan (unknown [159.196.93.152]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id 9D2CC20154; Thu, 4 Jan 2024 14:43:38 +0800 (AWST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1704350619; bh=aJl+oHXDo4ELtFcCjq6IsOosLDZjjl73qKxSGl/upMk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Sd/Ezowo3UGOPhnaBd9xa5LGyC3pxxL1kYJ3Cgay8BdpEaIjZz82Qap0tVyMNZSqR v8SfsLQ3OA6vENR+B3GFnSvUegvAJ6SmW5iAhyn1uAalhDoibGkObtjvYPJ+q/+Gut Ezw5fB1zFkOpcWoqldk+UnmqvEgZdicRdEA0hFzNtD3T3OI60NhvA0+o5tPMMjTa8K FAxTv6+hWJECdm/GjhjJmEoBugaJRDzpZJOowXyXXey+2E7cEEbLSeYQySSNZ7Mwpn Y9KDHFMb8sjs+RI5A6kJKNOt9RLIrAPpXB+/o7gpnCX6FrHe0xM1Ut3YoRZrmTHxpI IiuYZAXwhSdsw== Message-ID: Subject: Re: [PATCH net-next v1] net: mctp: use deprecated parser in mctp_set_link_af From: Jeremy Kerr To: Lin Ma , Jakub Kicinski Cc: matt@codeconstruct.com.au, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 04 Jan 2024 14:43:38 +0800 In-Reply-To: <7cbc3044.688a7.18cd32c5f14.Coremail.linma@zju.edu.cn> References: <20231228070258.3052422-1-linma@zju.edu.cn> <20240103174719.2b2c1565@kernel.org> <7cbc3044.688a7.18cd32c5f14.Coremail.linma@zju.edu.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi Lin, > (1) will get AF_MCTP with nla_type(...) call, and (2) will then > passing `af` to `mctp_set_link_af`, which will expect the > `NLA_F_NESTED` flag. You could set that flag? It's not exclusive with the attribute type. From netlink.h: /* * nla_type (16 bits) * +---+---+-------------------------------+ * | N | O | Attribute Type | * +---+---+-------------------------------+ * N :=3D Carries nested attributes * O :=3D Payload stored in network byte order * * Note: The N and O flag are mutually exclusive. */ Which is what we do with existing userspace: https://github.com/CodeConstruct/mctp/blob/6aa4b052d/src/mctp.c#L569C1-L5= 69C1 Cheers, Jeremy