[{"id":12585,"web_url":"https://patchwork.libcamera.org/comment/12585/","msgid":"<20200919114905.GR1850958@oden.dyn.berto.se>","date":"2020-09-19T11:49:05","subject":"Re: [libcamera-devel] [PATCH 15/23] libcamera: IPAManager: Fetch\n\tIPAProxy corresponding to pipeline","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Paul,\n\nOn 2020-09-15 23:20:30 +0900, Paul Elder wrote:\n> Now that each pipeline handler has its own IPAProxy implementation, make\n> the IPAManager fetch the IPAProxy based on the pipeline handler name.\n> Also, since the IPAProxy is used regardless of isolation or no\n> isolation, remove the isolation check from the proxy selection.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  src/libcamera/ipa_manager.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 046fd5c6..2d0ea242 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -275,8 +275,8 @@ std::unique_ptr<IPAProxy> IPAManager::createIPA(PipelineHandler *pipe,\n>  \t *\n>  \t * \\todo Implement a better proxy selection\n>  \t */\n> -\tconst char *proxyName = self_->isSignatureValid(m)\n> -\t\t\t      ? \"IPAProxyThread\" : \"IPAProxyLinux\";\n> +\tstd::string pipeName(pipe->name());\n> +\tconst char *proxyName = pipeName.replace(0, 15, \"IPAProxy\").c_str();\n\nBikeshedding time, is it work keeping the IPAProxy prefix? No strong \nopinion just asking ;-)\n\n>  \tIPAProxyFactory *pf = nullptr;\n>  \n>  \tfor (IPAProxyFactory *factory : IPAProxyFactory::factories()) {\n> -- \n> 2.27.0\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6CCD3C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 19 Sep 2020 11:49:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0711E62FBC;\n\tSat, 19 Sep 2020 13:49:09 +0200 (CEST)","from mail-lf1-x144.google.com (mail-lf1-x144.google.com\n\t[IPv6:2a00:1450:4864:20::144])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2518160367\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 19 Sep 2020 13:49:07 +0200 (CEST)","by mail-lf1-x144.google.com with SMTP id z19so8960924lfr.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 19 Sep 2020 04:49:07 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\t189sm1249806ljj.54.2020.09.19.04.49.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 19 Sep 2020 04:49:05 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"K34330YV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=VwQ4uo8prGSXC4IBjmguTPf6fQx9hPBEqszGh034HOc=;\n\tb=K34330YVAR3NljGtIX+lfRlr8MMIgvySJSAecxU/xdKmo0SBlgqfE9a0NxMvriuCN+\n\tW/NZofF4B6fChSZmcfIctLzoJBlEi+t9LC6xHyROQD1atRCzPflR67+As+v+nXOumGAu\n\tsBZHhDwFb+5UdIZYkHkbVROF1wKHctKOMqoSiRQvy1b6K/SyFtmA3IpKjwJZm+Ao6Izt\n\tdpo0TQZHu8qbaR54NSB6vfd6XJAOZonrot0zsgdM9HLd5WTEfnco59ziFush41yBMJys\n\tbU6d2XUB6UGw2qtnSATcYrBRDxY73A4ek81DKt7Z1GOc7Gxxa+gY6ExRo6OfXI6VCFA1\n\tRj5Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=VwQ4uo8prGSXC4IBjmguTPf6fQx9hPBEqszGh034HOc=;\n\tb=d/nCNTzvdP68yQV2DsOwPSZHNCeEfuJj1P5wAcXaqARVWv73lOilueJA8fH5oGW5K/\n\tA0eZC3JtnV5zHEPS/XtYzU6AfvLBVQ8cAeOlWGZrMk5rDCMe/WNN2/c9Bs7izlQ7Np+3\n\tEp5+77BSeuEOQAro1a2PLJxpoRHYTEy0n1djqgJVLkPFHji/0SUrzJq1F4NsBfWjwl85\n\t77TBa/Rhf9KJrqPdO/MSv5fSqyH+Q4hEGUF5WduFkTr4MTwPwc66jsTUsFbI9jT3bi18\n\tmSZ8+NovCiyTsmqULzlCCsKzPLDCpCRIMSRqh2a+wytIZFaFkwtVKDE8q4H11VRTl7Tt\n\trR8A==","X-Gm-Message-State":"AOAM533igOipKP5v8NAo3h942MnJRhavn/dW88lwqU3IOxBFm+RYZCYh\n\t1TZHlrMXpj3oWju0gsDLYeqXxw==","X-Google-Smtp-Source":"ABdhPJwuGOmJ1cBHhPvykTmK1E0Da2wCc4LPJbQHLAgAgK7g+DcsruSnBIVvyjDVy2aYLjIElOSoYQ==","X-Received":"by 2002:ac2:5de2:: with SMTP id z2mr2247168lfq.141.1600516146575;\n\tSat, 19 Sep 2020 04:49:06 -0700 (PDT)","Date":"Sat, 19 Sep 2020 13:49:05 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<20200919114905.GR1850958@oden.dyn.berto.se>","References":"<20200915142038.28757-1-paul.elder@ideasonboard.com>\n\t<20200915142038.28757-16-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200915142038.28757-16-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 15/23] libcamera: IPAManager: Fetch\n\tIPAProxy corresponding to pipeline","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12600,"web_url":"https://patchwork.libcamera.org/comment/12600/","msgid":"<20200921034144.GD45948@pyrite.rasen.tech>","date":"2020-09-21T03:41:44","subject":"Re: [libcamera-devel] [PATCH 15/23] libcamera: IPAManager: Fetch\n\tIPAProxy corresponding to pipeline","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Sat, Sep 19, 2020 at 01:49:05PM +0200, Niklas Söderlund wrote:\n> Hi Paul,\n> \n> On 2020-09-15 23:20:30 +0900, Paul Elder wrote:\n> > Now that each pipeline handler has its own IPAProxy implementation, make\n> > the IPAManager fetch the IPAProxy based on the pipeline handler name.\n> > Also, since the IPAProxy is used regardless of isolation or no\n> > isolation, remove the isolation check from the proxy selection.\n> > \n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > ---\n> >  src/libcamera/ipa_manager.cpp | 4 ++--\n> >  1 file changed, 2 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> > index 046fd5c6..2d0ea242 100644\n> > --- a/src/libcamera/ipa_manager.cpp\n> > +++ b/src/libcamera/ipa_manager.cpp\n> > @@ -275,8 +275,8 @@ std::unique_ptr<IPAProxy> IPAManager::createIPA(PipelineHandler *pipe,\n> >  \t *\n> >  \t * \\todo Implement a better proxy selection\n> >  \t */\n> > -\tconst char *proxyName = self_->isSignatureValid(m)\n> > -\t\t\t      ? \"IPAProxyThread\" : \"IPAProxyLinux\";\n> > +\tstd::string pipeName(pipe->name());\n> > +\tconst char *proxyName = pipeName.replace(0, 15, \"IPAProxy\").c_str();\n> \n> Bikeshedding time, is it work keeping the IPAProxy prefix? No strong \n> opinion just asking ;-)\n\nI think it is. There are quite a few components involved in a\npipeline-IPA pairing (with isolation):\n\npipeline handler - IPA proxy - IPAIPC - IPA proxy worker - IPA interface\n\nAnd without isolation:\n\npipeline handler - IPA proxy - (thread) - IPA interface\n\nOut of these five components, the pipeline handler, IPA proxy, IPA proxy\nworker, and IPA interface are all pipeline-specific, therefore they\nshould have the pipeline name in their names. In addition, to\ndifferentiate which component they are, there should be the component\nname in their names as well.\n\nIPAIPCs are dependent on the IPC mechanism, therefore they have the\nmechanism name in their name, like IPAIPCUnixSocket.\n\nI suppose IPA interface might have multiple names for different\nimplementations... but that's a different issue with a different\nsolution.\n\n\nPaul\n\n> >  \tIPAProxyFactory *pf = nullptr;\n> >  \n> >  \tfor (IPAProxyFactory *factory : IPAProxyFactory::factories()) {\n> > -- \n> > 2.27.0\n> > \n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\n> \n> -- \n> Regards,\n> Niklas Söderlund","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 99834BF01C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Sep 2020 03:41:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 13BB062FBF;\n\tMon, 21 Sep 2020 05:41:56 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A31C260367\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Sep 2020 05:41:54 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9AA7227B;\n\tMon, 21 Sep 2020 05:41:51 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"KUWjkTwQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1600659712;\n\tbh=4y1Xlvl17VHACvSRVu1Tn/DFHV2L7vFOMWiaBWzVPNY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=KUWjkTwQRU9stqBfKlpibs0dX7xRSpMvW5b47OcdRTNbjxwo4g4NwQSXVCCIeOxXR\n\t6CyiXP1/fWUnvfAzuL3WYmk1K0HtKbWjni95Er1tvaODrI0fWyf5LVoFY0UXv1qHNW\n\taRiTImoAieCkEK6zGq8GRV/nfppgnLnj16avwVWo=","Date":"Mon, 21 Sep 2020 12:41:44 +0900","From":"paul.elder@ideasonboard.com","To":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200921034144.GD45948@pyrite.rasen.tech>","References":"<20200915142038.28757-1-paul.elder@ideasonboard.com>\n\t<20200915142038.28757-16-paul.elder@ideasonboard.com>\n\t<20200919114905.GR1850958@oden.dyn.berto.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200919114905.GR1850958@oden.dyn.berto.se>","Subject":"Re: [libcamera-devel] [PATCH 15/23] libcamera: IPAManager: Fetch\n\tIPAProxy corresponding to pipeline","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]