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 2EB72C4332F for ; Wed, 9 Nov 2022 08:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbiKII0V (ORCPT ); Wed, 9 Nov 2022 03:26:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbiKII0U (ORCPT ); Wed, 9 Nov 2022 03:26:20 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E31C13D16 for ; Wed, 9 Nov 2022 00:26:19 -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 dfw.source.kernel.org (Postfix) with ESMTPS id BD9E96186A for ; Wed, 9 Nov 2022 08:26:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 795BDC433D6; Wed, 9 Nov 2022 08:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667982378; bh=WIkYygIzkW3p8UnfJrEhjbp74yarOoLZHnmcoT19nO4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=svVKSm3rA6Vq1m2zGHksIX4nLnS6JVdCbriyEh5Pu9Q23T1j6Pt7qfEYO3/PAyi8M 42bwpFsaUKYb0eJgaYMWQW94Fn9q0e0EMSNjbwLDLesCCmk6Z4ObSOBPambSjl6oKX WmOtCnof9Qf6wadg92NaGYwn9clh57FLBTCKksMC2eQuNnc3XR9maJo16guveN7iWg QYQY74XP2gL7i2Xkb4z010Jj+Ec/R2VgISNB36aZO464dAMB2ORbXG7f8ktXLgqinL DBDxgVQA7ZHCNCm+18fkMp+cOUCHj0p+0ObaC68dbWhYMyvg0UYs+e1cdez8fU1aGJ ZPaIU+SMSCa8g== Date: Wed, 9 Nov 2022 10:26:14 +0200 From: Leon Romanovsky To: Yinjun Zhang Cc: David Miller , Jakub Kicinski , Paolo Abeni , Steffen Klassert , Herbert Xu , Chengtian Liu , HuanHuan Wang , Louis Peens , "netdev@vger.kernel.org" , oss-drivers , Simon Horman Subject: Re: [PATCH net-next v3 3/3] nfp: implement xfrm callbacks and expose ipsec offload feature to upper layer Message-ID: References: <20221101110248.423966-1-simon.horman@corigine.com> <20221101110248.423966-4-simon.horman@corigine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Nov 09, 2022 at 06:58:44AM +0000, Yinjun Zhang wrote: > On Mon, 7 Nov 2022 08:14:12 +0200, Leon Romanovsky wrote: > > On Tue, Nov 01, 2022 at 12:02:48PM +0100, Simon Horman wrote: > <...> > > > + > > > + /* General */ > > > + switch (x->props.mode) { > > > + case XFRM_MODE_TUNNEL: > > > + cfg->ctrl_word.mode = NFP_IPSEC_PROTMODE_TUNNEL; > > > + break; > > > + case XFRM_MODE_TRANSPORT: > > > + cfg->ctrl_word.mode = NFP_IPSEC_PROTMODE_TRANSPORT; > > > + break; > > > + default: > > > + nn_err(nn, "Unsupported mode for xfrm offload\n"); > > > > There are no other modes. > > Sorry this comment was neglected, but I have to say this is a good practice to avoid > newly introduced mode in future sneaking into HW while it's not supported. There is a subtitle difference between not-existent flows and not-supported ones. Good practice is to rely on upper level API to do the right thing from the beginning. Thanks