From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B47CA04B5; Mon, 11 Jan 2021 22:29:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1201A140D0A; Mon, 11 Jan 2021 22:29:44 +0100 (CET) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by mails.dpdk.org (Postfix) with ESMTP id E8E4E140D0A for ; Mon, 11 Jan 2021 22:29:41 +0100 (CET) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 10BL30uE161968; Mon, 11 Jan 2021 16:29:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=bPVGIfZdKOINlE7ex75NVi/g77xmKRa06jmic3h0xiQ=; b=Nq4UbcddrkQniROiHwUnk9tkk+8itZt16ws2gs93UH6Id1IRs+xdx/m4LvqzPcFl74oP T7/9FAz2J37mDk0qoCQM6Qrh2nbMn614NtYwuxt7SO2GGgGZbN84BeKWqGikZniXmAh0 RSzZ0TsfRY85k3hq4t0msRGwbgamgLHk7ullM/LzxjemRcAduS4fr1Ef9Yqecbvkpyri TWbQkRTtnB7zCi76WmB4wSsi9lFU0rSKjh5IqCCrNMy9lNdafq5d1qacBPzPJPRm/V25 35FFRai9emjmu29LSnagoDvc406YgUzMxKKHqnaBQVt+fZ3S6sdqAnGp1QsrF/NTWjOb 7w== Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 360wgfj2rc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Jan 2021 16:29:39 -0500 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10BLCUk1017408; Mon, 11 Jan 2021 21:29:38 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma04dal.us.ibm.com with ESMTP id 35y448wu2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Jan 2021 21:29:38 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10BLTbxA22610402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Jan 2021 21:29:37 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 337F6C605A; Mon, 11 Jan 2021 21:29:37 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C0DE5C6057; Mon, 11 Jan 2021 21:29:36 +0000 (GMT) Received: from Davids-MBP.randomparity.org (unknown [9.163.92.50]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 11 Jan 2021 21:29:36 +0000 (GMT) To: Ruifeng Wang , Bruce Richardson , Vladimir Medvedkin Cc: dev@dpdk.org, nd@arm.com, jerinj@marvell.com, honnappa.nagarahalli@arm.com References: <20210108082127.1061538-1-ruifeng.wang@arm.com> <20210108082127.1061538-5-ruifeng.wang@arm.com> From: David Christensen Message-ID: <11c198bb-0d07-4745-9be9-0b0f34128376@linux.vnet.ibm.com> Date: Mon, 11 Jan 2021 13:29:36 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210108082127.1061538-5-ruifeng.wang@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-11_30:2021-01-11, 2021-01-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=559 spamscore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101110115 Subject: Re: [dpdk-dev] [PATCH 4/4] test/lpm: improve coverage on tbl8 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 1/8/21 12:21 AM, Ruifeng Wang wrote: > Existing test cases create 256 tbl8 groups for testing. The number covers > only 8 bit next_hop/group field. Since the next_hop/group field had been > extended to 24-bits, creating more than 256 groups in tests can improve > the coverage. > > Coverage was not expanded to reach the max supported group number, because > it would take too much time to run for this fast-test. > > Signed-off-by: Ruifeng Wang > --- > app/test/test_lpm.c | 22 ++++++++++++++-------- > 1 file changed, 14 insertions(+), 8 deletions(-) > > diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c > index 258b2f67c..ee6c4280b 100644 > --- a/app/test/test_lpm.c > +++ b/app/test/test_lpm.c > @@ -993,7 +993,7 @@ test13(void) > } > > /* > - * Fore TBL8 extension exhaustion. Add 256 rules that require a tbl8 extension. > + * For TBL8 extension exhaustion. Add 512 rules that require a tbl8 extension. > * No more tbl8 extensions will be allowed. Now add one more rule that required > * a tbl8 extension and get fail. > * */ > @@ -1008,28 +1008,34 @@ test14(void) > struct rte_lpm_config config; > > config.max_rules = 256 * 32; > - config.number_tbl8s = NUMBER_TBL8S; > + config.number_tbl8s = 512; > config.flags = 0; > - uint32_t ip, next_hop_add, next_hop_return; > + uint32_t ip, next_hop_base, next_hop_return; > uint8_t depth; > int32_t status = 0; > + xmm_t ipx4; > + uint32_t hop[4]; > > /* Add enough space for 256 rules for every depth */ > lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, &config); > TEST_LPM_ASSERT(lpm != NULL); > > depth = 32; > - next_hop_add = 100; > + next_hop_base = 100; > ip = RTE_IPV4(0, 0, 0, 0); > > /* Add 256 rules that require a tbl8 extension */ > - for (; ip <= RTE_IPV4(0, 0, 255, 0); ip += 256) { > - status = rte_lpm_add(lpm, ip, depth, next_hop_add); > + for (; ip <= RTE_IPV4(0, 1, 255, 0); ip += 256) { > + status = rte_lpm_add(lpm, ip, depth, next_hop_base + ip); > TEST_LPM_ASSERT(status == 0); > > status = rte_lpm_lookup(lpm, ip, &next_hop_return); > TEST_LPM_ASSERT((status == 0) && > - (next_hop_return == next_hop_add)); > + (next_hop_return == next_hop_base + ip)); > + > + ipx4 = vect_set_epi32(ip + 3, ip + 2, ip + 1, ip); > + rte_lpm_lookupx4(lpm, ipx4, hop, UINT32_MAX); > + TEST_LPM_ASSERT(hop[0] == next_hop_base + ip); > } > > /* All tbl8 extensions have been used above. Try to add one more and > @@ -1037,7 +1043,7 @@ test14(void) > ip = RTE_IPV4(1, 0, 0, 0); > depth = 32; > > - status = rte_lpm_add(lpm, ip, depth, next_hop_add); > + status = rte_lpm_add(lpm, ip, depth, next_hop_base + ip); > TEST_LPM_ASSERT(status < 0); > > rte_lpm_free(lpm); > Tested-by: David Christensen