From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DB0A1A0350; Thu, 2 Jul 2020 02:06:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 507911D543; Thu, 2 Jul 2020 02:06:57 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id E252C1D17B for ; Thu, 2 Jul 2020 02:06:55 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id d10so10546484pls.5 for ; Wed, 01 Jul 2020 17:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=djqEPzWHajvrdaGZPWd8St7Oemh55uwzwUBM7yTOZXk=; b=YENfAJLrmnR1rMdQizPjkNuB4anYj2SqPqrcXxSQy+xQatbx+Pq81cY/kqvP2vzh5U s4tiwb6DSzAjkPiYQwTfOhFUBmy+eXyGdubeaoyp0RLuICtrySZOfPE52tYC5knhX5oh TGftmDd4sG5sf9UGWUTQ2CJlHhGNKKDZnOJMtNLq3tCW7XWM56026hMECn6iU4MEBRh8 6/xRI/hHI7H/ATaygL/xph3IPwIME12ntRrZlaAzVX8IU5ejFu53kux/X6Bydqlsriuz ak23a+uaJWiPAl8BvUfY4AYFJ96pJQ8wGl1eo0byIOnjYW+I4JEM+fdmBm/mHGNMBxj1 0TWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=djqEPzWHajvrdaGZPWd8St7Oemh55uwzwUBM7yTOZXk=; b=RHDSw/cU+kvQrS/1vXaa+8uN1OUNofvKPw/uxquNeLet5ZnZcVP5gFYfXMaO2ZR64w b2HoIJIljkwfiSs5s3G8Etf6qsUUDw7BpN6KEPwmKQDiKAM5GMLrzi4+EuH5eUMonjoQ VM+shFM73IAL3cAmHdNE+KxPvw9heq2zYfcBuK4BCo4nq2NFvJO8x7psE3IFg+GxhT34 lQjG6YbYY+zlGGpV1fFlWZ+wu6QFz9acKf8GvTjXKDVggCwAgTciMqHnurKAoELm64Tu 30IzAyn28Zsbjk/Ko9xIrJuPfhopP96nvY/ujNhMSB+qkQqoeWX4UhBbK0jS+d3t7L1g nQcg== X-Gm-Message-State: AOAM532jco13EqfNZRybbwOUGSoJvaH98wgyBdGT361iYCam+1EZtp9n 1AFuP4PBLvg7D759cBVUg+2WGQ== X-Google-Smtp-Source: ABdhPJxHmkAajiWW+vBKSE8vtsvCuHC6zurt2Ss0Mw/H66PF94OY05uE6vDqUVsy2hGoviz3uYcMfg== X-Received: by 2002:a17:90a:2a4d:: with SMTP id d13mr22940014pjg.195.1593648415132; Wed, 01 Jul 2020 17:06:55 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s36sm6791416pgl.35.2020.07.01.17.06.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 17:06:54 -0700 (PDT) Date: Wed, 1 Jul 2020 17:06:46 -0700 From: Stephen Hemminger To: longli@linuxonhyperv.com Cc: Stephen Hemminger , dev@dpdk.org, Long Li Message-ID: <20200701170646.0690c90e@hermes.lan> In-Reply-To: <1592961106-82820-1-git-send-email-longli@linuxonhyperv.com> References: <1592961106-82820-1-git-send-email-longli@linuxonhyperv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/2] net/netvsc: fix underflow error when external mbuf are used in the receive path 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 23 Jun 2020 18:11:45 -0700 longli@linuxonhyperv.com wrote: > From: Long Li > > When rte_pktmbuf_attach_extbuf() is used, the driver should not decrease the > reference count in its callback function hn_rx_buf_free_cb, because the > reference count is already decreased by rte_pktmbuf. Doing it twice may result > in underflow and driver may never send an ack packet over vmbus to host. > > Also declares rxbuf_outstanding as atomic, because this value is shared > among all receive queues. > > Signed-off-by: Long Li Good catch. DPDK ought to have a real refcnt type like the kernel. One that traps on underflow. Acked-by: Stephen Hemminger