From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0062.outbound.protection.outlook.com [104.47.37.62]) by dpdk.org (Postfix) with ESMTP id D3DB8F72 for ; Tue, 24 Jul 2018 10:19:56 +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=tA2th+xgxU8DIbptHvExOaXjRnfj23udSKd4xzi1GeA=; b=WhzJKtjeQdPOM0O9s0BY4rNfQ8kFFGNRNMtqN1YSvQYehavyoJ4Bd8kyMA3ZxBIlJaf2SmsHxkpodnMsoxvR+BF/8wia/tg2SskAzYfRzqPwc+WFHh/h/nj8CxmjQaW1dVMbmTy/TLIGafwDR/kieOeGqUlMuqUTQJ1fHncYgQM= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) 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:19:54 +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:19:53 +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+46AgAAFvICAAAbqoA== Date: Tue, 24 Jul 2018 08:19:53 +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; CY4PR0701MB3634; 6:3Ml3IFK5FwpreynYBEwZgsILtxGC/tfTfXRrkW47UvgOnYJq2oYqAJ4JVOiIBqq4D9A4KCtTO9kC9KP3hyJ/l+g4YBe0d8zJwGq1wVBUq2NjSHUM/kpFIg42ylq3SJD2HLItdNHJEVIZvGSOGhgEXQIZRC8FHQfLTvsLgrJwbqd9n+yN15DWP35hMAfTsBeBxi+kqIjBJG02WdNXJPyfTDMDlMUZjHhM+ymuzpphKPT5SjCwqAZNMqlyY0UA4UNOUP+eG43NQ1XPYitxJpN/M6+XLw+wGsjiISFla4r1CpKGFJ6Pk5OrFRhDvupUfjIym7dL/9EZ5czpl30LJ8MB/OePqnRhX3lpUt2SuTMHbzfzUocoeuHsmjIn6uw6XjjskAPt7W4OJeTmp9Z38QLFTSbZVOPOvs97xD6p4wo1oMcDVX2Hb0pex4p0o+FbYZFjr/c4H4yS/R+2SfZdG8rX+g==; 5:70zVIDsz9I6WOyUFdYNQZMdz6M4t0Iv4FUELufa1FseLsCpHfu8FR2b6nCYtUVz/EKtUrxh3+rQgBra3unqPOimueHxru9f1ShmviSdQESG+9ub6K7s9rDNFNX1qV/JhwEUVP8AcDzBfoOU6qkaTCxbfOhIK9cY0sOSdgj8LUmQ=; 7:VeZHtMySdQLe7qihk+W7a+5XUeVDHTFJWaaAq7wUZay5+2T28rais3J+2V9c2wdeDwracMHJImeEahUxTcvKVJWwQGL7QEK7/VodDi2uEzyPaoWIRCndmQyjf4D5USWbLuq8MxsfPY3NAHrb20mqpOMo7HnJtf6vEqDBLmTtHuTmv/iWTs7wdG1Pe+g2AQfCff60M4YIHT766xsuZ1N90Y5ZujNHXtKmpnSX7Cpx7C6DXhjpHDAILeNSO17Jn7td x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(366004)(39860400002)(136003)(376002)(396003)(346002)(189003)(199004)(13464003)(99286004)(9686003)(6436002)(55016002)(6306002)(229853002)(316002)(6116002)(102836004)(3846002)(25786009)(305945005)(7736002)(55236004)(26005)(4326008)(53936002)(107886003)(6246003)(54906003)(74316002)(186003)(478600001)(72206003)(966005)(2900100001)(97736004)(33656002)(93886005)(86362001)(14454004)(5250100002)(66066001)(106356001)(8676002)(81156014)(81166006)(53546011)(5660300001)(68736007)(476003)(11346002)(446003)(486006)(256004)(14444005)(105586002)(7696005)(6916009)(8936002)(6506007)(2906002)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3634; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-office365-filtering-correlation-id: 80a432ad-fd79-436b-0322-08d5f13e3bf1 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3634; x-ms-traffictypediagnostic: CY4PR0701MB3634: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(788757137089)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3634; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3634; x-forefront-prvs: 0743E8D0A6 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: egvKeQ7tdlvLg2EwEh4SPlu8JaegbjYfHY4kb3qE3F/rlXbgdEitZXyvMdqI1CUohYm01eg9dU0ggGM81m7/5kcPcqIlzFjkBrO43QY7WDtkWUQ1ke/5Q7obUQP/jvvJPRO/syZt2ZWHcHMf+cR9p/AkGNnx0fwAgRlFnYXbc/IGkQBMq3TFEzAJznBrlDOfK0E2ZS5Si59HC9SCJzdmwhCz2WUMpzjZwAKaoNa7rOLPBAKFHAXOGMGhvL6cZel7fIilLfvdVlNjVLJYBYccVfiQer9P//RTGrWsG+5vurtHZwDghgt4KFxA9KdxgAVFmZq2S9A6chqS8muuAbFEEaeqqaFimtGv58F0EcUBhJU= 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: 80a432ad-fd79-436b-0322-08d5f13e3bf1 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2018 08:19:53.8099 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3634 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:19:57 -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. > Also believe doc need an update, it's kind of misleading "start from first = segment", should replace by "in case of chained mbuf, it can fall into any = segments". Thanks Shally >Thanks, >Pablo > >> Thanks >> Shally