From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andriy Berestovskyy Subject: Re: [PATCH v2] ether: use a default for max Rx frame size in configure() Date: Fri, 7 Apr 2017 10:09:50 +0200 Message-ID: <4c030b76-ae4f-2cff-6cc1-21870ee506fa@caviumnetworks.com> References: <1490288768-8114-1-git-send-email-Andriy.Berestovskyy@cavium.com> <1490356325-15434-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> <1692122.NGhiyjpKUa@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0041.outbound.protection.outlook.com [104.47.36.41]) by dpdk.org (Postfix) with ESMTP id 4E0FC2BAE for ; Fri, 7 Apr 2017 10:10:03 +0200 (CEST) In-Reply-To: <1692122.NGhiyjpKUa@xps13> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Thomas, On 06.04.2017 22:48, Thomas Monjalon wrote: > Anyway, why not fixing it in the reverse way: returning error for > out of range of non-jumbo frames? I guess we need to fix most of the examples then, since most of them just pass 0 for normal frames. And there is no default for jumbo frames, so an app must first get this info from the NIC... > I am not sure setting a default value in the back of the caller is really > a good behaviour. From app perspective, any working default is better that a non-working app, which you have to fix and recompile on each PMD/platform. What if we use 0 for a default value both for normal and jumbo frames (i.e. ETHER_MAX_LEN and dev_info.max_rx_pktlen) and an error if user passed a non-zero max_rx_pkt_len? It will make it consistent, we will not need to fix the existing apps and we will have a default both for normal and jumbo frames. Win-win? ;) Andriy