From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EX13-EDG-OU-001.vmware.com (ex13-edg-ou-001.vmware.com [208.91.0.189]) by dpdk.org (Postfix) with ESMTP id CB6292C01 for ; Tue, 19 Jul 2016 23:58:56 +0200 (CEST) Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Tue, 19 Jul 2016 14:58:22 -0700 Received: from EX13-CAS-001.vmware.com (ex13-cas-001.vmware.com [10.113.191.51]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 0866D402ED; Tue, 19 Jul 2016 14:58:55 -0700 (PDT) Received: from EX13-MBX-039.vmware.com (10.113.191.190) by EX13-MBX-015.vmware.com (10.113.191.35) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Tue, 19 Jul 2016 14:58:54 -0700 Received: from EX13-CAS-005.vmware.com (10.113.191.55) by EX13-MBX-039.vmware.com (10.113.191.190) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Tue, 19 Jul 2016 14:58:54 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (10.113.170.11) by EX13-CAS-005.vmware.com (10.113.191.55) with Microsoft SMTP Server (TLS) id 15.0.1156.6 via Frontend Transport; Tue, 19 Jul 2016 14:58:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=G3Iv0g+jw7QcafCP5K8ytJTRCEocGMMtC9uC3P/aq70=; b=gyMTE6DPWY4jEYItiju6HiW7cWxUz8SZUSCGS2n3nSWBE5ZWaxyT26KAdkhirgkKL/9X8lnw660bkB28cfLlRMeJKraH12KgJS+aYNo6uwcmU5HUrEIQLjdQMyiqf6rPYiBDgLEdxJiaXT2gZQkFwXaUS6YyeEAULH8nn7Ekm1E= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yongwang@vmware.com; Received: from htb-2s-eng-dhcp206.eng.vmware.com (208.91.1.34) by BY2PR05MB2359.namprd05.prod.outlook.com (10.166.113.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.5; Tue, 19 Jul 2016 21:58:52 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Yong Wang In-Reply-To: <8032858.THXMY6Ofjq@xps13> Date: Tue, 19 Jul 2016 14:58:42 -0700 CC: , "Liang, Cunming" , Content-Transfer-Encoding: quoted-printable Message-ID: References: <1468542971-48198-1-git-send-email-yongwang@vmware.com> <578C74D9.1030907@intel.com> <8032858.THXMY6Ofjq@xps13> To: Thomas Monjalon X-Mailer: Apple Mail (2.3124) X-Originating-IP: [208.91.1.34] X-ClientProxiedBy: CO2PR11CA0030.namprd11.prod.outlook.com (10.141.242.168) To BY2PR05MB2359.namprd05.prod.outlook.com (10.166.113.11) X-MS-Office365-Filtering-Correlation-Id: 41c4cfff-8444-4e16-97a6-08d3b01fdf8c X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB2359; 2:nOEDAilaI9pEyqKv9x61Gwvs+Jp5No2aocximQC4hfyBGHV33Co7dLQJ/TFI8M5TgR3QbKAtdKXamsQy5U9tMyYloz+Cq8ARXEsZcbsMKWlnPKRSjwvwRBtQcR9fb5+fEFhynIDloRzpv1/DdKeuTeLm0z3KB3XGzPNpZVVFfkgZB3qucz9QXzklvhtBh3XQ; 3:wrGifzIVBQCnj28rPdbl4WaeLvu7MYwObYcrgY3QTZiflu8gtJ5YGO678VvyyxKtczBDVK0v2cBN6HF7tae3fIZrti59/ECbgF/AmsHtJkmzwl2ymjM9rbCGqr7P+i/Y; 25:tCpBzTqlpOhQf5XwTPlwNxUCVmxjmNr727swz2+/9E1F4li2aU7FZ7MtBEdM2lPQVX0lcpf5AXgv+ltlz2vOBcEFR9tRzTp8mFNBQ8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qsombxeW5lL/JomSO7akQ6YHWFwsr3qvNx8FwRsucUH21sxVgOJDnE1c14m3Q+cn+vpOgQEpa7vDnvSVATTH3JzV/DlyWVQH/i6NMrqbd046sb0E35QnE82xAhx6/S1kAl3ai6jQh1rcVV3oet5IwLarD++TJiVg513DOcI6ZOZ0CHdG8sdyBeKg9JYFBaciLjFflnMgVA1TVub178oY+YUaGpoT468LZ8Nv3HpnSEHCq2QouwpiwEIXtmULLFIdYyqXec6GPR7UzAtKw49wP9a5dVBcTrBKdd3VT5I0Ecuw/8g54OjyZ54hl1esB6jSDpbGaU8MQpFroOe26c02E6c1aW X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150)(10436049006162); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BY2PR05MB2359; BCL:0; PCL:0; RULEID:; SRVR:BY2PR05MB2359; X-Forefront-PRVS: 000800954F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(24454002)(377424004)(199003)(377454003)(189002)(66066001)(57306001)(92566002)(97736004)(47776003)(189998001)(81166006)(81156014)(8746002)(7736002)(105586002)(110136002)(305945005)(68736007)(3846002)(586003)(8676002)(86362001)(2906002)(6116002)(575784001)(33656002)(50466002)(82746002)(19580395003)(2950100001)(101416001)(42186005)(23676002)(77096005)(36756003)(50226002)(4326007)(7846002)(15975445007)(19580405001)(50986999)(76176999)(106356001)(83716003)(7099028)(104396002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR05MB2359; H:htb-2s-eng-dhcp206.eng.vmware.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (EX13-EDG-OU-001.vmware.com: yongwang@vmware.com does not designate permitted sender hosts) Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQU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ycVVrrYAwqrS8GThO00U7OFVBD+2ajSX48VoeMVi+qoMAucjs+KRMCCMFHmXh6iVQ3uWE6gYZ4gki6cSLeKr6yMz0IDST054sT7UCWy+XvXUXrVJYAkaRLxs9MPXcb8BxtpKjihW526gO04tjBqq8BKdUexYtzevYhBg7fwUCOasT/n8B+DXa24NnJaO47omffxGcaw+VGFp6xZ0cWc+QiaLn4KtoY7cWSjhz2AGzEWqXUjNnq0=; 5:wFdfW52rJmmk4Cx+cBbFNUjOmX0EKKyczuIdvtSMA03Lufa+kfKZuDuE/FC0HdYOlh36709Y05bKruNOSZJ6hFLhlcv1siP3G1pvEDkommo+74L89C/woQa0s5qz9FtHpexrdvpN9/YXqTnChv3KCQ==; 24:sZtp2mxIjQekCVPUBzCZwmVMzkPBEgIMZHRNeppONrynL8drz6SYxgkSoJ4HoIXeq0t/BP0qET5JbIWE7MAA9mZq/vChTCMQx8pWsoil69g=; 7:VQ93V6VjqhScqb79KqMdhNkonHikrC+m+hRDpm0In9OgmjK7LHkCSgu1VzJCJpafNFnGx2wa/33hFBD9F1BaF2Kqj2LaFHjYB/n3/OpHutrOlOYzSijaEaNo176tdrE5zRutwNU7l8RpqfeyidYA4qlV6hfMCVIt8HcnqgoDfT58BwQ4aHA0eR+y4Cmq6mvwrYEfTfzEdO+UUPI22SsUHeamz6c7UnWtdeIND8ye2WwK7s3ChdHOOi8QSYf7evND SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR05MB2359; 20:FdUMLsUf9sU0FtN4g+U4Tjw9RPZv2C1LJTN7NDFa66YVpsGHTGujzSTwoKZPJ8Qn36x3J4FedKBg0txmlmxGXRx7h4pZBS8n0uF+86wgucWltgjXOBjsQsaPO1Cx3WAV+JVFOuyuChOBu7VsrOIqNGsP++hNzzJKvJUrQA9a8gg= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2016 21:58:52.6026 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR05MB2359 Subject: Re: [dpdk-dev] [PATCH] eal: fix rte_intr_dp_is_en() check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2016 21:58:57 -0000 > On Jul 18, 2016, at 2:21 AM, Thomas Monjalon = wrote: >=20 > Hi Yong, >=20 > I think the interrupt management should be simpler. > If you want to invest some time to rework this API, you > are very welcome. >=20 >=20 > 2016-07-18 14:19, Liang, Cunming: >> Hi Yong, >>=20 >> rte_intr_dp_is_en() returns true when rte_intr_efd_enable() (the way = to=20 >> enable data-path interrupt) sets a number of event fds. >> In this case, "intr_conf.rxq=3D1" configuration causes "nb_efd=3D1". = The=20 >> value comes from RTE_MIN($nb_efd, 1) from data-path, but not from = link=20 >> event. >> Per link event, you shouldn't use rte_intr_dp_is_en() as the = indication. >> As igb_uio only has a single vector, when the conflict(both intr_rxq = and=20 >> intr_lsc turn on) happens, the intr_rxq has high priority than = intr_lsc=20 >> as default PMD behavior. >> Reference as PG 3.1.9 note in=20 >> = https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__dpdk.org_doc_guides_= prog-5Fguide_env-5Fabstraction-5Flayer.html&d=3DCwICAg&c=3DSqcl0Ez6M0X8aeM= 67LKIiDJAXVeAw-YihVMNtXt-uEs&r=3D44mSO5N5yEs4CeCdtQE0xt0F7J0p67_mApYVAzyYm= s0&m=3DxFO005GdZMA9a6IC2kvhKYaXW7Rhl3dlcom5HfOSy2g&s=3DyERFYJTe6TBWFCltmR3= xikmxkLKutbot5BfFxK30tZ0&e=3D=20 >>=20 >> Regards, >> Cunning Thanks Cunming and Thomas for the feedback. I agree with Thomas that = the rx queue interrupt APIs could be simplified and it=E2=80=99s not = clear to me if the API user needs to be concerned about = rte_intr_cap_multiple(), rte_intr_allow_others(), rte_intr_dp_is_en(), = etc. if all he needs is to enable intr with certain # of vectors and map = the vectors to either efds or callbacks. I feel it=E2=80=99s simpler = just returning the number of vectors the system can support if it cannot = satisfy nb_efd vectors and let the application decide how should this be = handled. The link event and rxq interrupt init/uninit path also looks = quite different and some unification will be helpful. The API documentation can also use some more clarification. For = example, without reading the program guide, it=E2=80=99s easy to miss = the fact that when the device is bound to UIO, the implementation will = try to enable rxq instead of lsc when both intr_conf.lsc and = intr_conf.rxq is set to 1. I can imagine there are cases where an = application would prefer to enable link event instead of rxq interrupt = in such cases and currently there is no easy way to achieve that. Or is = there any particular reason such a preference is chosen? >>=20 >> On 7/15/2016 8:36 AM, Yong Wang wrote: >>> When binding a device to igb_uio with intr_conf.rxq set to 1, nb_efd >>> is 1 (for link event) but rte_intr_dp_is_en() will still return = true. >>> rte_intr_dp_is_en() should also consider intr_handle type in = addition >>> to nb_efd. >>>=20 >>> Signed-off-by: Yong Wang >=20