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: Mon, 27 Mar 2017 10:38:13 +0200 Message-ID: <189fbba9-f97b-9bb6-e9fa-9669fd0ffa0a@caviumnetworks.com> 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=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: "Yang, Qiming" , Thomas Monjalon Return-path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0066.outbound.protection.outlook.com [104.47.32.66]) by dpdk.org (Postfix) with ESMTP id 61919FA41 for ; Mon, 27 Mar 2017 10:38:25 +0200 (CEST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hey Qiming, On 27.03.2017 08:15, Yang, Qiming wrote: > I don't think this is a bug. Return errors when configure an invalid max_rx_pkt_len is suitable for this generic API. It is not a bug, it is an inconsistency. At the moment we can set max_rx_pkt_len for normal frames and if it is out of range a default value will be used instead. IMO we should expect the same behavior from the same function for the jumbo frames. So at the moment we have: jumbo == 0, max_rx_pkt_len == 0, result: max_rx_pkt_len = ETHER_MAX_LEN jumbo == 0, max_rx_pkt_len == 1200, result: max_rx_pkt_len = 1200 jumbo == 1, max_rx_pkt_len == 0, result: error jumbo == 1, max_rx_pkt_len == 9K, result: error or max_rx_pkt_len = 9K > It's not suitable to give a default value in this function. We use a default value for normal frames at the moment. The comment: uint32_t max_rx_pkt_len; /**< Only used if jumbo_frame enabled. */ is obsolete and in fact we use max_rx_pkt_len both for jumbo and normal frames. So the patch clarifies this as well. Regards, Andriy