Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp603493rdb; Tue, 15 Aug 2023 06:46:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVRysK8HfyBZfVmmBoqijXmxA1AH6WfAKQvAbqOCIfcaX6K1zHF2xdse3MoHEnDOx03yJV X-Received: by 2002:a17:90b:304:b0:262:f449:4497 with SMTP id ay4-20020a17090b030400b00262f4494497mr11146179pjb.2.1692107183689; Tue, 15 Aug 2023 06:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692107183; cv=none; d=google.com; s=arc-20160816; b=zBmQjgkKDIcIIzIwneciS5w7s7xcT4E9IcEBlPhdXkvZIfEx88e69Jix2ZVPKpTr6R MEfKKLdQHRU+VgrwFZ8UnZvcVTMjpUKN7wBUk7MehvHiep7RBshRbxE6fDjmWGchJYyj 2MvVvNnteSFBLIy7g9wayJmbcfbZd9w+Fej36H4krR5IUoQAow5JENOuLEO4e1bmq0ZL OMk65IZvpODMfJXaGuw3EEHx1HD1RlNnP9XujsCFlEjQS/ZCTAnbjx4jqmAQ+Hc+OzAQ DN0K0KLZfP+2iYjbV5JngIvrrd4pibL5XAZrw5Trw1Cv+xTvHKHdyBSiwQM8ctgjbxK4 AxKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=BDrpzXWSuPHWCipFAvQc4yqKvFfUZVioR+F3ve6PHz4=; fh=yeDhtSD+8k+afc3zBQntiHpR4hifV97powz4uIh+b4M=; b=f/KQnwwxjKmqe5+ZFbAjb9doE50Y4i2EGieeDhLYj3lzqQhU6JZVWQwHEpoCHhVOio ckGUnmhUqScVESzDNTDRZrI90Bb/AGQptg6p4guLbzaSg0or/wQy/x0ebXn9nARmJ1vS iJJ82kPbuMnUmtXIGJabPqXnPt4SgZJ9eDU2en2LNYskAm9DcRqenqt08hyK5kwLo0+i J+y272Y4G1FH9XTAVjsVFhZB8lkh9SLAFvdwcJ2QRQmn5dR5Imz+5Xv2MHRIrJ+c2bVF yL45DIWcAe64us2bPX/dIVB0N6gGGqcp//5IhxneQBJ8MFsCiszcjCiYm+9AO4m0d1aD sMBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij13-20020a170902ab4d00b001bdc0ff37f7si6670999plb.66.2023.08.15.06.45.58; Tue, 15 Aug 2023 06:46:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234821AbjHOGG5 (ORCPT + 99 others); Tue, 15 Aug 2023 02:06:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235003AbjHOGF7 (ORCPT ); Tue, 15 Aug 2023 02:05:59 -0400 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:237:300::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE5C01FCE; Mon, 14 Aug 2023 23:05:11 -0700 (PDT) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1qVnAk-0003Qz-9Z; Tue, 15 Aug 2023 08:04:54 +0200 Date: Tue, 15 Aug 2023 08:04:54 +0200 From: Florian Westphal To: Leon Romanovsky Cc: Dong Chenchen , steffen.klassert@secunet.com, herbert@gondor.apana.org.au, davem@davemloft.net, fw@strlen.de, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, timo.teras@iki.fi, yuehaibing@huawei.com, weiyongjun1@huawei.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Patch net, v2] net: xfrm: skip policies marked as dead while reinserting policies Message-ID: <20230815060454.GA2833@breakpoint.cc> References: <20230814140013.712001-1-dongchenchen2@huawei.com> <20230815060026.GE22185@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230815060026.GE22185@unreal> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,T_SPF_TEMPERROR autolearn=ham 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 Leon Romanovsky wrote: > > dir = xfrm_policy_id2dir(policy->index); > > - if (policy->walk.dead || dir >= XFRM_POLICY_MAX) > > + if (dir >= XFRM_POLICY_MAX) > > This change is unnecessary, previous code was perfectly fine. Are you sure? AFAICS walker struct has no 'index' member.