From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 989701B05 for ; Wed, 23 May 2018 00:30:58 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C978121C78; Tue, 22 May 2018 18:30:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 22 May 2018 18:30:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=JQmv6Q9u2LeMVxwtBiQ6U/nvm3 rbd5dgLcu2coQt8qM=; b=jO4uWC/61Ks7yz/KuxLY0frRtD8yLFShBvMd95zKD9 sxMXfkELSVmssx3jRj6EthS2r+ET+zFQ/HGHbiIzMFhyFDIIlRv2DdPNH7fRjM2s tLC5XPdw81TWl8G+65NXTDuq8qVkpzRozMEuRImbnlf+NphUDAO81+U0a76NbqeH k= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=JQmv6Q 9u2LeMVxwtBiQ6U/nvm3rbd5dgLcu2coQt8qM=; b=DUF67R7XFW2yWmDe424LlI seCHZ34aJ3Sy1NvJuv8/XVAkJwpbTzAD2PeGe+EKrNZpHP/ybgdCvc2RN4Z1M0BV km4F8ufuH66rRaTc2GZE8KWqBJh79bTbLJWX5ytGyVSY8E5h4gE9QTpROCfjt5qp +N21+PFHIbLJagdrG+Uh6WScdKykgHHFjNRn1jh9v+owJMeMKU6Eeq3FtjE0pc7n 7BScJJ/tar98BBg1ME+hJh5PzHgKKQsxi6W1LobpdZswH+OZ/13YCfHq6/WzwVLn H9QCIF40jQKmA2ZhjjQ67BOw0FAdH427vVVj6jwlZNodntq3WOWN5lsqQvGe5g1Q == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8C942E463E; Tue, 22 May 2018 18:30:55 -0400 (EDT) From: Thomas Monjalon To: Andriy Berestovskyy Cc: dev@dpdk.org, Bruce Richardson , ferruh.yigit@intel.com, arybchenko@solarflare.com, shahafs@mellanox.com, hemant.agrawal@nxp.com, jerin.jacob@cavium.com Date: Wed, 23 May 2018 00:30:54 +0200 Message-ID: <7564896.sbN2ypR4X7@xps> In-Reply-To: <1719643.qo6JmGv4pL@xps> References: <1490288768-8114-1-git-send-email-Andriy.Berestovskyy@cavium.com> <1719643.qo6JmGv4pL@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] ether: use a default for max Rx frame size in configure() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 22:30:58 -0000 This proposal had no conclusion. The examples have been fixed: http://dpdk.org/commit/5e470a6654 But there is still an inconsistency in the API: " - for normal frames: zero max_rx_pkt_len uses a default - for jumbo frames: zero max_rx_pkt_len gives an error " 01/08/2017 00:33, Thomas Monjalon: > We are missing some comments about this proposal. > > 24/04/2017 16:50, Andriy Berestovskyy: > > Hey Thomas, > > > > On 21.04.2017 00:25, Thomas Monjalon wrote: > > >> The hardware is different, there is not much we can do about it. > > > > > > We can return an error if the max_rx_pkt_len cannot be set in the NIC. > > > > Yes, we pass the value to the PMD, which might check the value and > > return an error. > > > > >> Nevertheless, we can fix the false comment and have a default for the > > >> jumbos, which is beneficial for the apps/examples. > > > > > > The examples are using a hardcoded value, so they need to be fixed > > > anyway. > > > > We might change the hardcoded values to zeros once the patch is in. This > > will make the examples a bit more clear. > > > > > > > This ethdev patch is about a behaviour change of the API. > > > > The behaviour was not documented, so IMO it is not an issue. > > > > > > > It is about considering 0 as a request for default value > > > and return an error if a value cannot be set. > > > > Right. > > > > > > > It will require more agreements and changes in the drivers > > > for returning an error where appropriate. > > > > IMO the changes are transparent for the PMDs (please see below), but it > > might affect some applications. Here is the change in API behaviour: > > > > Before the patch: > > jumbo == 0, max_rx_pkt_len == 0, RESULT: max_rx_pkt_len = ETHER_MAX_LEN > > jumbo == 0, max_rx_pkt_len == 10, RESULT: max_rx_pkt_len = ETHER_MAX_LEN > > jumbo == 0, max_rx_pkt_len == 1200, RESULT: max_rx_pkt_len = 1200 > > jumbo == 0, max_rx_pkt_len == 9K, RESULT: max_rx_pkt_len = ETHER_MAX_LEN > > > > jumbo == 1, max_rx_pkt_len == 0, RESULT: ERROR > > jumbo == 1, max_rx_pkt_len == 10, RESULT: ERROR > > jumbo == 1, max_rx_pkt_len == 1200, RESULT: max_rx_pkt_len = 1200 > > jumbo == 1, max_rx_pkt_len == 9K, RESULT: ERROR or max_rx_pkt_len = 9K > > jumbo == 1, max_rx_pkt_len == 90K, RESULT: ERROR > > > > > > After the patch: > > jumbo == 0, max_rx_pkt_len == 0, RESULT: max_rx_pkt_len = ETHER_MAX_LEN > > jumbo == 0, max_rx_pkt_len == 10, RESULT: ERROR (changed) > > jumbo == 0, max_rx_pkt_len == 1200, RESULT: max_rx_pkt_len = 1200 > > jumbo == 0, max_rx_pkt_len == 9K, RESULT: ERROR (changed) > > > > jumbo == 1, max_rx_pkt_len == 0, RESULT: max_rx_pkt_len = dev_info() > > jumbo == 1, max_rx_pkt_len == 10, RESULT: ERROR > > jumbo == 1, max_rx_pkt_len == 1200, RESULT: max_rx_pkt_len = 1200 > > jumbo == 1, max_rx_pkt_len == 9K, RESULT: ERROR or max_rx_pkt_len = 9K > > jumbo == 1, max_rx_pkt_len == 90K, RESULT: ERROR > > > > Only the apps which requested too small or too big normal frames will be > > affected. In most cases it will be rather an error in the app... > > > > > > Also I have looked through all the PMDs to confirm they are not > > affected. Here is the summary: > > > > af_packet > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = ETH_FRAME_LEN (1514) > > > > ark > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = ETH_FRAME_LEN (16K - 128) > > > > avp > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = avp->max_rx_pkt_len > > rx_queue_setup() uses max_rx_pkt_len for scattering > > > > bnx2x > > configure() uses max_rx_pkt_len to set internal mtu > > info() returns max_rx_pktlen = BNX2X_MAX_RX_PKT_LEN (15872) > > > > bnxt > > configure() uses max_rx_pkt_len to set internal mtu > > info() returns max_rx_pktlen = BNXT_MAX_MTU + ETHER_HDR_LEN + > > ETHER_CRC_LEN + VLAN_TAG_SIZE (9000 + 14 + 4 + 4) > > > > bonding > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = internals->candidate_max_rx_pktlen or > > ETHER_MAX_JUMBO_FRAME_LEN (0x3F00) > > > > cxgbe > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = CXGBE_MAX_RX_PKTLEN (9000 + 14 + 4) > > rx_queue_setup() checks max_rx_pkt_len boundaries > > > > dpaa2 > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = DPAA2_MAX_RX_PKT_LEN (10240) > > > > e1000 (em) > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = em_get_max_pktlen() (0x2412, 0x1000, > > 1518, 0x3f00, depends on model) > > > > e1000 (igb) > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = 0x3fff > > start() writes max_rx_pkt_len to HW for jumbo frames only > > start() uses max_rx_pkt_len for scattering > > > > ena > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = adapter->max_mtu > > start() checks max_rx_pkt_len boundaries > > > > enic > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = enic->max_mtu + 14 + 4 > > > > fm10k > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = FM10K_MAX_PKT_SIZE (15 * 1024) > > start() uses max_rx_pkt_len for scattering > > > > i40e > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = I40E_FRAME_SIZE_MAX (9728) > > rx_queue_config() checks max_rx_pkt_len boundaries > > > > ixgbe > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = 15872 (9728 for vf) > > start() writes max_rx_pkt_len to HW for jumbo frames only > > start() uses max_rx_pkt_len for scattering > > > > kni > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = UINT32_MAX > > > > liquidio > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = LIO_MAX_RX_PKTLEN (64K) > > start() checks max_rx_pkt_len boundaries > > > > mlx4 > > configure() uses max_rx_pkt_len for scattering > > info() returns max_rx_pktlen = 65536 > > > > mlx5 > > configure() uses max_rx_pkt_len for scattering > > info() returns max_rx_pktlen = 65536 > > > > nfp > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = hw->mtu > > > > null > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = (uint32_t)-1 > > > > pcap > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = (uint32_t)-1 > > > > qede > > configure() uses max_rx_pkt_len for scattering + internal data > > info() returns max_rx_pktlen = ETH_TX_MAX_NON_LSO_PKT_LEN (9700 - 4 - 4 > > - 12 - 8) > > > > ring > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = (uint32_t)-1 > > > > sfc > > configure() uses max_rx_pkt_len to set internal data > > info() returns max_rx_pktlen = EFX_MAC_PDU_MAX (9202 + 14 + 4 + 4 + 16) > > > > szedata2 > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = (uint32_t)-1 > > > > tap > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = ETHER_MAX_VLAN_FRAME_LEN (1518 + 4) > > > > thunderx > > configure() uses max_rx_pkt_len for scattering + sets internal mtu > > info() returns max_rx_pktlen = NIC_HW_MAX_FRS (9200) > > > > vhost > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = (uint32_t)-1 > > > > virtio > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN (9728U) > > > > vmxnet3 > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = 16384; > > > > xenvirt > > configure() does not use max_rx_pkt_len > > info() returns max_rx_pktlen = 2048 > > > > > > Regards, > > Andriy > > > > > >