From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0054.outbound.protection.outlook.com [104.47.34.54]) by dpdk.org (Postfix) with ESMTP id 2CE232BF1 for ; Tue, 24 Jul 2018 10:14:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6dBW9n9MmjVtthfmRmUfghb+K8vP5guax2JPVenc8Q0=; b=DeC/M2c5XchxYnNyBYdEmtQf31SS2vQVaENO+fFKFQIGbZqekJzfJAYsEBFjbHhGfHeQJDUcVntbxYkLKvHlwW9bg2AAJCMDxZvFUrX4LlUHhmYSjBPlPZ0c2Iukmywa7ZMIsy8juOPDEFURHhP5WlpYpj1PUi0vqrnWuwErKD4= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3650.namprd07.prod.outlook.com (52.132.102.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Tue, 24 Jul 2018 08:14:16 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f0d4:1828:37f5:5927]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f0d4:1828:37f5:5927%2]) with mapi id 15.20.0973.022; Tue, 24 Jul 2018 08:14:15 +0000 From: "Verma, Shally" To: "De Lara Guarch, Pablo" CC: "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Challa, Mahipal" , "Sahu, Sunila" , "Sahu, Sunila" , "Gupta, Ashish" Thread-Topic: [PATCH v4 4/5] compress/zlib: support burst enqueue/dequeue Thread-Index: AQHUItQPKmq2JwkIfUmYf9geT9S7PaSd+46AgAAFvICAAAVK8A== Date: Tue, 24 Jul 2018 08:14:15 +0000 Message-ID: References: <1532357474-9544-1-git-send-email-shally.verma@caviumnetworks.com> <1532357474-9544-5-git-send-email-shally.verma@caviumnetworks.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=Shally.Verma@cavium.com; x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3650; 6:A7oReS1XKsWYzyWOLIzTKP2JQQOXPjb5VQ0CqvsIs6juXjKb8d94EB71YyIXjq0+DtRf4K6Px8KCSRWquHpgY8z8E0N/E3mJSzIDQWvDBx69DMCdrDAuBlU27ipT2rQ8GVAZoPUPHvz9paN2Ft5i8k6TKs+Cj2AJGyM7tK+dg9VmAQlGxvyfkK3Fm5iSog3QcGFmsvubBG/MSF5LDK8fcO1oPzDt0UDiBV/IVz8VpZrqvoVRh7G/+UsuwlXQYkLHdh5iIPiuhrDsDast+KWp+ZoO48mJR/CQu8Gq6J6LzSu+t6x1WzKKYyHmvAb6ltamJXlD3537U303I0gWfa/8uhHIyo1EJpH2VCb6BXMeArfZQTqXfJgbzDuOZ0UBlD1n8B4hho3c1sHSEHSxeMg/mpW1L/lRntAOcv55GidJyFv4png+JKE2Q2xBhwuF618HKiGbezmnCuxogUgPP499Dg==; 5:9ZKGtfTmuBTNpZw/q71AP+spUfHo3ARSpYKWLh133eNVL/cTIpVlZ2r0I7sweG7f4ynOks3FeSobEjeY76bMrBBxriyndkC6ira/tsScyu2HrS5Qq2bLHrlY3R64jIgVk0srAgOCaIarBFFulcDe+A+eq/w7n5TwTiKDKklOHcE=; 7:rE19qSeZf+DUd8Ag75ZWYznM11Z1dWrlZoug0hrjLlBdHuGEpId6HPW1ePU812eIaBrtR/DR5By+NVe9Uhmctq3iTkBv81tvExTC5DOMFdUMhKqD627lZfT7vlGcn2XD+Ctj+K+EgJmbMUdsthlruhWK2dbw98sZidRgE3xSvlS568mZBBCBwy4vMAfaBaC5O4PR95u9rfosZCPNsQto3iy7o5by6a/E62Dckq9c4Rc56G85r7nV/x7RKtha1Uxj x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(136003)(39860400002)(346002)(396003)(366004)(376002)(13464003)(199004)(189003)(43544003)(54906003)(72206003)(55016002)(26005)(86362001)(14454004)(102836004)(2906002)(81156014)(9686003)(81166006)(53546011)(105586002)(6506007)(106356001)(97736004)(478600001)(4326008)(966005)(14444005)(3846002)(305945005)(33656002)(68736007)(476003)(486006)(55236004)(66066001)(6306002)(5250100002)(6116002)(11346002)(76176011)(6436002)(229853002)(53936002)(316002)(107886003)(25786009)(6916009)(186003)(446003)(7736002)(2900100001)(8936002)(99286004)(7696005)(74316002)(93886005)(8676002)(6246003)(5660300001)(256004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3650; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-correlation-id: 40b6c489-598f-49a5-5aa8-08d5f13d7272 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600073)(711020)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3650; x-ms-traffictypediagnostic: CY4PR0701MB3650: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3650; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3650; x-forefront-prvs: 0743E8D0A6 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: +a64BhLFcNL9miDpovBfwURBZ7O3q/a1aGRs2s/U76N5lhUXQ/hUTf+R3FQhDIUS86Sj5ArIiIuLeTkmeR5Og3hnga/85TsZ5laIepYYE0HWnjUylWiu75VZNi6DwAw0XgTdX7lM+c2AhCZh+0A8NXP80txVgWUQqMOubVtheAvKYZ+3XP0UsyczDRVm5UxZJDbaubAgpU6XrkcykwbvRCtRjxn3hh1tBfmcThVBwSC6/th0BloFFxIY1UzHq7vmzKsTPp2HtUOvINygEDWpbeEfnZOtE40N7lHpjZ8qvDKanXxd8X1yAWnF18a5ppdMf4sJ0HiFLEaT9owp8I8RWQlufLreR/DwGkkcO/Artv0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40b6c489-598f-49a5-5aa8-08d5f13d7272 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2018 08:14:15.7668 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3650 Subject: Re: [dpdk-dev] [PATCH v4 4/5] compress/zlib: support burst enqueue/dequeue 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: Tue, 24 Jul 2018 08:14:18 -0000 >-----Original Message----- >From: De Lara Guarch, Pablo >Sent: 24 July 2018 13:24 >To: Verma, Shally >Cc: dev@dpdk.org; Athreya, Narayana Prasad ; Challa, Mahipal >; Sahu, Sunila ; Sahu, = Sunila ; Gupta, Ashish > >Subject: RE: [PATCH v4 4/5] compress/zlib: support burst enqueue/dequeue > >External Email > >> -----Original Message----- >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] >> Sent: Tuesday, July 24, 2018 8:45 AM >> To: De Lara Guarch, Pablo >> Cc: dev@dpdk.org; Athreya, Narayana Prasad >> ; Challa, Mahipal >> ; Sahu, Sunila ; Sahu= , >> Sunila ; Gupta, Ashish >> Subject: RE: [PATCH v4 4/5] compress/zlib: support burst enqueue/dequeue >> >> >> >> >-----Original Message----- >> >From: De Lara Guarch, Pablo >> >Sent: 24 July 2018 03:55 >> >To: Verma, Shally >> >Cc: dev@dpdk.org; Athreya, Narayana Prasad >> >; Challa, Mahipal >> >; Sahu, Sunila ; >> >Sahu, Sunila ; Gupta, Ashish >> > >> >Subject: RE: [PATCH v4 4/5] compress/zlib: support burst >> >enqueue/dequeue >> > >> >External Email >> > >> >> -----Original Message----- >> >> From: Shally Verma [mailto:shally.verma@caviumnetworks.com] >> >> Sent: Monday, July 23, 2018 3:51 PM >> >> To: De Lara Guarch, Pablo >> >> Cc: dev@dpdk.org; pathreya@caviumnetworks.com; >> >> mchalla@caviumnetworks.com; Sunila Sahu ; >> >> Sunila Sahu ; Ashish Gupta >> >> >> >> Subject: [PATCH v4 4/5] compress/zlib: support burst enqueue/dequeue >> >> >> >> From: Sunila Sahu >> >> >> >> Signed-off-by: Sunila Sahu >> >> Signed-off-by: Shally Verma >> >> Signed-off-by: Ashish Gupta >> >> --- >> >> drivers/compress/zlib/zlib_pmd.c | 255 >> >> ++++++++++++++++++++++++++++++++++++++- >> >> 1 file changed, 254 insertions(+), 1 deletion(-) >> >> >> >> diff --git a/drivers/compress/zlib/zlib_pmd.c >> >> b/drivers/compress/zlib/zlib_pmd.c >> >> index 47bc73d..dc1e230 100644 >> >> --- a/drivers/compress/zlib/zlib_pmd.c >> >> +++ b/drivers/compress/zlib/zlib_pmd.c >> >> @@ -7,7 +7,214 @@ >> >> >> >> #include "zlib_pmd_private.h" >> >> >> >> -/** Parse comp xform and set private xform/stream parameters */ >> >> +/** Compute next mbuf in the list, assign data buffer and length, >> >> + * returns 0 if mbuf is NULL >> >> + */ >> >> +#define COMPUTE_BUF(mbuf, data, len) \ >> >> + ((mbuf =3D mbuf->next) ? \ >> >> + (data =3D rte_pktmbuf_mtod(mbuf, uint8_t *)), \ >> >> + (len =3D rte_pktmbuf_data_len(mbuf)) : 0) >> >> + >> >> +static void >> >> +process_zlib_deflate(struct rte_comp_op *op, z_stream *strm) { >> > >> >... >> > >> >> + /* Update z_stream with the inputs provided by application */ >> >> + strm->next_in =3D rte_pktmbuf_mtod_offset(mbuf_src, uint8_t *, >> >> + op->src.offset); >> > >> >This is assuming that src buffer is a linear buffer or that offset won'= t be large >> enough to cross boundaries between segments. >> >If an SGL is passed and offset is bigger than the first segment, >> >next_in should point at a different segment, with the remaining part of >> >the offset in that segment (look at ISA-L SGL patch: >> http://patches.dpdk.org/patch/43283/). Same applies to avail_in, next_ou= t and >> avail_out. >> >> [Shally] as per my last knowledge, offset was expected to be belonging o= nly to >> the first segment in chained mbuf. Isn't that the case anymore? Did I mi= ss any >> update on its definition? >> We had added the logic earlier that you're suggesting but removed that l= ater, as >> I understood clarification about offset falling into any segment is stil= l pending. >> > >According to the comments: > > uint32_t offset; > /**< Starting point for compression or decompression, > * specified as number of bytes from start of packet in > * source buffer. > * This offset starts from the first segment > * of the buffer, in case the m_src is a chain of mbufs. > >It says that the offset starts from the first segment, but not that >it is only applicable for the first segment. >>From my point of view, an SGL should be seen like a contiguous (linear) bu= ffer, >so if the offset crosses multiple segments, it is still valid, as it is st= ill part of the buffer. Ya. not saying that offset cannot belong to different segments. But I was m= isinformed here and assumed we're limiting to first one. Will take care of it now. Thanks Shally > >Thanks, >Pablo > >> Thanks >> Shally