Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3047301ybh; Mon, 5 Aug 2019 11:03:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNqd5XDlhIW3g7X+vjyzOpsBRH+7e5tvtm4WDmRaxAeMzFh78wXYuvkHjg4OISejwRkcBl X-Received: by 2002:a62:750c:: with SMTP id q12mr76424825pfc.59.1565028180737; Mon, 05 Aug 2019 11:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565028180; cv=none; d=google.com; s=arc-20160816; b=UhT6O4t7UOYKy+4atcyCMYzhyLaRgFlmJo61+KrUTk6Tp69sfmK4cpf4hvTvy6O+s2 KWbnZU1ogZb/pUB1Qp4Wo/ptq6HBLHhchd+W6sxPJtXCEK/KqDH8tsq3RSHVVhRkkBsv rRcXQdr89p4P8tihOo0TvWBgPvXy+evIo6EeIJ+FWtexzfW4A7dvGah2c9BH87OmWlsm sVTTUhkwGZWGMSNWgpC2zmhGECGdUlC2HJsHaUkj9wyGVl1M0AG6Ae/PU2po7UsJOFpO ZyWffrzeyXEeCM1FxtX5669lCCM0BS/bhldkTa2SoZb7EmHv/a8IIkDWZpSDOVABMi9K QkwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=mB6ubHpoJEVRjPpE5qMm0zIdNe83CSE3hJ2w5yo1wd0=; b=Gm8evO3NQArBaloIiqZp+ziafjzPtM2KLtvxIcfZSKcGasp057f+gzZZ7JUE38uTIb O8TXtHQykK7DYCFQe/jIb+n7R5AUTvXFtMCvOO89mXqt/0+b1mbrgtaZlIfOU7kvDxK/ voX5xDPfk2JLToAGzgw95K6r3c2aswNiFBEU3s85dYCofSiPu3zgipNUjcPLc94HRiDF IgIhYvaO7WZyca17wNxlx5WuZDTjxpoYnQ5Z94vf1lEymB/G0MBhXnov5ff6r3v6+wA4 VyaVnzgS1vpDB8FR44EWKl4USkhOJwKQo3TBHETgRaGOt4dWhTQqwSrjts5Jww4PM7kk 0RRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=Jv7FN0oL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si31262349pgh.434.2019.08.05.11.02.44; Mon, 05 Aug 2019 11:03:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=Jv7FN0oL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730222AbfHESBf (ORCPT + 99 others); Mon, 5 Aug 2019 14:01:35 -0400 Received: from dc2-smtprelay2.synopsys.com ([198.182.61.142]:56158 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726779AbfHESBe (ORCPT ); Mon, 5 Aug 2019 14:01:34 -0400 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 056D8C0A72; Mon, 5 Aug 2019 18:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1565028094; bh=aTDnCXcniV6uvBzYE58A0TIJ6PhSk7VA//+4NwG8t7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=Jv7FN0oLTMBYAuTrNHDUoEvHxAMhrh0vk7dy7/6fn+D3vXd+fY+or3R6WqBpNct1W jOsbuwy4AJjLYV40+OAOOutwk3iO1BoPy0Uc1hl5yhDNGJ5UDTdoCazL6RsKzv1rd7 bL6bHuvb1nXmkr0pbmYRS/fVK0LLjVHlySudiz8YR3CvffYkhwXSnJ91RcAW4voeCv z/01uqy7UH9hmBdITQeCsfeLKMtqkBqIpfB93U4JFPb5WVD+MHaRATX2aX8xRsVWZX ZTSC7dOGskEtIxg3fKTpdTBbWjOoT9IlD9WDP771itt9eS8DKeGQar/dq3rGZYkfOC s0J9V0clR2Deg== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id BFDEEA0072; Mon, 5 Aug 2019 18:01:32 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Cc: Joao Pinto , Jose Abreu , Giuseppe Cavallaro , Alexandre Torgue , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 07/10] net: stmmac: selftests: Add RSS test Date: Mon, 5 Aug 2019 20:01:20 +0200 Message-Id: <060d0e29c13f75123d8dfa17de5fcbb679048fc7.1565027782.git.joabreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a test for RSS in the stmmac selftests. Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Coquelin Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- .../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c index a97b1ea76438..83b775a8cedc 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -700,6 +700,21 @@ static int stmmac_test_flowctrl(struct stmmac_priv *priv) return ret; } +static int stmmac_test_rss(struct stmmac_priv *priv) +{ + struct stmmac_packet_attrs attr = { }; + + if (!priv->dma_cap.rssen || !priv->rss.enable) + return -EOPNOTSUPP; + + attr.dst = priv->dev->dev_addr; + attr.exp_hash = true; + attr.sport = 0x321; + attr.dport = 0x123; + + return __stmmac_test_loopback(priv, &attr); +} + #define STMMAC_LOOPBACK_NONE 0 #define STMMAC_LOOPBACK_MAC 1 #define STMMAC_LOOPBACK_PHY 2 @@ -745,6 +760,10 @@ static const struct stmmac_test { .name = "Flow Control ", .lb = STMMAC_LOOPBACK_PHY, .fn = stmmac_test_flowctrl, + }, { + .name = "RSS ", + .lb = STMMAC_LOOPBACK_PHY, + .fn = stmmac_test_rss, }, }; -- 2.7.4