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 EBF6DA0350; Tue, 23 Jun 2020 07:20:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 477201D545; Tue, 23 Jun 2020 07:20:34 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 10F0D1D416; Tue, 23 Jun 2020 07:20:31 +0200 (CEST) IronPort-SDR: 3oomuuzTZ4TP0LHLiObPWOcZ7IHiSN2rrRnVPirbj+RS7bbr/L2sdmAIZYVK/a3s1QdX9aLDBg lXe/TjjvcqbA== X-IronPort-AV: E=McAfee;i="6000,8403,9660"; a="205468930" X-IronPort-AV: E=Sophos;i="5.75,270,1589266800"; d="scan'208";a="205468930" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2020 22:20:31 -0700 IronPort-SDR: N1dRfwDKlHrgFwYIv+9q32Afege0YvL0QpwJBCikf01AKGlnCWGKaNt2Xtc5+k4U5aBuQd9ThQ U6KJoMj1wV2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,270,1589266800"; d="scan'208";a="353692744" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 22 Jun 2020 22:20:30 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 22:20:30 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 22 Jun 2020 22:20:27 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 22 Jun 2020 22:20:27 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 22:20:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IqzRVKSxGOz135vG4Gj3HUeHqNU02rdWICqvqhlhjnONqA1MCNSuseU3F+YRAYQrxcXahU4h5MxzjtQppIXRk3WUfAWk/b1oe9o7X0N4YHqdpsRQ9KmgjIfCXD47AQQ2/Z1//GWnsM8IFmW5+juTZKxGM+hq2DCzfNH6GUzVBfr4QvLON5V+E8EJQHEbsv9JBp0+AW/KTqJNQoeoZBdPqOAi3xFl3K84xNusyhQiKffHDKG01YA2K/2QO73BvFwh4O6/wtHbFLoDolWviAzsNXTSi5Og2NV1CPm5Q6o3rqdpeshigKRjESqSENL2Oh1tc5rWxL316M3xYD+yZJ0AFw== 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-SenderADCheck; bh=6TCVM2AqJ/hI3KIc+JCGnhVx4oNMw0/HgDJWgtA0RA4=; b=WiLO0Mi9gf+lYT8ysC2MLaCT2kW5FkLbCiQdsZBwxc3kGcyy3bdUuE/wu5z6tkkdiCoLE/2TaKoR/kY8qEo2BUHMz4OmWZxlW4pxeL9en+7Gqdhy9r7cuHnZNZOKL8Z3taArJYJPgWStCEkDS3iWaUt1S5ZVe6fkLcmeKLqSw+KIn7Kz5xlO2bO0Zdvz2GNWVmUIUDPtQMb9qNTKksSNCAiKz6BPM7PkTbub6SdL/ru0FT+85q9vMxQYVv6Eh7PGhjqJNtP3G4X9iauQVg3GYOH+opiD0RCZdjv28ASFKK8iY0L1Q0mvWerxI1X1wRQccW/Di3XFFjPiE0p1G9WlIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6TCVM2AqJ/hI3KIc+JCGnhVx4oNMw0/HgDJWgtA0RA4=; b=aB3tzXYH5S4CPYk3uCs8WkYuBaTyviD2XxK5HG9VKHv/J/S99DZ4cxanrWYI/apj0FJRMQUUsAXm5YdCUnDadU1woEDMZdSX+0X/tmTjkbRMcnkVg/jJYKBdpuxawyy0qqxSDsV9QCSpvcpz3sTGbMl3Jbu9sHsYosOKRPjowak= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4517.namprd11.prod.outlook.com (2603:10b6:208:24e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Tue, 23 Jun 2020 05:20:26 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::7cde:8326:5010:c47e]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::7cde:8326:5010:c47e%7]) with mapi id 15.20.3109.027; Tue, 23 Jun 2020 05:20:26 +0000 From: "Xia, Chenbo" To: Matan Azrad , Maxime Coquelin CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-stable] [PATCH] vhost: fix features definition location Thread-Index: AQHWRaPhKXyduu2OWUq1Gmh6LmfqHajlrrDg Date: Tue, 23 Jun 2020 05:20:25 +0000 Message-ID: References: <1591113208-79169-2-git-send-email-matan@mellanox.com> <1592507300-442031-1-git-send-email-matan@mellanox.com> In-Reply-To: <1592507300-442031-1-git-send-email-matan@mellanox.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f6fc14ae-41de-493a-5755-08d817352304 x-ms-traffictypediagnostic: MN2PR11MB4517: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-forefront-prvs: 04433051BF x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BQjUG+8/87InqidY/nZo8538k1nc8FpCC8r76NUEGvc1v11c4O38nheqvFB1Xh0ru5NIYt40AdTF2L/pLf/3l7YTz3QXBltUNc2NR9sIDsoSMNikCsgxMiRY8ij6fq+IeKAWC06Nna4kCXQrl9Cd3w0qeAbpKpfPNB4G4S4udrXqX5yC5ThyFLMfyzXKJgYg2+gRvzpkQx5TlI0SwwEOd1r/tNr4ngd4T8gewbfBfkY5Hbrz6Rii6Uu37+2rG24dnRUnYry5Itl5SZa42Ny8TibuaZ6iMFXtStljbcUiWI9ET3nlYIdzwgQpT6dUQKI8ZdQt4yOTcbDexk0P/oMvwA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(346002)(366004)(396003)(136003)(376002)(9686003)(52536014)(66556008)(76116006)(54906003)(66946007)(110136005)(66476007)(316002)(66446008)(64756008)(8676002)(2906002)(478600001)(55016002)(4326008)(33656002)(71200400001)(8936002)(186003)(26005)(83380400001)(86362001)(6506007)(5660300002)(53546011)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: VFFDe/VapiW+JKm3Ma9ywmmC6TzOWRE3Wc4xp+pYQvK9puy8+3IU6td0mCJc6L/fGt+I/NV6fVvartgLFQtwge/h0lPovCM2bSkWUmC4enYPo5dnnSLZa7doPtqRgJd2NT5OFX27W6X3V3McwhM6A3ucWC9ljkgjRREeogseyYJ1g9z/b776XI5f4B5Jk4baUZBbPKlZy0AfZVh759zdpmO5PlEmcWRJP2aVbOvw3jieYG1zoRS8+rMC7uBf6NnDLjUoTE4rRC1k9KlOO8QnQ4y95QyCZNzuUY/3cWsV5F5CubL8npOJo15iTFYvUwruSuvRe5Q8Vgl1JSZgCY9veIg49aQMU9UTM/uHb8kEA6kueKh4KacVd8iJfsCT37/0adV/Gkz11IZZD4mvmSy8qrYLDd2Upln6v1LjoWC6XNlJzqnKaCtCD/w62OSR8hpnCKxi6bu/2/5ydp5T8gezFPvmO3rJp4wvUfPCRA9ARNyqAk/r1JOmoNg9Kbt64XQN x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: f6fc14ae-41de-493a-5755-08d817352304 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2020 05:20:25.9598 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yeNFhoOz3jJBbUOjBDOfaZzdCbeE/EdWxtuTgP4amLZHudiLJrqnM+PWOM9zJiz+Azq4RFHlM0rgTTyIaDUNVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4517 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] vhost: fix features definition location 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" > -----Original Message----- > From: stable On Behalf Of Matan Azrad > Sent: Friday, June 19, 2020 3:08 AM > To: Maxime Coquelin > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [dpdk-stable] [PATCH] vhost: fix features definition location >=20 > The vhost library provide an infrastructure in order to help the DPDK use= rs to > manage vhost devices. >=20 > One of the infrastructure parts is the features enablement APIs. >=20 > Some features bits may be defined only in the internal file vhost.h in ca= se the > kernel version doesn't include them. >=20 > Hence, user running on old kernel may not be able to manage thus features= . >=20 > Move all the feature bits definitions to the API file rte_vhost.h. >=20 > Fixes: db69be54b6ff ("vhost: hide internal code") > Fixes: 8d286dbeb8d7 ("vhost: fix multiple queue not enabled for old kerne= ls") > Fixes: 3d3c6590b58c ("vhost: enable virtio MTU feature") > Fixes: 704098fc478c ("vhost: fix build with old kernels") > Cc: stable@dpdk.org >=20 > Signed-off-by: Matan Azrad > --- > lib/librte_vhost/rte_vhost.h | 17 +++++++++++++++++ > lib/librte_vhost/vhost.h | 17 ----------------- > 2 files changed, 17 insertions(+), 17 deletions(-) >=20 > diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h = index > d43669f..329ed8a 100644 > --- a/lib/librte_vhost/rte_vhost.h > +++ b/lib/librte_vhost/rte_vhost.h > @@ -36,6 +36,23 @@ > /* support only linear buffers (no chained mbufs) */ > #define RTE_VHOST_USER_LINEARBUF_SUPPORT (1ULL << 6) >=20 > +/* Features. */ > +#ifndef VIRTIO_NET_F_GUEST_ANNOUNCE > + #define VIRTIO_NET_F_GUEST_ANNOUNCE 21 #endif > + > +#ifndef VIRTIO_NET_F_MQ > + #define VIRTIO_NET_F_MQ 22 > +#endif > + > +#ifndef VIRTIO_NET_F_MTU > + #define VIRTIO_NET_F_MTU 3 > +#endif > + > +#ifndef VIRTIO_F_ANY_LAYOUT > + #define VIRTIO_F_ANY_LAYOUT 27 > +#endif > + > /** Protocol features. */ > #ifndef VHOST_USER_PROTOCOL_F_MQ > #define VHOST_USER_PROTOCOL_F_MQ 0 > diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index > df98d15..17f1e9a 100644 > --- a/lib/librte_vhost/vhost.h > +++ b/lib/librte_vhost/vhost.h > @@ -202,26 +202,9 @@ struct vhost_virtqueue { > TAILQ_HEAD(, vhost_iotlb_entry) iotlb_pending_list; } > __rte_cache_aligned; >=20 > -/* Old kernels have no such macros defined */ -#ifndef > VIRTIO_NET_F_GUEST_ANNOUNCE > - #define VIRTIO_NET_F_GUEST_ANNOUNCE 21 -#endif > - > -#ifndef VIRTIO_NET_F_MQ > - #define VIRTIO_NET_F_MQ 22 > -#endif > - > #define VHOST_MAX_VRING 0x100 > #define VHOST_MAX_QUEUE_PAIRS 0x80 >=20 > -#ifndef VIRTIO_NET_F_MTU > - #define VIRTIO_NET_F_MTU 3 > -#endif > - > -#ifndef VIRTIO_F_ANY_LAYOUT > - #define VIRTIO_F_ANY_LAYOUT 27 > -#endif > - > /* Declare IOMMU related bits for older kernels */ #ifndef > VIRTIO_F_IOMMU_PLATFORM >=20 > -- > 1.8.3.1 Reviewed-by: Chenbo Xia