Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1127856pxu; Wed, 2 Dec 2020 11:44:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEBAQNNwksijyEryG97rZc1jaPakzEMNs7GSB3lIWuaOybcaEXYN7MBsWBfreChvibxdKl X-Received: by 2002:a17:907:447d:: with SMTP id oo21mr1305549ejb.367.1606938280680; Wed, 02 Dec 2020 11:44:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606938280; cv=none; d=google.com; s=arc-20160816; b=oB9MuMScQkQebjHe7xu5bDL6ONl8SJkiIUodFRR6BwadkWmFfUmKINsPB2GO/nncwz T0CNjJSGRzGyJVKYaq9y0xLlc1NEBxoEzX+6D/clIl/DTeLiQsZQqjx3CZxIT6sS5HtT YN4n39eiiu2Ck9mt848NA8fZhuPxLjTIBqErrMzHH0sfKDaV+0VYps8N32KFW10K3Vcd NQCnPxYHGSlHkriqa8nHD5gh+TwWVkghFw7xaiGS0Ev6tiebKloprr0i7U7HjCgpCvZ+ r/jYnJGqX+UKM3HJmxO/9F3j3lr4SZxTuHt1jRrEz1v9hwEn8LyZvGiD97cM9O4/kKBk Ni+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=t4Melsy9FouRA7tpp5dgLYyf1tl5Ex/RlsncrB8JZuw=; b=hmtjLy05FC7MdDPA1SdgRVg/ac5xYj/hVK5pzfFvtwJjxVRJ5WlU6Rr6mvJ7NvhEVP wRxsaebQnNwQK8jthL5yAmEmF5yTVZTNvos4pFNiaBXAkdcHYEqDbvhXw/OC4EFBuU4J QolYvhwL+A4wLDyLng+2AaCpncykEzhzKHqLSCwhT1H2/F8GICyoh8EefCN4AsAO1JFU 8wXhZf2VN1L78cnvrE8Ojl//9yljAtcg8QsIYztrC2Ie8x+JyVOnU7K1oOM9nPfIv/RV V3vR5LGBL9ixfqsNvwCUcD3YH38FE/P+5VuGbDUJZAOplXx3OIQlhOGNS5h99gNzINJy rGHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NOxYX5LY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si633214edx.51.2020.12.02.11.44.17; Wed, 02 Dec 2020 11:44:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NOxYX5LY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387672AbgLBTlc (ORCPT + 99 others); Wed, 2 Dec 2020 14:41:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54173 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729325AbgLBTl3 (ORCPT ); Wed, 2 Dec 2020 14:41:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606938002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t4Melsy9FouRA7tpp5dgLYyf1tl5Ex/RlsncrB8JZuw=; b=NOxYX5LY606/6RPGpo3vATZ5JCMRyCflL3/Q3n3z1jwsUdMIq67OYSw81G7yMunTQDznu5 V/ZaFQeFBo5qo8/asm/JKpHEA8f2zG4Ors/RbQgEzQSJPzYbJDRoCx/+Bv2SmG6UZlrggP cwiqNCGVALRFwbJETk+YY3UP4+j3pPU= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-PvkugNaMNe-rV0nuQ1_53A-1; Wed, 02 Dec 2020 14:40:01 -0500 X-MC-Unique: PvkugNaMNe-rV0nuQ1_53A-1 Received: by mail-oi1-f200.google.com with SMTP id e203so1581527oib.6 for ; Wed, 02 Dec 2020 11:40:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t4Melsy9FouRA7tpp5dgLYyf1tl5Ex/RlsncrB8JZuw=; b=GEI4vqcBWNdQs/j7jNMGKq11FEbIDHujM115EsmunzmFt+cvW4m1oMAg91xrXIJvSd ZRWc87Z+mX2AoRYrvrI7U26kiwn9tgc9iCrfwU56kVf95m8tHqfVGQwQ/KnrfS49w9OG JYeFFL7EZtJBSEoMopXsonoc2wQ8mXzZ4V6ftpj7XcashDaRykjsXo4P93PxANIAcPXW 1/D4ZSYgfV/ZyXqheXHCWDCkK/UiDjPEe1njtU8CEFLkrFlOnHPJD9VCjlXrykVGOk6K 98BFyK/v+Cj7g4RQxM/jcLTm0P0g9bjI+GRSw9QYu33CzLWQ08LHaStdPw9I/WbTCo91 lycg== X-Gm-Message-State: AOAM532EynS1m04Xz+ns/C7Gm5X932y03kjihhjS2OKglZcVjj/nBqRT W9NZhDtL1rtnlaJBEWiMgm9As+je+BZNwBauK5ryFhc8l4MElnKDP3hioswEdKoK4h5E7VlXfRq c0s9XHuyBKJND8WNXdd+KVKFISriDqZIKtGzR2SlG X-Received: by 2002:aca:6255:: with SMTP id w82mr2658963oib.5.1606938000371; Wed, 02 Dec 2020 11:40:00 -0800 (PST) X-Received: by 2002:aca:6255:: with SMTP id w82mr2658954oib.5.1606938000111; Wed, 02 Dec 2020 11:40:00 -0800 (PST) MIME-Version: 1.0 References: <20201123031716.6179-1-jarod@redhat.com> <20201202173053.13800-1-jarod@redhat.com> <20201202095320.7768b5b3@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> <20201202112256.59a97b9c@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> In-Reply-To: <20201202112256.59a97b9c@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> From: Jarod Wilson Date: Wed, 2 Dec 2020 14:39:49 -0500 Message-ID: Subject: Re: [PATCH net v2] bonding: fix feature flag setting at init time To: Jakub Kicinski Cc: LKML , Ivan Vecera , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Thomas Davis , Netdev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 2, 2020 at 2:23 PM Jakub Kicinski wrote: > > On Wed, 2 Dec 2020 14:03:53 -0500 Jarod Wilson wrote: > > On Wed, Dec 2, 2020 at 12:53 PM Jakub Kicinski wrote: > > > > > > On Wed, 2 Dec 2020 12:30:53 -0500 Jarod Wilson wrote: > > > > + if (bond->dev->reg_state != NETREG_REGISTERED) > > > > + goto noreg; > > > > + > > > > if (newval->value == BOND_MODE_ACTIVEBACKUP) > > > > bond->dev->wanted_features |= BOND_XFRM_FEATURES; > > > > else > > > > bond->dev->wanted_features &= ~BOND_XFRM_FEATURES; > > > > - netdev_change_features(bond->dev); > > > > + netdev_update_features(bond->dev); > > > > +noreg: > > > > > > Why the goto? > > > > Seemed cleaner to prevent an extra level of indentation of the code > > following the goto and before the label, but I'm not that attached to > > it if it's not wanted for coding style reasons. > > Yes, please don't use gotos where a normal if statement is sufficient. > If you must avoid the indentation move the code to a helper. > > Also - this patch did not apply to net, please make sure you're > developing on the correct base. Argh, I must have been working in net-next instead of net, apologies. Okay, I'll clarify the description per what Jay pointed out and adjust the code to not include a goto, then make it on the right branch. -- Jarod Wilson jarod@redhat.com