From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E685C54E94 for ; Wed, 25 Jan 2023 19:02:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235506AbjAYTCd (ORCPT ); Wed, 25 Jan 2023 14:02:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235915AbjAYTCc (ORCPT ); Wed, 25 Jan 2023 14:02:32 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58969CDCB; Wed, 25 Jan 2023 11:02:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 17F46B81B8C; Wed, 25 Jan 2023 19:02:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8F3DC433D2; Wed, 25 Jan 2023 19:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674673348; bh=RP5Va6toXXyTmcOr/ME//AhDzcNFVNsgf8+hwufjGl0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OvZAxPfjKXDdktK4TkpLMXDuL4L107cdVVZ70PnwD568R3gI+0pb9bt8L790fN2cO 0EzUCDa6kkq9wiKJndJf4Ce6tFT6lhgwjkri5ihpOt5PBf3p67zOOvnwlXLab5eFiw uZz5SAcXwp6zfrhiZf/23QjiJL41EE2/yvMvIZlRFcS1aFtBfMB9pePhbuhwV2FK7R hQpP731ZhIaxFfP/jW1ElFNHHCWNw/avRemfV0YMNfl7cCLsdJEHKf/4DubkALGlhv kj8g0I5R7tiLa4hLJtPKkhQ2xpa25WBjEdydJD/flvD/WZ/xs/m4FQa5IQoWyJqlYh hCmuU/ozTe4xg== Date: Wed, 25 Jan 2023 11:02:26 -0800 From: Jakub Kicinski To: Leon Romanovsky Cc: "David S . Miller" , Steffen Klassert , Leon Romanovsky , Andy Gospodarek , Ayush Sawal , Eric Dumazet , Herbert Xu , intel-wired-lan@lists.osuosl.org, Jay Vosburgh , Jesse Brandeburg , Jonathan Corbet , linux-doc@vger.kernel.org, netdev@vger.kernel.org, oss-drivers@corigine.com, Paolo Abeni , Raju Rangoju , Saeed Mahameed , Simon Horman , Tony Nguyen , Veaceslav Falico Subject: Re: [PATCH net-next v1 01/10] xfrm: extend add policy callback to set failure reason Message-ID: <20230125110226.66dc7eeb@kernel.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 24 Jan 2023 13:54:57 +0200 Leon Romanovsky wrote: > - err = dev->xfrmdev_ops->xdo_dev_policy_add(xp); > + err = dev->xfrmdev_ops->xdo_dev_policy_add(xp, extack); > if (err) { > xdo->dev = NULL; > xdo->real_dev = NULL; > xdo->type = XFRM_DEV_OFFLOAD_UNSPECIFIED; > xdo->dir = 0; > netdev_put(dev, &xdo->dev_tracker); > - NL_SET_ERR_MSG(extack, "Device failed to offload this policy"); In a handful of places we do: if (!extack->msg) NL_SET_ERR_MSG(extack, "Device failed to offload this policy"); in case the device did not provide the extack. Dunno if it's worth doing here.