From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f49.google.com (mail-pg0-f49.google.com [74.125.83.49]) by dpdk.org (Postfix) with ESMTP id C99617D22 for ; Mon, 21 Aug 2017 11:33:39 +0200 (CEST) Received: by mail-pg0-f49.google.com with SMTP id u191so22448702pgc.2 for ; Mon, 21 Aug 2017 02:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BQWjDB4XhxpGFG5WK5TwXUOeeMmE5u3PLRcBnll9ZFI=; b=xQ1LDHdnVBSlBH2G8iKw3ekj0VCYS7FzjJ6WNMAjuGEegUYXbagoAg6MGzH396lnm3 Q5IwTnx13zceM2pB2eGgj/ITOspo077wmrZgLc8fz5WYVSwGyh+MIAq1EtZVsfGb0M1r 2+L0cJv14JzC49mBEGdiQOYFsfDkhhYIZjRaCeFQ7thqJK3hFTwirKjE+UcjoWgtX/ml E6nPWqvl988SfvcYvfVZHK1tNujO8bsoVPPdelFd4/2hCLf0uMswiO5YZ7IEboC2tSnN iXk0swapmY8bIBrR4lgxcFhgsGjzQgqKQy0q0Ly4ascsUR7bmG8GE7xLdWnP1q5KMiUI tHMw== 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=BQWjDB4XhxpGFG5WK5TwXUOeeMmE5u3PLRcBnll9ZFI=; b=WVIVV33IEauuf9zUZMaiCaUy1Yq2VdYJaOaWdBwwwiVGDF04z5K7GPzRtIaNr+Hu3i XqdMhmNeXmfIuRCCMI8TLml0pcCJ53FGXFe02UcNiexLMu5SG5kaTs8saSm8muCfutjJ 9ZK3oTMqy6sBfizwZLScdFWw87WN94t0upR0cvUZoDgpIDBObmf+sYCJGOnySHDmKUxU 6RCr2MEeD4S3ptTg21zfNPVT9M5xRIFd6gboxsL+hiXa6aCeTLTZIoxCCwybjsEYck4L YL/3UFyNrk9Zd/4Zr0gRJAw/t182ZbNPtJbl6KLXypQkhe5hWKVwEchvnTE0OvgU/kFp UHJA== X-Gm-Message-State: AHYfb5hFy9lLu9XV+C5r8xMzS+xjDFPJX9r3u+eQJ2jFTaz3vxqerbu5 R+9V8dESpKZ4DjCx X-Received: by 10.98.71.88 with SMTP id u85mr16338712pfa.185.1503308018334; Mon, 21 Aug 2017 02:33:38 -0700 (PDT) Received: from localhost.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 69sm23355087pfh.186.2017.08.21.02.33.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Aug 2017 02:33:37 -0700 (PDT) From: Yuanhan Liu To: Ivan Malov Cc: Andrew Rybchenko , dpdk stable , Yuanhan Liu Date: Mon, 21 Aug 2017 17:30:21 +0800 Message-Id: <1503307878-16728-7-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> References: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/sfc: request MAC stats upload immediately on port start' has been queued to stable release 17.05.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2017 09:33:40 -0000 Hi, FYI, your patch has been queued to stable release 17.05.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From f68f6ccbede3f6b683b9d46a4f61ead29ff15241 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Sat, 8 Jul 2017 16:16:55 +0100 Subject: [PATCH] net/sfc: request MAC stats upload immediately on port start [ upstream commit 3b257f7e6c0fb5daa7b5f3b08e992effb45341e9 ] If MAC stats refresh is arranged to be done by periodic DMA, the first DMA transaction is unlikely to occur right on the port start; if the user tries to get stats right after port start and before the transaction occurs, bogus figures will be collected; a one-off stats upload on port start is a fix Fixes: 1caab2f1e684 ("net/sfc: add basic statistics") Signed-off-by: Ivan Malov Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_port.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c index ee96bcd..87affc9 100644 --- a/drivers/net/sfc/sfc_port.c +++ b/drivers/net/sfc/sfc_port.c @@ -242,6 +242,18 @@ sfc_port_start(struct sfc_adapter *sa) } } + if ((port->mac_stats_update_period_ms != 0) && + port->mac_stats_periodic_dma_supported) { + /* + * Request an explicit MAC stats upload immediately to + * preclude bogus figures readback if the user decides + * to read stats before periodic DMA is really started + */ + rc = efx_mac_stats_upload(sa->nic, &port->mac_stats_dma_mem); + if (rc != 0) + goto fail_mac_stats_upload; + } + sfc_log_init(sa, "disable MAC drain"); rc = efx_mac_drain(sa->nic, B_FALSE); if (rc != 0) @@ -262,6 +274,7 @@ fail_mac_drain: (void)efx_mac_stats_periodic(sa->nic, &port->mac_stats_dma_mem, 0, B_FALSE); +fail_mac_stats_upload: fail_mac_stats_periodic: fail_mcast_address_list_set: fail_mac_filter_set: -- 2.7.4