Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4578119imw; Tue, 19 Jul 2022 09:09:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uHq6+ggkqXkUy01roqHcXdAt8rvbKnU6OrkXaDiBS1IG3pRMKcroC9I7kcxp121GHxkglp X-Received: by 2002:a17:906:974d:b0:72f:2835:f664 with SMTP id o13-20020a170906974d00b0072f2835f664mr11862024ejy.543.1658246990035; Tue, 19 Jul 2022 09:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658246990; cv=none; d=google.com; s=arc-20160816; b=Jgzw9GcREof/uicwY4OwXDsgftG7fMs814O/v+1Je6N3QyajWwVNgjh4FOJsiZFk+N P0SWFWpjO5MaVdpk31ReeM/+VrX8RVo8NG1b2Zc2DSOi4uNMcdunNbMlwUh782OADr1X PdVfqTsDYf7bF8WQbkTA5nKBav3qCZBdWh6MCG2pvDu2jX58j327RaCYoAUnqYM2XT63 JfDoXrUdTWtWJViAAbRxYW1X2GaS3EjClK4jQs5KpNo9kID82FmvauDTdQZFtr9iR6gh CU9VYUJn0usKhNwXyk+ajFsVM2GFipnPhG3hqUbR8RnOd/oOx35niQ+rX/lf+lx1TGOe lx8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qmRk5WvbkJ0mS7/eJHIYpBPMUr8cLvqn7V4Y2tEmYU8=; b=QYfeTTo+3ET6IvKmrC0S68dNtj9iwCzLNQThA61C+bVsU3E1E7XBU3lrQPazfLsoz5 NNd0wO6h5dbUUXfzXrXTbKrDLUvPrhr6kE1MFUbdUfVfYyrzEvFtmE1LLaqYCaliy8xs 2q2bqnllwHMjA/B4IP4HA0cN0dZg+BiaXkucnLGc5uyrgl9U34D/4xlsJFxqIWDAO9pA aC0+IP1D+pdwS+900zn5lDj/kgR+x4+b43BQW2OtvA79K63yoljMRhY/Rb0Hxjnx/3KF CfscFp9Mvvgy5nB2rURkMKCiZwdrfVqkmZdktxsRdmMwqEbVeHQtbdn2nkbWMI4mzoAJ 8mZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=hhNryw6f; 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 k24-20020a508ad8000000b0043ba3b52d3dsi1347526edk.412.2022.07.19.09.09.25; Tue, 19 Jul 2022 09:09:50 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=hhNryw6f; 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 S238553AbiGSPTR (ORCPT + 99 others); Tue, 19 Jul 2022 11:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbiGSPTP (ORCPT ); Tue, 19 Jul 2022 11:19:15 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F216438A2; Tue, 19 Jul 2022 08:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=qmRk5WvbkJ0mS7/eJHIYpBPMUr8cLvqn7V4Y2tEmYU8=; b=hhNryw6fPgRprJfjy1mpa+07fS M91c4kk0LMoHqY86sg1Nno5u3U4hoeIT+UXwABYoS7ZoSMlizpMa2GOCZKJDycB2ZUIt31Ph3Pcpg WFc0WSrVIHN9CoT4qwi6MtmMKEsEYu5nF8XwTbXtyZm/taJziczAbvcUzlT85M6e4APg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oDp07-00ApsE-CC; Tue, 19 Jul 2022 17:19:07 +0200 Date: Tue, 19 Jul 2022 17:19:07 +0200 From: Andrew Lunn To: Antonio Quartulli Cc: netdev@vger.kernel.org, David Miller , Jakub Kicinski , linux-kernel@vger.kernel.org Subject: Re: [RFC 1/1] net: introduce OpenVPN Data Channel Offload (ovpn-dco) Message-ID: References: <20220719014704.21346-1-antonio@openvpn.net> <20220719014704.21346-2-antonio@openvpn.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220719014704.21346-2-antonio@openvpn.net> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 > +void ovpn_crypto_key_slot_delete(struct ovpn_crypto_state *cs, > + enum ovpn_key_slot slot) > +{ > + struct ovpn_crypto_key_slot *ks = NULL; > + > + mutex_lock(&cs->mutex); > + switch (slot) { > + case OVPN_KEY_SLOT_PRIMARY: > + ks = rcu_replace_pointer(cs->primary, NULL, > + lockdep_is_held(&cs->mutex)); > + break; > + case OVPN_KEY_SLOT_SECONDARY: > + ks = rcu_replace_pointer(cs->secondary, NULL, > + lockdep_is_held(&cs->mutex)); > + break; > + default: > + pr_warn("Invalid slot to release: %u\n", slot); > + break; > + } > + mutex_unlock(&cs->mutex); > + > + if (!ks) { > + pr_debug("Key slot already released: %u\n", slot); > + return; > + } > + pr_debug("deleting key slot %u, key_id=%u\n", slot, ks->key_id); As a general comment throughout the code, pr_ functions are not liked. Since this is a network device, it would be better to use netdev_debug(), netdev_warn() etc, so indicating which device is outputting warnings or debug info. Andrew