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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A50CC43381 for ; Thu, 28 Mar 2019 11:35:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 43FF42075E for ; Thu, 28 Mar 2019 11:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726470AbfC1Lfn (ORCPT ); Thu, 28 Mar 2019 07:35:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56708 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbfC1Lfn (ORCPT ); Thu, 28 Mar 2019 07:35:43 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5DA1308795D; Thu, 28 Mar 2019 11:35:42 +0000 (UTC) Received: from bistromath.localdomain (unknown [10.40.205.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 99B0E1001DE1; Thu, 28 Mar 2019 11:35:41 +0000 (UTC) Date: Thu, 28 Mar 2019 12:35:39 +0100 From: Sabrina Dubroca To: Florian Westphal Cc: netdev@vger.kernel.org, steffen.klassert@secunet.com Subject: Re: [PATCH ipsec-next 04/11] xfrm: remove output indirection from xfrm_mode Message-ID: <20190328113539.GB19967@bistromath.localdomain> References: <20190327173140.16891-1-fw@strlen.de> <20190327173140.16891-5-fw@strlen.de> <20190328111247.GA19967@bistromath.localdomain> <20190328112718.w7uyomw6lh5cfdhe@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190328112718.w7uyomw6lh5cfdhe@breakpoint.cc> User-Agent: Mutt/1.11.4 (2019-03-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 28 Mar 2019 11:35:42 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 2019-03-28, 12:27:18 +0100, Florian Westphal wrote: > Sabrina Dubroca wrote: > > Hi Florian, > > > > 2019-03-27, 18:31:33 +0100, Florian Westphal wrote: > > > diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c > > > index 9333153bafda..01eb142ba6d0 100644 > > > --- a/net/xfrm/xfrm_output.c > > > +++ b/net/xfrm/xfrm_output.c > > [snip] > > > +static int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb) > > > +{ > > > > Why no #if IS_ENABLED here? (and in xfrm6_prepare_output) > > I don't know what IS_ENABLED() conditional makes sense here. I was thinking of INET_XFRM_MODE_BEET || INET_XFRM_MODE_TUNNEL, to match the check you added in xfrm4_transport_output, but anyway you're getting rid of them at the end of the series. Probably not worth bothering. > This is coming from xfrm4_output.c which only depends on CONFIG_XFRM. > I'll add IS_ENABLED(CONFIG_IPV6) for xfrm6_prepare_output in v2. Oh, I didn't think of that one, nice. > > > +static int xfrm_outer_mode_output(struct xfrm_state *x, struct sk_buff *skb) > > > +{ > > > + switch (x->outer_mode->encap) { > > > + case XFRM_MODE_BEET: > > > + case XFRM_MODE_TUNNEL: > > > + if (x->outer_mode->family == AF_INET) > > > + return xfrm4_prepare_output(x, skb); > > > + if (x->outer_mode->family == AF_INET6) > > > + return xfrm6_prepare_output(x, skb); > > > > Missing "break;" here? > [..] > > Missing "break;" here too? > > Indeed, added, thanks. Thanks. -- Sabrina