From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A49B5A0487 for ; Fri, 5 Jul 2019 16:39:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6E8EE1B9AF; Fri, 5 Jul 2019 16:39:10 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id E89C05689 for ; Fri, 5 Jul 2019 16:39:08 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x65EZGNt023807; Fri, 5 Jul 2019 07:39:07 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=pfpt0818; bh=Jo16qQDODDLOAwgSjgoFv9U9WrvVaDpNlEyjoGURRoQ=; b=RO+fXFrv+wjOG5I6zdthdhnl9J4mBbJyv6iKV9FoWPDmzlCuz/oX8JpcGwPgEVP0S+ki bEwyqHsZHUviNXwSYDEqsB1vkm4cHJT1m4BZrRa0KgJAOgMM9ns5JQc7kJl5IBcwUehu ni12tX/FDvbW20GJf/BBUSGyxfsWFnGbCtufIlGM+DhAz/ZlA2nj1nvFM+M/9t53mzbA CTE8VQbWGLGwJfgBH27/aZXSeBic5IjaKBIGjOSuB3bUZeEwrp4WPD2RYW7PZw9yMdZH uwqtnJnvULjMIOeWp14w1GEhkrAhsBYQBRCY2Myb/oMN5GU+SfbUVam1lT2+75EFRqGU BA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2thjyrc8df-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 05 Jul 2019 07:39:07 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 5 Jul 2019 07:39:06 -0700 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (104.47.41.51) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 5 Jul 2019 07:39:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jo16qQDODDLOAwgSjgoFv9U9WrvVaDpNlEyjoGURRoQ=; b=e/8s0/L8oVFHaBI4t0Slubab2aP1xJZgVCtkX83hiKxGvIvH+D7MUG4gTg026zCNqY8ad0T+wHSolqzFKENbiJowE+pqq9pJvLMC/RQelQpttvLwZ5DIB7BJcHuVp2N3Gch/KPqdcK5pxjHDZqdpLMpH+RONwNq/mNQVe4ljF38= Received: from MN2PR18MB2848.namprd18.prod.outlook.com (20.179.21.149) by MN2PR18MB2381.namprd18.prod.outlook.com (20.179.81.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18; Fri, 5 Jul 2019 14:39:03 +0000 Received: from MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::4447:9459:5386:2e18]) by MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::4447:9459:5386:2e18%7]) with mapi id 15.20.2052.019; Fri, 5 Jul 2019 14:39:03 +0000 From: Harman Kalra To: Olivier Matz CC: Thomas Monjalon , "reshma.pattan@intel.com" , "arybchenko@solarflare.com" , "dev@dpdk.org" , "Jerin Jacob Kollanukkaran" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH] app/pdump: enforcing pdump to use sw mempool Thread-Index: AQHU20OhvYnaD9t2l0mtylBq2EgxSqa7VMGAgAFlPYCAAA4wAA== Date: Fri, 5 Jul 2019 14:39:03 +0000 Message-ID: <20190705143847.GA182782@outlook.office365.com> References: <1552663632-18742-1-git-send-email-hkalra@marvell.com> <1649425.EjAGamAeX1@xps> <20190705134801.qirbqvafroci3oxv@platinum> In-Reply-To: <20190705134801.qirbqvafroci3oxv@platinum> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0112.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::28) To MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:3e::21) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ba57bc4f-5b91-4a8e-0051-08d70156868e x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR18MB2381; x-ms-traffictypediagnostic: MN2PR18MB2381: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 008960E8EC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(136003)(376002)(39850400004)(346002)(199004)(189003)(8936002)(966005)(66946007)(33656002)(5660300002)(81156014)(81166006)(6436002)(446003)(478600001)(73956011)(71200400001)(71190400001)(8676002)(486006)(64756008)(66446008)(14444005)(6916009)(6306002)(52116002)(11346002)(256004)(54906003)(66476007)(9686003)(6512007)(26005)(99286004)(76176011)(316002)(66556008)(476003)(4326008)(53936002)(7736002)(68736007)(107886003)(1076003)(25786009)(14454004)(6506007)(6246003)(3846002)(386003)(86362001)(6116002)(55236004)(6486002)(102836004)(229853002)(305945005)(186003)(66066001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2381; H:MN2PR18MB2848.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ESwEmeT5yDEZiW40az2TTbQj1FQ5R/VvUBVIRZ0ayyuTRgl84UtM6guZ0R9eBG+aKSYKibR1AkMxc6iINLSkLalcj8NUjRx7oIqH6x8dQx0Jn/9dAc4jn1VI5zmyMyeJYI+D8VjLvEbOv4ZLn0a48kCI0kc8Z+OWxNHyMxDZ7psvrntOs1Nozu+iduTHUmWK2Lp5KAYj/zwNB/puNqOVA3G/Wu38Nm202ZkjNvNpkwftfwj6lYfB/n19B/yPx53NPuc7qZW+ddNxdZF4H4h1Yu6mjOJU3f0gJuINmWEKdyydOoNqO/mxtHrvEJMAP7bljJE5LfiPASwUfkN0FZUZFqaunNU8qaOLu478r6IDlDuiT5oBHZTaHUI80sqKEZIaixOn4j8/VZGm+usLH8UBSZO9rQ5CRwqjozoWQ7duZDk= Content-Type: text/plain; charset="us-ascii" Content-ID: <8E8795B2C7C33F408E94778A60EB9538@namprd18.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ba57bc4f-5b91-4a8e-0051-08d70156868e X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2019 14:39:03.5960 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hkalra@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2381 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-05_05:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] app/pdump: enforcing pdump to use sw mempool 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jul 05, 2019 at 03:48:01PM +0200, Olivier Matz wrote: > External Email >=20 > ---------------------------------------------------------------------- > Hi, >=20 > On Thu, Jul 04, 2019 at 06:29:25PM +0200, Thomas Monjalon wrote: > > 15/03/2019 16:27, Harman Kalra: > > > Since pdump uses SW rings to manage packets hence > > > pdump should use SW ring mempool for managing its > > > own copy of packets. > >=20 > > I'm not sure to understand the reasoning. > > Reshma, Olivier, Andrew, any opinion? > >=20 > > Let's take a decision for this very old patch. >=20 > From what I understand, many mempools of packets are created, to > store the copy of dumped packets. I suppose that it may not be > possible to create as many mempools by using the "best" mbuf pool > (from rte_mbuf_best_mempool_ops()). >=20 > Using a "ring_mp_mc" as mempool ops should always be possible. > I think it would be safer to use "ring_mp_mc" instead of > CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS, because the latter could be > overriden on a specific platform. >=20 > Olivier Following are some reasons for this patch: 1. As we all know dpdk-pdump app creates a mempool for receiving packets (f= rom primary process) into the mbufs, which would get tx'ed into pcap device= and freed. Using hw mempool for creating mempool for dpdk-pdump mbufs was = generating segmentation fault because hw mempool vfio is setup by primary p= rocess and secondary will not have access to its bar regions. 2. Setting up a seperate hw mempool vfio device for secondary generates fol= lowing error: "cannot find TAILQ entry for PCI device!" http://git.dpdk.org/dpdk/tree/drivers/bus/pci/linux/pci_vfio.c#n823 which means secondary cannot setup a new device which is not set by primary= . 3. Since pdump creates mempool for its own local mbufs, we could not feel t= he requirement for hw mempool, as SW mempool in our opinion is capable enou= gh for working in all conditions.