From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 681F3A0032; Fri, 29 Oct 2021 13:32:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2EE2C4111F; Fri, 29 Oct 2021 13:32:50 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2066.outbound.protection.outlook.com [40.107.236.66]) by mails.dpdk.org (Postfix) with ESMTP id B74C9410E1 for ; Fri, 29 Oct 2021 13:32:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c9tyk2M5skjHJ7NnKY7qB8EnjqhmMegZnafYbCR0xdJ32OlX0wgLVjlVJBFRBOuixVGwU9MjsB2MyWr1g9qA9MinV3BxFSBj3MflStmEZInrUykErulFuqmXdpqd0L6ADLDDfHBTK30Di4yhBdsH8qZPp8Z7JKDDzFAbTys6LnY/AW2C+0HUoGJ4udJvT2sCsU0+nKcfi3Fz5qhU//iUEZpDrBsXk0Cy0tXADt6sT78JWM+1+JprF0GbGJDtIj9/iED3WmHNO2T+5a9DwWCdPiIfmrlCGM3XRdh7hXxIORbcCaJIRV0MGN/9Rw7Dgwf/AKkZPSNE5RxM2JY6VT4j9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=J3zrc8M+1mzw62Z0bfD8nJADd+oO7CBBmj3z+d3KRFQ=; b=iGQ3vOLZCjgbLCW9hE43CScaOjLR7IB1hEYI5pa/EPMhBHdTQGE0XPoLZXctEZCUiAO+zDHec7E5L3gXbwvlUhur15VuZ5Eb0iH5V9eLlKWVOEGXE3m8ehOYbLmoyCPjzK6xXtzXcsLnk/eXc0y0EHyZWPF5UCeChRNQRD5IYn3qxdkudDc+rvCD2j/RLkfAT3DQwKKSxPqb7iLN/PGXH+3Xc6qP7cG9O+Qvqt1i6zXbGKSujUOXQr6BPCNpzAptGyopl5YM3S0hJyVhtgjSohAEix3KyhOb4dCFAPYJzUcoQYP7lGu3x1q2P/hEob/kVTJjk/8Lm+yexMt2cIm16g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=xilinx.com; dmarc=pass action=none header.from=xilinx.com; dkim=pass header.d=xilinx.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J3zrc8M+1mzw62Z0bfD8nJADd+oO7CBBmj3z+d3KRFQ=; b=hE0szqB4zxBYVP3gX9DMXW4E0sIfc0eAUkFeqzeYIXO+JM1U4GT7dihyeBnwvEN6HJOcLKXrJ/+jJ1R3FFC64Xjt7S+MDQOLvhgi/B7NstPj8iYNYu+/ZQW0R5s7Unc6SbphM7G+Qki7nIJvJpQyCXHrKioly5ZKwC5HfNtRDzc= Received: from SJ0PR02MB7327.namprd02.prod.outlook.com (2603:10b6:a03:29c::20) by BY5PR02MB6337.namprd02.prod.outlook.com (2603:10b6:a03:1b3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Fri, 29 Oct 2021 11:32:47 +0000 Received: from SJ0PR02MB7327.namprd02.prod.outlook.com ([fe80::b5f0:5042:370c:f06d]) by SJ0PR02MB7327.namprd02.prod.outlook.com ([fe80::b5f0:5042:370c:f06d%3]) with mapi id 15.20.4649.015; Fri, 29 Oct 2021 11:32:47 +0000 From: Vijay Kumar Srivastava To: Stephen Hemminger CC: "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "chenbo.xia@intel.com" , "andrew.rybchenko@oktetlabs.ru" Thread-Topic: [dpdk-dev] [PATCH 01/10] vdpa/sfc: introduce Xilinx vDPA driver Thread-Index: AQHXcoZjeGgFiDVh+EWp3FRKuaQEYqtxzM0AgHioakA= Date: Fri, 29 Oct 2021 11:32:46 +0000 Message-ID: References: <20210706164418.32615-1-vsrivast@xilinx.com> <20210706164418.32615-2-vsrivast@xilinx.com> <20210813083604.0153a56a@hermes.local> In-Reply-To: <20210813083604.0153a56a@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=xilinx.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a4fddfd0-1cd2-4e58-304a-08d99acfd4f4 x-ms-traffictypediagnostic: BY5PR02MB6337: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 4Ee908RM6B4l9a75aSjfCsvLvnzp4a/W4LQNOn1Sv2pK/XE4w40OciwKh/jol5aubfwlLf7Zsja9DfaPDddpaHEy+YMljo3HeasYtOON9j/pDfsxq8B+OhATEVxDnel+NVV8XzQIhbhyV3RcmgdBhWYfxwaO+cFhXdMR9W2xhW0k9cHzaevDh70V3ylUOaKkdofUEUj0CIj5Q9K/0KzWwjKZKwjC0u+pAPZ3AmSqpYj5YASaPZyrxzEbqSFX+5ZUI1cFFxDVkcomEYdA6IgZxR7D4dTZpS8C5Wt6WwS/v789+UxiS7GU4yK2FLxhfFMmWF5WSoy0gU3mmKdyLxeGZvWmNbk1qM0dU9GPwpm72UIpJkxtZzzu0GzIo73Q8l1mFDHIuu3GwGfE4XBFkAuDebLglGWki81dfjaktpFhi2U5RMvYWgua5FyxeNgz/Bg0bch+ZKf9a6xRm+o2J5oyBByFnjcDXcAClQxZThsE+lKam+ITIbofFl9Q7JnW2oQnC2hypsiNiA0yxn/je4ROJNWsNGD9cIsJ6daQi++mvQyffJQ+tXZlymO316OnxIZbhUDa4hiHAG9o0UpplLnLSxP7vIzlk/hCr2iy8IhM2CDAHNPfC3enrxcve1Hj5kIkp8hhAKUDPygKE98y51fVAdlzZHHdmF2qk2AV5afPNTjKVYN2cLa1GKaatJIdEK1a01PdWLnGkO5aHZ0+7AqT7Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB7327.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(38100700002)(2906002)(66476007)(64756008)(66446008)(38070700005)(66556008)(4326008)(66946007)(122000001)(9686003)(508600001)(71200400001)(55016002)(6506007)(52536014)(26005)(7696005)(186003)(76116006)(83380400001)(8936002)(5660300002)(86362001)(316002)(54906003)(6916009)(8676002)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?CdHZ43lySgkMl546bVaWuvoup+nhFD7r9ZbpmFkZEkXSvqB0CBnAgcMciYY0?= =?us-ascii?Q?l8UsvP9Ih+TvQ5wJyld4OsMDNvMb4DR0RDI61PEC3VO7ANBCWUbNUQdHAi6w?= =?us-ascii?Q?kNE1RlhylDNFtgIt4iLIlV1QS9YPi5ra0393xgcNKWsVVxcVpNiK8cT4S6qp?= =?us-ascii?Q?aQeBLUC33opJNX0HSCX61rGcFiPC+BTZ/HjW8VO9PXD8mvnZX3lKMkfe9nUR?= =?us-ascii?Q?pwMLR6l5mGEqcApdfCVTXI3Qb54A+n2PziJi6AD+F88RVBMVs1qbapIYn090?= =?us-ascii?Q?ZIJawmqH4C3uVnYiJXr0vAHLP/hE8JVphrTo90D8y+OCNgmEz/aVrnbjEUxl?= =?us-ascii?Q?IIg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rj?= =?us-ascii?Q?lEGkTlReD09sMuXi14QsuVXuCNvdVZzOWHbHIy/4lek2uiFFNVGMnitL1AZ0?= =?us-ascii?Q?XgTcvfY2+2CKOHnUeYhXzuKKhx3KL2j+g94hL42apAPzvp3X0D5qPAbe1Ois?= =?us-ascii?Q?Y3N+ykr6P8jnV6v/BieDLeZD4V+8hNMSk4zhwMi3Ol05MI1H+5qowckXFDkZ?= =?us-ascii?Q?KXSW/0o8+pw19w2b6amwRnkRs5M4A9fM0Fhd0hHgA4wznSRIX1LFLTT8v9Eh?= =?us-ascii?Q?i7IYmUUeGVlmxgIIDSoQuhvIO9L07f5J/un/VccOHJzNI1issjbnmhMX9PLR?= =?us-ascii?Q?3Wk5wo0q+EDJW1yeAHZuJUW20hxmEzoo1QWDu97T8gYLIvHC/KQKZuxSL9LK?= =?us-ascii?Q?RJRzRqtgvlwIEAeqPzyJPg8=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB7327.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4fddfd0-1cd2-4e58-304a-08d99acfd4f4 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2021 11:32:47.0022 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ax6QCa5T/OGfBpo5Kia/oUOHWBgDzh6Lc2BoenZwL6dpmrM3daurDFG9iStMNFmMrW0ckMUv6B8V6VtoiBxjfQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6337 Subject: Re: [dpdk-dev] [PATCH 01/10] vdpa/sfc: introduce Xilinx vDPA driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Hi Stephen, >-----Original Message----- >From: Stephen Hemminger >Sent: Friday, August 13, 2021 9:06 PM >To: Vijay Kumar Srivastava >Cc: dev@dpdk.org; maxime.coquelin@redhat.com; chenbo.xia@intel.com; >andrew.rybchenko@oktetlabs.ru; Vijay Kumar Srivastava >Subject: Re: [dpdk-dev] [PATCH 01/10] vdpa/sfc: introduce Xilinx vDPA driv= er > >On Tue, 6 Jul 2021 22:14:09 +0530 >Vijay Srivastava wrote: > >> +uint32_t >> +sfc_vdpa_register_logtype(const struct rte_pci_addr *pci_addr, >> + const char *lt_prefix_str, uint32_t ll_default) { >> + size_t lt_prefix_str_size =3D strlen(lt_prefix_str); >> + size_t lt_str_size_max; >> + char *lt_str =3D NULL; >> + int ret; >> + >> + if (SIZE_MAX - PCI_PRI_STR_SIZE - 1 > lt_prefix_str_size) { >> + ++lt_prefix_str_size; /* Reserve space for prefix separator */ >> + lt_str_size_max =3D lt_prefix_str_size + PCI_PRI_STR_SIZE + 1; >> + } else { >> + return RTE_LOGTYPE_PMD; >> + } >> + >> + lt_str =3D rte_zmalloc("logtype_str", lt_str_size_max, 0); >> + if (lt_str =3D=3D NULL) >> + return RTE_LOGTYPE_PMD; >> + >> + strncpy(lt_str, lt_prefix_str, lt_prefix_str_size); >> + lt_str[lt_prefix_str_size - 1] =3D '.'; >> + rte_pci_device_name(pci_addr, lt_str + lt_prefix_str_size, >> + lt_str_size_max - lt_prefix_str_size); >> + lt_str[lt_str_size_max - 1] =3D '\0'; >> + >> + ret =3D rte_log_register_type_and_pick_level(lt_str, ll_default); >> + rte_free(lt_str); >> + >> + return (ret < 0) ? RTE_LOGTYPE_PMD : ret; } > >This seems like overkill doing per-device log level. Other drivers aren't = doing >this. We use it for the debugging. This feature is useful for us so it's good to = have it.