From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f49.google.com (mail-vk0-f49.google.com [209.85.213.49]) by dpdk.org (Postfix) with ESMTP id 0D83D28FD for ; Wed, 20 Apr 2016 14:45:22 +0200 (CEST) Received: by mail-vk0-f49.google.com with SMTP id t129so57116454vkg.2 for ; Wed, 20 Apr 2016 05:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infinite-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=0HMivjwGHZ6Fwckh+m/FmqOslqsMfgxO8FJ0sAl4S/Q=; b=ZD4m0bwLlmTYE2ErEXmQvKLfsz6Mv9xfQtRfaN4n9RwST1IYOo+4SrXO8ywDuvxZ+W f5+9iyJprzZTMEEtfnGSFLXAYITW3XHfZzvOkpLeVeYaCs6vfsI0VErD0zUp0HHhS6QW 8Z3Ms7EX4SQ78aRNgfLnaNi8nvPqY9kSB5kDtpL2DA+XCJmr1z6hA3x5sae5tBURLuls 2s3v3gGupJrZNzJpiSYfeBAtDMzDzO7dcJ+5zH2jxExkoAeTWngIIirfhv8HXwvPa5Vl xVOYmj2L7I+ap1dNDWz8BKoLvpSMYy91ALkcnkgJujsve0wuXr9TWndGRLqDQIS134/r nLsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=0HMivjwGHZ6Fwckh+m/FmqOslqsMfgxO8FJ0sAl4S/Q=; b=ikiRvvsNLqLWEsOk5nY4rbjh0s4wpwDXX09HihuaR8a8jR7OyUMa0+FglTaQ29PRcU IYLiJ/tdJ+Z+fUYehjhPB6d3HeEaXx64lFbR/XzjuqWxseJ0tSQHvjYj5sMcMwDrBnVT XjDQcwS/26AWun1ZnNDqA6fwfInbchFdj68HrYzK0CpfZ8rwulFrZ36+A2lkhfvx9YPw 22T58Vzi/3PL7XmcYu1Wv1GFX5RtbPsTfKqJPjPb8mB2FMTjTYgmuQD7SRsQgzavVR+P 7tWtpMgt7FyZejCZV11SqzrqTCPsVK3+N/uwr7J5NLSuvcsnHTDbgyNqEixsVEkxCVvA YSpQ== X-Gm-Message-State: AOPr4FXDCpMHdndAiSdzUMeg+QZUD84G2dlElYDZtCdULG9+bmUpXP+han5QjA9x7HumycI/1XfvE+ewxu+vtQ== MIME-Version: 1.0 X-Received: by 10.176.1.79 with SMTP id 73mr981381uak.123.1461156321557; Wed, 20 Apr 2016 05:45:21 -0700 (PDT) Received: by 10.103.86.14 with HTTP; Wed, 20 Apr 2016 05:45:21 -0700 (PDT) In-Reply-To: References: Date: Wed, 20 Apr 2016 07:45:21 -0500 Message-ID: From: Jay Rolette To: Andriy Berestovskyy Cc: DPDK , "Richardson, Bruce" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Couple of PMD questions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2016 12:45:22 -0000 On Wed, Apr 20, 2016 at 4:35 AM, Andriy Berestovskyy wrote: > Hi Jay, > > On Tue, Apr 19, 2016 at 10:16 PM, Jay Rolette wrote: > > Should the driver error out in that case instead of only "sort of" > working? > > +1, we hit the same issue. Error or log message would help. > > > If I support a max frame size of 9216 bytes (exactly a 1K multiple to > make > > the NIC happy), then max_rx_pkt_len is going to be 9216 and > data_room_size > > will be 9216 + RTE_PKTMBUF_HEADROOM. > > Try to set max_rx_pkt_len <= 9K - 8 and mempool element size to 9K + > headroom + size of structures. > Thanks, Andriy. That makes sense given how the code + NIC are working. > > Is that check correct? > > Datasheet says: > The MFS does not include the 4 bytes of the VLAN header. Packets with > VLAN header can be as large as MFS + 4. When double VLAN is enabled, > the device adds 8 to the MFS for any packets. > Gotcha. Hopefully we can get the docs and example code up to where app developers don't need to crawl through driver source and NIC datasheets. That or have rte_pktmbuf_pool_create() take care of that sort of detail automatically. :-) Jay Regards, > Andriy >