From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0059.outbound.protection.outlook.com [104.47.1.59]) by dpdk.org (Postfix) with ESMTP id 58D8C1B2C4 for ; Sat, 21 Oct 2017 09:29:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YCyUsRVxwy5TQWNXQE/v/ihrPIMAQx8KVt7b+EA8DI8=; b=yz522l6Apt3HGHmT78bMw90/qnlDv5ZqoyWDzPX1Z+54H/CK3wPFde1aeppaAu1sDBwgQO7MPM/RmPD3nsK7pWRJiRTPAMiv3wao5K2IS5C30vC69Na66qgKZhgBBIcUofXQaEOcto6xdED0bRthRcmVxFASLRHr4IveeBT9qaQ= Received: from AM4PR05MB3202.eurprd05.prod.outlook.com (10.171.186.31) by AM4PR05MB3202.eurprd05.prod.outlook.com (10.171.186.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Sat, 21 Oct 2017 07:29:06 +0000 Received: from AM4PR05MB3202.eurprd05.prod.outlook.com ([fe80::49f9:72b9:df85:7a8]) by AM4PR05MB3202.eurprd05.prod.outlook.com ([fe80::49f9:72b9:df85:7a8%13]) with mapi id 15.20.0156.005; Sat, 21 Oct 2017 07:29:06 +0000 From: Ori Kam To: "Mcnamara, John" , Adrien Mazarguil CC: "dev@dpdk.org" , Ori Kam Thread-Topic: [PATCH] doc: add basic howto for flow API Thread-Index: AQHTSKdVpG7TJAkq+02xMVrtlgkDZ6Lq8mOAgAL2szA= Date: Sat, 21 Oct 2017 07:29:06 +0000 Message-ID: References: <1508396139-27687-1-git-send-email-orika@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [85.64.232.108] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB3202; 6:07M7jYNlZ0yitEqFaehxWfLReOVw+nNaVavVuYVUQQXvek9TD6xEmGJ+h/qOl/tGHmebCC4bveaTA8Pk1fHfTg9QQi30LOC0N/YYf+d4o74aqe9QhaT+KGGq9EpPp/VMMmibbRSZbqXR4rRdGmzxFYd8ueworLkC2VLsCkCB0il1ybwi8j6mkjL6a4+eIQQTWgbGFYbiSagkzHJ2MNyApcqfij24QgDwOmpcb5zY97MSuG6CRH7J8jNEXqWpGB1fVe8EBkO2c1CsDLfp6Iw7uwjtnob6Sbw6Aph80POX+Gcq6t5qUnUH+MHzM71j/Aj2X8iezcv0zq9C4V/IEPYC4w==; 5:bvXnZKNzA5HOmMhm4fAaicia99ReB+Bxom2W3k5ukIF8mKsir59iig0BkJfEFXoIB0fDL+tU2Xd+xmL1UeEX1GEHZKDmPAM/+eTP9nceBa6ykjkWaTcBo4iUi77W6TiQHWRojZNv0a7H6Zni85nRyRuwcle/boEZd7+ur3mlVb0=; 24:gdLu84IFG2oZvY5el+VoQRobw9LNhBbvaAnqlp93CImgs7XM2a3rnVqfsdCFCzIuozGLmdL9zDTCROYPafKfehHiFHvxb65ep4U5jqJjoY4=; 7:NkphgcPpq3WRPtXC2RstvNUxZaSOYUOn2kqWcz0HUmakxgp/cYRxU0tj3B/RsaIvjiP7uui3MKuIkuk72dHLbc0TBrExAgmlNHmQlhubGB5OGwcFuHTLn5istdhEP25Hjy+SlJ0DacBh622fswo2DUC/BC7THqQA+RPLQEqWZvGBsaEI1vcNYoAFsYf47vl4C/nctpj2lTSjK/of7EEy7dG20Jv9T3fb/KNtPyYJ+2A= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: e66158f4-9094-4302-04de-08d51855699c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:AM4PR05MB3202; x-ms-traffictypediagnostic: AM4PR05MB3202: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-exchange-antispam-report-test: UriScan:(228905959029699); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(3231020)(6055026)(6041248)(20161123560025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM4PR05MB3202; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM4PR05MB3202; x-forefront-prvs: 046753C63C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(376002)(13464003)(199003)(189002)(2906002)(106356001)(105586002)(305945005)(4326008)(53546010)(8936002)(68736007)(8676002)(66066001)(53936002)(107886003)(316002)(7736002)(86362001)(74316002)(97736004)(6246003)(55016002)(189998001)(3280700002)(3660700001)(54906003)(110136005)(99286003)(5250100002)(9686003)(6506006)(6436002)(25786009)(5660300001)(6116002)(3846002)(102836003)(2900100001)(14454004)(229853002)(81166006)(81156014)(7696004)(101416001)(50986999)(76176999)(54356999)(478600001)(33656002)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3202; H:AM4PR05MB3202.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e66158f4-9094-4302-04de-08d51855699c X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Oct 2017 07:29:06.5131 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3202 Subject: Re: [dpdk-dev] [PATCH] doc: add basic howto for flow API 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: Sat, 21 Oct 2017 07:29:08 -0000 Hi John, Thanks for your comments and time. Please see my comments inline. > -----Original Message----- > From: Mcnamara, John [mailto:john.mcnamara@intel.com] > Sent: Thursday, October 19, 2017 1:06 PM > To: Ori Kam ; Adrien Mazarguil > > Cc: dev@dpdk.org > Subject: RE: [PATCH] doc: add basic howto for flow API >=20 >=20 >=20 > > -----Original Message----- > > From: Ori Kam [mailto:orika@mellanox.com] > > Sent: Thursday, October 19, 2017 7:56 AM > > To: adrien.mazarguil@6wind.com; Mcnamara, John > > > > Cc: dev@dpdk.org; orika@mellanox.com > > Subject: [PATCH] doc: add basic howto for flow API > > > > As the rte flow is a new complex module in the DPDK. > > In order to ease developers in to using this feature it was suggested > > to supply a simple howto doc. > > > > Signed-off-by: Ori Kam >=20 > Hi Ori, >=20 > Thanks for useful and very doc. It is good to see additions to the How-to > guides. > We should have more of those. >=20 > Some minor comments below. >=20 >=20 > > > > + tpmd> flow create 0 ingress pattern eth / vlan / ipv4 dst is > > + 192.168.3.2 / end actions drop / end >=20 >=20 > The testpmd commands are very long and run off the page in the PDF and > Html docs. >=20 > Something like the following would be better and just as clear: >=20 >=20 > In this example we will create a simple rule that drops packets whose IPv= 4 > destination equals 192.168.3.2. This code is equivalent to the following > testpmd command (wrapped for clarity):: >=20 > tpmd> flow create 0 ingress pattern eth / vlan / > ipv4 dst is 192.168.3.2 / end actions drop / end >=20 >=20 >=20 Will fix. > > + $scapy > > + welcome to Scapy > > + >> sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.4', dst=3D'192.168.3.1'= ), > > + iface =3D , count 1) >> > > + sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.5', dst=3D'192.168.3.2'), > > + iface =3D , count 1) > > + > > +terminal 1: output log:: > > + > > + received packet with src ip =3D 176.80.50.4 received packet with sr= c > > + ip =3D 176.80.50.5 > > + > > +terminal 1: running sample app flow rule enabled:: > > + > > + ./filter-program enabled > > + [waiting for packets] > > + > > +terminal 2: running scapy:: > > + > > + $scapy > > + welcome to Scapy > > + >> sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.4', dst=3D'192.168.3.1'= ), > > + iface =3D , count 1) >> >=20 > There is a typo here and in the other scapy commands. It should be: >=20 > count=3D1 > Will be fixed. =20 > Also would be better as a string. And the line is also l= ong so > something like this would be better: >=20 > Terminal 2: running scapy:: >=20 > $scapy > welcome to Scapy > >> sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.4', dst=3D'192.168.3.1'), = \ > iface=3D'some interface', count=3D1) > >> sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.5', dst=3D'192.168.3.2'), = \ > iface=3D'some interface', count=3D1) >=20 I agree will be changed. > I have some other small comments/suggestions that I will send to you > offline. >=20 I will read your comments from the offline mail, and will send the new version based on the combination of the mails. > Thanks, >=20 > John Thanks, Ori Kam