From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 9DB92343C for ; Thu, 9 Aug 2018 19:50:22 +0200 (CEST) Received: by mail-pg1-f194.google.com with SMTP id k3-v6so3090828pgq.5 for ; Thu, 09 Aug 2018 10:50:22 -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; bh=IYwAZM5k+hA/eCg9O32LSRpYihlnI2z3PKLqtq/xiFk=; b=eaKYvXBA37f+iMtIeHQMaVA/6d3nUxVkHrV6ghXFwRRIbZC6KzmoY3y2h0G9LcFeGh I11z9goNvATWE/S7Q9hWOV5ZFcnas5TkHIBolPF1eqI3+DSXp1Owj/dZ2QYha4zHQEeO 2RCSz1/HpfZBso9pi9LqSrMAJNINfw+v21xeArRZEp5Xrb2WA9k3hFkW7Hy1nJNizKOE 5dpOCak4HXchGYBB/505PuBkCdgDTFPwCGjpA7t5PDuXLu8+99Ipg/xt5uEiA5I4ZZ5+ VSBZ4+izQL1mp+mJ/njI6J6LCx49KD3GZWztfao9OUN4iOC2ArAskxQJzIdYY/ipd8Cf Ackw== 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; bh=IYwAZM5k+hA/eCg9O32LSRpYihlnI2z3PKLqtq/xiFk=; b=cfrYEop+nRlp6fc99GcS5QwE54WNSX1f0jPLhaN4ZsrsjG7B8lyfBmirtlEkCdJkMJ OsCMDRhhzOuNJwmVURpYUCgzuP+DMhxUp3QXUDur51Ren0uG9zl2hyt7o6y+BOhitZa2 FlUxuJRqeEsljKxPPLEwh2mWm7jBuShBOWtJpZWMEy9l5tF22Mxt54ltujDOACQuLXuM 6rYDLJPrgeRJ+hDaYwaH303W3OXdpI0cjVDoaoNz07Hf3MR0Ug0xCtvQ+wdk6GANy5Uc h8pjwhz50wR7C2wDmv/IFlQCEGZcMczvJFBsKL49HkSZrZnaxEKXVqlumaYU1C3Qff1+ EKlw== X-Gm-Message-State: AOUpUlHhFQrQEdGD8rTlx14rBOjMxfCNSFizE/hfc2DYwMJPQhBV8vgr KNFkkfMXueU2bYFHy/EvaTEdxJZhnxA= X-Google-Smtp-Source: AA+uWPxKwO4aE/y/3mKW/veACdxwDVEHLgooDzSymLYcu1/kcYxuFBFpVL0aaB2umDm+TwFEJsdaJA== X-Received: by 2002:a62:569c:: with SMTP id h28-v6mr3382437pfj.201.1533837021478; Thu, 09 Aug 2018 10:50:21 -0700 (PDT) Received: from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id n22-v6sm14993873pfj.68.2018.08.09.10.50.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 10:50:20 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Stephen Hemminger Date: Thu, 9 Aug 2018 10:50:07 -0700 Message-Id: <20180809175008.5787-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180809175008.5787-1-stephen@networkplumber.org> References: <20180809175008.5787-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 3/4] netvsc: set lower host latency 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: , X-List-Received-Date: Thu, 09 Aug 2018 17:50:23 -0000 Tune the vmbus connection so the host scans faster. This improves transmit performance. The host default value is 100us but setting to 50us reduces packet loss significantly. Signed-off-by: Stephen Hemminger --- drivers/net/netvsc/hn_ethdev.c | 6 ++++++ drivers/net/netvsc/hn_var.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 78b842ba2d68..148e6a33d682 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -264,6 +264,9 @@ static int hn_subchan_configure(struct hn_data *hv, return err; } + rte_vmbus_set_latency(hv->vmbus, new_sc, + HN_CHAN_LATENCY_NS); + retry = 0; chn_index = rte_vmbus_sub_channel_index(new_sc); if (chn_index == 0 || chn_index > hv->max_queues) { @@ -629,6 +632,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev) if (err) return err; + rte_vmbus_set_latency(hv->vmbus, hv->channels[0], + HN_CHAN_LATENCY_NS); + hv->primary = hn_rx_queue_alloc(hv, 0, eth_dev->device->numa_node); diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h index f7ff8585bc1c..b3e0a93d45df 100644 --- a/drivers/net/netvsc/hn_var.h +++ b/drivers/net/netvsc/hn_var.h @@ -20,6 +20,9 @@ /* Retry interval */ #define HN_CHAN_INTERVAL_US 100 +/* Host monitor interval */ +#define HN_CHAN_LATENCY_NS 50000 + /* Buffers need to be aligned */ #ifndef PAGE_SIZE #define PAGE_SIZE 4096 -- 2.18.0