From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0497DA00E6 for ; Tue, 16 Apr 2019 22:01:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AFD771B559; Tue, 16 Apr 2019 22:01:18 +0200 (CEST) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by dpdk.org (Postfix) with ESMTP id 52CDC1B54F for ; Tue, 16 Apr 2019 22:01:17 +0200 (CEST) Received: by mail-ed1-f43.google.com with SMTP id d46so14175968eda.7 for ; Tue, 16 Apr 2019 13:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=da/oQTk+ZDhGfTHxxFI108wAOvUFF735Jg6YK1a1g7A=; b=Ou4o0sloA5XhIowPkaq6r+gShOYr1i9hVsnTxhbOEjdYuaDmoS6ht0EDb+hDk6ngtX TcAV9SXWJiyBpnjHTHr1kUJTVTIjAw9tETjsYdxDWwBk7bt11yBr1psz0KtkF4XbYBnQ 2sWIczCrue62RNtrhS21FV0uQ3B9dsFQDfnprpXDZHuejZxxonZcpUBhDhjAuNsY2Vvy fCDG3U34H1hmZSScF1R3XbM33fd1cZ6jF9zMDanCupKmzqkK8SyTEBkarmezB+bPr1sN DeAAiw7+ThMA4RtaJzPqNIGLitQnssNYGOpdDCZ7nvXPRv7MHB3TL/g0wQxEokjmbyZM KqPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=da/oQTk+ZDhGfTHxxFI108wAOvUFF735Jg6YK1a1g7A=; b=QIRgEB0XNjpm+/fF/6TCXugEG2CwpOuyRlg7vliuuygAIFptuja20/nA7jUJRNN6oC EZInVudNLQ0oeEeWv3Au8EaZ3prigjJ9Xr6JEXFHqUPzulKTVxUiOAYPTAYjudv4JFc+ W3u40P9LOrClZfmqqMKthDLL5olqGvClgebxyPJqE3PBK66eXZNR57CcAiu8Jjv8TfJ7 C75lDLUsxnN/hgH+niIO+C7HpUeDXxyAOXd1gYFkvjxky+IwR44xFfWWrkNIvhvZppFM M+6KIPMg4PQtKzUWppG2RTZT+AtzSj5ivoQZcEuvZGTTtgW8eSqx+qxljaZtVln6L6pX lj+Q== X-Gm-Message-State: APjAAAUKTsLmSsv8WmWgV+tkQhM3ygmpg55zpzgk3AP+Gf3nd/yjjFUd M+q3bOZc76T2UkGFTfQCO2URmwv4Lk54xmpXImk= X-Google-Smtp-Source: APXvYqwtRcDRYPXx0RgKm9NmXwdtlJnhE76j48RTr8KZLuoUq3CyXvveo6z8p8kJGAPpmRF1s8W9GRk0S2pcGhgikkU= X-Received: by 2002:a50:9265:: with SMTP id j34mr18569067eda.243.1555444876973; Tue, 16 Apr 2019 13:01:16 -0700 (PDT) MIME-Version: 1.0 References: <1555431823-169297-1-git-send-email-yanjie.xu@intel.com> In-Reply-To: <1555431823-169297-1-git-send-email-yanjie.xu@intel.com> From: Rami Rosen Date: Tue, 16 Apr 2019 23:01:10 +0300 Message-ID: To: xuyanjie Cc: dts@dpdk.org Content-Type: multipart/alternative; boundary="0000000000005c18ec0586ab3b54" Subject: Re: [dts] [PATCH] add new ipsec lib test scripts X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" --0000000000005c18ec0586ab3b54 Content-Type: text/plain; charset="UTF-8" Hi, xuyanjie, Few minor coments: should has -> should have: + # Generally, testbed should has 4 ports NIC, like, > + # 03:00.0 03:00.1 03:00.2 03:00.3 > + # This test case will > + # - physical link is 03:00.0 <-> 03:00.1 and 03:00.2 <-> 03:00.3 > + # - bind 03:00.0 and 03:00.2 to ipsec-secgw app > + # - send test packet from 03:00.3 > + # - receive packet which forwarded by ipsec-secgw from 03:00.0 > Should be dts ports.cfg See: http://git.dpdk.org/tools/dts/tree/conf/ports.cfg + # - configure port and peer in dts port.cfg > + self.tx_port = self.tester.get_local_port(self.dut_ports[1]) > + self.rx_port = self.tester.get_local_port(self.dut_ports[0]) > + > + self.tx_interface = self.tester.get_interface(self.tx_port) > + self.rx_interface = self.tester.get_interface(self.rx_port) > + > + self.logger.info("tx interface = " + self.tx_interface) > + self.logger.info("rx interface = " + self.rx_interface) > + > + self._app_path = "./examples/ipsec-secgw/build/ipsec-secgw" > + if not cc.is_build_skip(self): > + cc.build_dpdk_with_cryptodev(self) > + cc.bind_qat_device(self) > + > + self._default_ipsec_gw_opts = { > + "config": None, > + "P": "", > + "p": "0x3", > + "f": "local_conf/ipsec_test.cfg", > + "u": "0x1" > + } > + > + self._pcap_idx = 0 > + self.pcap_filename = '' > + > + def set_up(self): > + pass > + > + def tear_down(self): > + self.dut.kill_all() > + > + def tear_down_all(self): > + cc.clear_dpdk_config(self) > +, "FAIL") > + > ... ... > + def test_tun_qat_aes_gcm_ipv4(self): > + if cc.is_test_skip(self): > + return > + > + result = True > + > + self.logger.info("Test tun_qat_aes_gcm_ipv4") > + self.pcap_filename = "test_tun_qat_aes_gcm_ipv4" > + ipsec_gw_opt_str = self._get_ipsec_gw_opt_str() > + self.logger.debug(ipsec_gw_opt_str) > + > + result = self._execute_ipsec_gw_test(ipsec_gw_opt_str) > + self.verify(result, "FAIL") > + > + def test_tun_qat_aes_128_ctr_ipv4(self): > + if cc.is_test_skip(self): > + return > + > + result = True > + > + self.logger.info("Test tun_qat_aes_128_ctr_ipv4") > + self.pcap_filename = "test_tun_qat_aes_128_ctr_ipv4" > + ipsec_gw_opt_str = self._get_ipsec_gw_opt_str() > + self.logger.debug(ipsec_gw_opt_str) > + > + result = self._execute_ipsec_gw_test(ipsec_gw_opt_str) > + self.verify(result, "FAIL") > + > + def test_tun_qat_aes_128_ctr_ipv6(self): > + if cc.is_test_skip(self): > + return > + > + result = True > + > + self.logger.info("Test tun_qat_aes_128_ctr_ipv6") > + self.pcap_filename = "test_tun_qat_aes_128_ctr_ipv6" > + ipsec_gw_opt_str = self._get_ipsec_gw_opt_str() > + self.logger.debug(ipsec_gw_opt_str) > + > + result = self._execute_ipsec_gw_test(ipsec_gw_opt_str) > + self.verify(result, "FAIL") > + > + def test_qat_aes_128_ctr_ipv4_transport(self): > + if cc.is_test_skip(self): > + return > + > + result = True > + > Should be: self.logger.info("Test trs_qat_aes_128_ctr_ipv4_transport") + self.logger.info("Test trs_qat_aes_128_ctr_ipv4") > + self.pcap_filename = "test_trs_qat_aes_128_ctr_ipv4" > + ipsec_gw_opt_str = self._get_ipsec_gw_opt_str() > + self.logger.debug(ipsec_gw_opt_str) > + > Regards, Rami Rosen --0000000000005c18ec0586ab3b54 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,=C2=A0xuyanjie,=
Few minor coments:

=C2=A0=C2=A0should has -> sh= ould have:

+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Generally, testbed should has 4 ports NIC, l= ike,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # 03:00.0 03:00.1 03:00.2 03:00.3
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # This test case will
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # - physical link is 03:00.0 <-> 03:00.1= and 03:00.2 <-> 03:00.3
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # - bind 03:00.0 and 03:00.2 to ipsec-secgw ap= p
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # - send test packet from 03:00.3
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # - receive packet which forwarded by ipsec-se= cgw from 03:00.0

Should be dts ports.cfg
See:=C2=A0http://git.dpdk= .org/tools/dts/tree/conf/ports.cfg

+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # - configure port and peer in dts port.cfg +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.tx_port =3D self.tester.get_local_port(se= lf.dut_ports[1])
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.rx_port =3D self.tester.get_local_port(se= lf.dut_ports[0])
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.tx_interface =3D self.tester.get_interfac= e(self.tx_port)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.rx_interface =3D self.tester.get_interfac= e(self.rx_port)
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.info("tx interfa= ce =3D " + self.tx_interface)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.info("rx interfa= ce =3D " + self.rx_interface)
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self._app_path =3D "./examples/ipsec-secg= w/build/ipsec-secgw"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 if not cc.is_build_skip(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cc.build_dpdk_with_cryptodev(sel= f)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 cc.bind_qat_device(self)
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self._default_ipsec_gw_opts =3D {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "config": None,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "P": "",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "p": "0x3",<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "f": "local_conf/= ipsec_test.cfg",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "u": "0x1" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self._pcap_idx =3D 0
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.pcap_filename =3D ''
+
+=C2=A0 =C2=A0 def set_up(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 pass
+
+=C2=A0 =C2=A0 def tear_down(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.dut.kill_all()
+
+=C2=A0 =C2=A0 def tear_down_all(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 cc.clear_dpdk_config(self)
+, "FAIL")
+
...
= ...

+=C2=A0 =C2=A0 def test_tun_qat_aes_gcm_ipv4(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 if cc.is_test_skip(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D True
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.info("Test tun_q= at_aes_gcm_ipv4")
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.pcap_filename =3D "test_tun_qat_aes_= gcm_ipv4"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 ipsec_gw_opt_str =3D self._get_ipsec_gw_opt_st= r()
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.debug(ipsec_gw_opt_str)
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D self._execute_ipsec_gw_test(ipsec_g= w_opt_str)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.verify(result, "FAIL")
+
+=C2=A0 =C2=A0 def test_tun_qat_aes_128_ctr_ipv4(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 if cc.is_test_skip(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D True
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.info("Test tun_q= at_aes_128_ctr_ipv4")
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.pcap_filename =3D "test_tun_qat_aes_= 128_ctr_ipv4"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 ipsec_gw_opt_str =3D self._get_ipsec_gw_opt_st= r()
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.debug(ipsec_gw_opt_str)
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D self._execute_ipsec_gw_test(ipsec_g= w_opt_str)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.verify(result, "FAIL")
+
+=C2=A0 =C2=A0 def test_tun_qat_aes_128_ctr_ipv6(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 if cc.is_test_skip(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D True
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.info("Test tun_q= at_aes_128_ctr_ipv6")
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.pcap_filename =3D "test_tun_qat_aes_= 128_ctr_ipv6"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 ipsec_gw_opt_str =3D self._get_ipsec_gw_opt_st= r()
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.debug(ipsec_gw_opt_str)
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D self._execute_ipsec_gw_test(ipsec_g= w_opt_str)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.verify(result, "FAIL")
+
+=C2=A0 =C2=A0 def test_qat_aes_128_ctr_ipv4_transport(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 if cc.is_test_skip(self):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D True
+

Should be:=C2=A0=C2=A0
=
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0self.logger.info("Test trs_qat_aes_128_ctr_ipv4_transport"= )

+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.info("Test trs_q= at_aes_128_ctr_ipv4")
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.pcap_filename =3D "test_trs_qat_aes_= 128_ctr_ipv4"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 ipsec_gw_opt_str =3D self._get_ipsec_gw_opt_st= r()
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.logger.debug(ipsec_gw_opt_str)
+

Regards,
Rami Rosen

--0000000000005c18ec0586ab3b54--