From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f46.google.com (mail-qg0-f46.google.com [209.85.192.46]) by dpdk.org (Postfix) with ESMTP id C290A8D86 for ; Fri, 11 Sep 2015 18:18:20 +0200 (CEST) Received: by qgt47 with SMTP id 47so66442791qgt.2 for ; Fri, 11 Sep 2015 09:18:20 -0700 (PDT) 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:content-type; bh=QNOBvUj4WsH3rdhzY7zGEcXy2CpQIMaaqAWL8WeG84g=; b=lNeabLWyn0GIBElZIFNCiojZX9jL7H/ZkhM5tPiglSZ479M05LS8s2Jk4PdAx7HymR fnW40lDvH90YVpH9jRMQeH85+a2Sy5y+aXDjYXRPqfDuQ/T14k3d93qFiRn1R8gTlgO8 rRtSCOMe6/Qx5ToyWoes8Ms/Jez+T3S3YCjIq69X1PGz7beCK1PkZYz5n5bEQQhWrhkH X5NHyNUkJCur2LMdYKLnL6QEl2rXLoikRNqar4YK3d6Nk8F0PnAX3jZyVhpYemvqwXZU My2tB2jxjke17LZV7bZ3kB/bnen7bgCc1XoGoV5rNESRA4fIr//s1dzwGb7BVFQNi3/c I3VA== X-Gm-Message-State: ALoCoQl/XkKcLX8T3Akmvu0Cda4/h+Yr3aA7J/xX55Pq+l94cadDSKmzrE7WtgF0EUclsrBKScJT MIME-Version: 1.0 X-Received: by 10.140.234.195 with SMTP id f186mr7154773qhc.25.1441988300176; Fri, 11 Sep 2015 09:18:20 -0700 (PDT) Received: by 10.55.123.131 with HTTP; Fri, 11 Sep 2015 09:18:20 -0700 (PDT) Received: by 10.55.123.131 with HTTP; Fri, 11 Sep 2015 09:18:20 -0700 (PDT) In-Reply-To: <3734976.j9Azrvq6io@xps13> References: <1439489195-31553-1-git-send-email-vladz@cloudius-systems.com> <55F2F6A9.6080405@cloudius-systems.com> <3734976.j9Azrvq6io@xps13> Date: Fri, 11 Sep 2015 19:18:20 +0300 Message-ID: From: Vladislav Zolotarov To: Thomas Monjalon Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v1] ixgbe_pmd: forbid tx_rs_thresh above 1 for all NICs but 82598 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: Fri, 11 Sep 2015 16:18:21 -0000 On Sep 11, 2015 7:09 PM, "Thomas Monjalon" wrote: > > 2015-09-11 18:43, Avi Kivity: > > On 09/11/2015 06:12 PM, Vladislav Zolotarov wrote: > > > On Sep 11, 2015 5:55 PM, "Thomas Monjalon" > > > wrote: > > > > 2015-09-11 17:47, Avi Kivity: > > > > > On 09/11/2015 05:25 PM, didier.pallard wrote: > > > > > > Hi vlad, > > > > > > > > > > > > Documentation states that a packet (or multiple packets in transmit > > > > > > segmentation) can span any number of > > > > > > buffers (and their descriptors) up to a limit of 40 minus WTHRESH > > > > > > minus 2. > > > > > > > > > > > > Shouldn't there be a test in transmit function that drops > > > properly the > > > > > > mbufs with a too large number of > > > > > > segments, while incrementing a statistic; otherwise transmit > > > function > > > > > > may be locked by the faulty packet without > > > > > > notification. > > > > > > > > > > > > > > > > What we proposed is that the pmd expose to dpdk, and dpdk expose > > > to the > > > > > application, an mbuf check function. This way applications that can > > > > > generate complex packets can verify that the device will be able to > > > > > process them, and applications that only generate simple mbufs can > > > avoid > > > > > the overhead by not calling the function. > > > > > > > > More than a check, it should be exposed as a capability of the port. > > > > Anyway, if the application sends too much segments, the driver must > > > > drop it to avoid hang, and maintain a dedicated statistic counter to > > > > allow easy debugging. > > > > > > I agree with Thomas - this should not be optional. Malformed packets > > > should be dropped. In the icgbe case it's a very simple test - it's a > > > single branch per packet so i doubt that it could impose any > > > measurable performance degradation. > > > > A drop allows the application no chance to recover. The driver must > > either provide the ability for the application to know that it cannot > > accept the packet, or it must fix it up itself. > > I have the feeling that everybody agrees on the same thing: > the application must be able to make a well formed packet by checking > limitations of the port. What about a field rte_eth_dev_info.max_tx_segs? > In case the application fails in its checks, the driver must drop it and > notify the user via a stat counter. > The driver can also remove the hardware limitation by gathering the segments > but it may be hard to implement and would be a slow operation. We thought about linearization too. It's doable with extra mempool and it may be optional so that those that don't need could compile it out and/or disable it in a runtime...