From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v1] ixgbe_pmd: forbid tx_rs_thresh above 1 for all NICs but 82598 Date: Fri, 11 Sep 2015 07:55:08 -0700 (PDT) Message-ID: <1762144.1LKiyImgC1@xps13> References: <1439489195-31553-1-git-send-email-vladz@cloudius-systems.com> <55F2E448.1070602@6wind.com> <55F2E997.5050009@cloudius-systems.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Avi Kivity , "didier.pallard" , Vlad Zolotarov Return-path: Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by dpdk.org (Postfix) with ESMTP id 939C75681 for ; Fri, 11 Sep 2015 16:55:09 +0200 (CEST) Received: by wicfx3 with SMTP id fx3so61274100wic.0 for ; Fri, 11 Sep 2015 07:55:09 -0700 (PDT) In-Reply-To: <55F2E997.5050009@cloudius-systems.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-09-11 17:47, Avi Kivity: > On 09/11/2015 05:25 PM, didier.pallard wrote: > > On 08/25/2015 08:52 PM, Vlad Zolotarov wrote: > >> > >> Helin, the issue has been seen on x540 devices. Pls., see a chapter > >> 7.2.1.1 of x540 devices spec: > >> > >> 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 (see > >> Section 7.2.3.3 for Tx Ring details and section Section 7.2.3.5.1 for > >> WTHRESH > >> details). For best performance it is recommended to minimize the > >> number of buffers > >> as possible. > >> > >> Could u, pls., clarify why do u think that the maximum number of data > >> buffers is limited by 8? > >> > >> thanks, > >> vlad > > > > 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.