From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yong Wang Subject: Re: [PATCH] eal: fix rte_intr_dp_is_en() check Date: Tue, 19 Jul 2016 14:58:42 -0700 Message-ID: References: <1468542971-48198-1-git-send-email-yongwang@vmware.com> <578C74D9.1030907@intel.com> <8032858.THXMY6Ofjq@xps13> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: , "Liang, Cunming" , To: Thomas Monjalon 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) In-Reply-To: <8032858.THXMY6Ofjq@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > 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