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 66D30A0559; Tue, 17 Mar 2020 00:56:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 458821C0B8; Tue, 17 Mar 2020 00:56:27 +0100 (CET) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 699B61C07E for ; Tue, 17 Mar 2020 00:56:25 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id n7so10869812pfn.0 for ; Mon, 16 Mar 2020 16:56:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wTqD/13f3ntRqQMnK4xeOax+ONgoiGgR+orW6p/yu5Y=; b=ue4IXadjFQNxMZh4cDo+Fg5OXoIyXRMovn41ilR91fLT596etW48TZlRrQYTrjZCuL YglwjBq9P+OQdmY070uPzSG6dgyBHCwSN5QijULANaO0Yh18cgj+dB1BzLwt92anQMaO eNzoRyOmNROC94Nc3/elglpGXQzCipC3sjPc+XpCFA1HfYkybxGlRiigvB+nG2/7olHA 6MctI6kTkm+u9wuAgGagKsqYG2fGWYxrFBFyaD5zpIXFkqRTKMJokxMcecbbmMbi/ckJ WWunOSozNMHIzjiDeE7LYwr23W8ItvdH8LO2+05KT3W4Muq1IdBZhIO8RKPhUf3i6ZZQ 47Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wTqD/13f3ntRqQMnK4xeOax+ONgoiGgR+orW6p/yu5Y=; b=KF7tgXumbdH+6bUNRBnTok+1amvi+jd0eRZWBq6Mbl+uL2W8Nu7D//igunlP+uipNi TSAgy5JUf71HNcR5I7CmaQOcsHNrVFQm0RlxbtiYpLpKypGG5APJp9LJDAv9+LmqXJ59 wUnDVZ1YxjB+qK9SK40ljlpngMHtZx+upyqh524Hg+5wRxLEQU73gmo5AhIjL2OCgtqM ElYltpHf8RtP2nWk/xCbm3Pe+OtSQF7Mhth5o+WblWVBCs9w7m3mTOz/m4Wf37jyPESR T4S/7VLZKHznrGP6n7SxAzKUfvjWoCgCj0IQ0oWy/he3WDImFf/DmUhMZ9a84GTJVSZD MxBw== X-Gm-Message-State: ANhLgQ3m15zyJ0dhRO7DuBquvmJp/XgngNtx5QKTn+6rM8wsZODRQTbH T8hvnEZ88/m1Z9M+JqPKuUNKMPGsxm4= X-Google-Smtp-Source: ADFU+vvbWdg82chcZvokinT7eFIyk/SxF9nm34E5MDYe8fKXEcbpJlciZ4wdhBSzhGmsUqyatBxklQ== X-Received: by 2002:a62:be0d:: with SMTP id l13mr2159278pff.217.1584402983662; Mon, 16 Mar 2020 16:56:23 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id m68sm838173pjb.0.2020.03.16.16.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 16:56:22 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 16 Mar 2020 16:56:12 -0700 Message-Id: <20200316235612.29854-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200316235612.29854-1-stephen@networkplumber.org> References: <20200316235612.29854-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/2] net/netvsc: avoid mixing buffered and direct packets 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" Putting buffered and direct packets together into one request is an unnecessary optimization. Better to split into two requests (buffered and direct). Signed-off-by: Stephen Hemminger --- drivers/net/netvsc/hn_rxtx.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 7212780c156e..aad3d8c04c7f 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -1362,15 +1362,14 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) } else { struct hn_txdesc *txd; - /* can send chimney data and large packet at once */ + /* Send any outstanding packets in buffer */ txd = txq->agg_txd; - if (txd) { - hn_reset_txagg(txq); - } else { - txd = hn_new_txd(hv, txq); - if (unlikely(!txd)) - break; - } + if (txd && hn_flush_txagg(txq, &need_sig)) + goto fail; + + txd = hn_new_txd(hv, txq); + if (unlikely(!txd)) + break; pkt = txd->rndis_pkt; txd->m = m; -- 2.20.1