From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 18A1DA0C47; Tue, 12 Oct 2021 07:58:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9187E4067C; Tue, 12 Oct 2021 07:58:53 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 5E5D94003C for ; Tue, 12 Oct 2021 07:58:52 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id C5CA67F519; Tue, 12 Oct 2021 08:58:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru C5CA67F519 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1634018331; bh=QAx7HEpILgmKFNjrgrF3Zx+VJfQkYp0m/3lnVg12Wlo=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=YshXZkrmV1t7BR+ng/wis7qgpDuOx14cH0WPAVaXY0ome9gv1ltKiLS2CGvwE3Y8m 14q3OZFVyOVKzWjtISjIFcLQw3p1ti1mN2my2XHzNuLC9l/CIKnIjXOI9aoIiQE0Yu 1F17R7vwXDM+zwaTkaqMlKyc0bvroGZPOj5n0TTc= To: Ferruh Yigit , Thomas Monjalon Cc: dev@dpdk.org, Huisong Li , Konstantin Ananyev References: <20211001143624.3744505-1-ferruh.yigit@intel.com> <20211011235345.851742-1-ferruh.yigit@intel.com> <20211011235345.851742-5-ferruh.yigit@intel.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: Date: Tue, 12 Oct 2021 08:58:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211011235345.851742-5-ferruh.yigit@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6 5/6] ethdev: unify MTU checks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/12/21 2:53 AM, Ferruh Yigit wrote: > Both 'rte_eth_dev_configure()' & 'rte_eth_dev_set_mtu()' sets MTU but > have slightly different checks. Like one checks min MTU against > RTE_ETHER_MIN_MTU and other RTE_ETHER_MIN_LEN. > > Checks moved into common function to unify the checks. Also this has > benefit to have common error logs. > > Default 'dev_info->min_mtu' (the one set by ethdev if driver doesn't > provide one), changed to ('RTE_ETHER_MIN_LEN' - overhead). Previously it > was 'RTE_ETHER_MIN_MTU' which is min MTU for IPv4 packets. Since the > intention is to provide min MTU corresponding minimum frame size, new > default value suits better. > > Suggested-by: Huisong Li > Signed-off-by: Ferruh Yigit > Acked-by: Konstantin Ananyev Acked-by: Andrew Rybchenko