From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] ether: use a default for max Rx frame size in configure() Date: Thu, 06 Apr 2017 22:48:58 +0200 Message-ID: <1692122.NGhiyjpKUa@xps13> References: <1490288768-8114-1-git-send-email-Andriy.Berestovskyy@cavium.com> <1490356325-15434-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Andriy Berestovskyy Return-path: Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) by dpdk.org (Postfix) with ESMTP id D68C32A6C for ; Thu, 6 Apr 2017 22:49:00 +0200 (CEST) Received: by mail-wr0-f174.google.com with SMTP id c55so6676299wrc.3 for ; Thu, 06 Apr 2017 13:49:00 -0700 (PDT) In-Reply-To: <1490356325-15434-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-03-24 12:52, Andriy Berestovskyy: > At the moment rte_eth_dev_configure() behaves inconsistent: > - for normal frames: out of range max_rx_pkt_len uses a default > - for jumbo frames: out of range max_rx_pkt_len gives an error > > This patch fixes this inconsistency by using a default value > for max_rx_pkt_len both for normal and jumbo frames. > > Signed-off-by: Andriy Berestovskyy It is a bit strange to use the max value when the input is below the minimum. Anyway, why not fixing it in the reverse way: returning error for out of range of non-jumbo frames? I am not sure setting a default value in the back of the caller is really a good behaviour.