Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4603660imw; Tue, 19 Jul 2022 09:37:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u7xZgKEj+fkwy6HlAGMlClXkeXmg2PI4/LHjUXCYnN1Of7xcYdUqZOMeKjCPWJAISD2we6 X-Received: by 2002:a17:906:8a70:b0:72b:132b:1720 with SMTP id hy16-20020a1709068a7000b0072b132b1720mr30837653ejc.41.1658248663440; Tue, 19 Jul 2022 09:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658248663; cv=none; d=google.com; s=arc-20160816; b=gDhdfPvgtyC5K6Aoo8LSSvrBlTTcci/x2OncH6oyxY+E8JR4qCPwLIDkoJmrEC3fzc 9WjahA0ynhCNNoiGjz3gU4YXcGNby/Cvghcx9hNV9L/nQZt1N1VDdf59dlviTgAUOrJj Qu0laICiFTyjd2Svi6UzjU1E2eoR2bY6fEMRcRgVd8Espi3JtrP+TA+yByQT7Nf7oWEv zLFnWSyi9b155R5ieDu2g8l3ZCbRqD3N0iYAoyKnVObJesGWBX0lQ0WmO4/0CprnD8ix N/4UITEjlkFP8SQ6y3Q2kRmrL1jIgg1s2bWR+mhdAWvBR4Is6AdtyFBOoF8ra6ChPmPB /mdQ== 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=sfvZpWOEq6JYILmPXBYR+uDtjMbWCX9Pn/cYZ5pJzQQ=; b=H6VUVVCoDdmRBowjaCybdDJbY6l68Qm8YAyhXTcrr1Ow8AEGcNjUOIXOeciH2+9e5q uhMQFlYr8ixyQaWNrWXSwwkyNcTX5nBzJTQXh0jlZE3I++O5iOJ1Tv58Yj8YRmMt1kfJ +KxkkRb+WImCIzvLdve7RChm3e6QS+gKTJXW6nDO3mv5wt4ZPUeWAaGfevdfpvscz04F AymIhOWtd413Fmdh4nd3xFSNzSY2Vlb9IKpRULyKM/igQbJBgFSga9jFWNa/EthvEmtd ocRG8JyFgoO583ictIicZ5TRyCUbBHCYPfoHl1l/FfW9Hi4y0bETa8a14mXNfPplNANo d4aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=wzeCNFtg; 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 j24-20020aa7ca58000000b0043ab3c46218si19569964edt.487.2022.07.19.09.37.18; Tue, 19 Jul 2022 09:37:43 -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=wzeCNFtg; 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 S237694AbiGSPhe (ORCPT + 99 others); Tue, 19 Jul 2022 11:37:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237364AbiGSPhb (ORCPT ); Tue, 19 Jul 2022 11:37:31 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA893599E3; Tue, 19 Jul 2022 08:37:30 -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=sfvZpWOEq6JYILmPXBYR+uDtjMbWCX9Pn/cYZ5pJzQQ=; b=wzeCNFtgwP6NpoC2RSTvSQI5XR RZwffZ6xSZdo7gPeT1KgxqD3yTRWaq3BM0NvaohQtV+um1394cg0yMnMEBr/jpBWOvKi6WYalKOVT HS6axJFVFI0lh5EIx74VDIEPzSU2O/47n5ETcUjSJS9WCxTxa9y4HvjxGgmYZOPaDyJI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oDpHq-00Apxj-D3; Tue, 19 Jul 2022 17:37:26 +0200 Date: Tue, 19 Jul 2022 17:37:26 +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 > +static int ovpn_net_change_mtu(struct net_device *dev, int new_mtu) > +{ > + if (new_mtu < IPV4_MIN_MTU || > + new_mtu + dev->hard_header_len > IP_MAX_MTU) > + return -EINVAL; If you set dev->min_mtu and dev->max_mtu, the core will validate this for you, see dev_validate_mtu(). > +static int ovpn_get_link_ksettings(struct net_device *dev, > + struct ethtool_link_ksettings *cmd) > +{ > + ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, 0); > + ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, 0); These two should not be needed. Look at tun, veth etc, they don't set them. Andrew