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 6AEF645E5A; Mon, 9 Dec 2024 10:27:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 090AA40264; Mon, 9 Dec 2024 10:27:46 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C241B4025F for ; Mon, 9 Dec 2024 10:27:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733736464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xxh09hF/fZuSmE+bk8MY+O+ToaBGZhdMuR4dBdtB9o4=; b=X0QdaluINJk6fnCimcOfvrQX7QPLzWsWbRM+5eBJSbRKggAc15ecKgwF3w4UVg+X1RGYvq ULg1+37EkrUOXh9ENdax9JA816Ew1Zgcz4+JjsjEE61WVa83eAhQPZQpk4dR5dnstrIwrG ma/5T3N9ggwAqhsPIAJ634zwmUldywM= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-177-YjZfSt4eOyKZNQIpguWguA-1; Mon, 09 Dec 2024 04:27:42 -0500 X-MC-Unique: YjZfSt4eOyKZNQIpguWguA-1 X-Mimecast-MFC-AGG-ID: YjZfSt4eOyKZNQIpguWguA Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-434f852cb35so4570785e9.0 for ; Mon, 09 Dec 2024 01:27:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733736461; x=1734341261; h=user-agent:to:from:cc:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Xxh09hF/fZuSmE+bk8MY+O+ToaBGZhdMuR4dBdtB9o4=; b=Z+4MuoS7v9je5FgThFbNgOm++RliLD97OZRxbtyipZ6+m0xcEHgsb/XRZcNhuy9RcM ighLJoPwN7cdWCoMZEIBYdyWDRPWdIq8SfBrFoZj+tHynw4bQKFnjxTzw0tdLks453De SXPjoyC6EOXPdz8eBSNudj1lpW9qb08LiR+3EhzFxatc+wAvNSN5YYPUkyTvGg1uAtMJ AV6yfVNePvIRdu406I10lgqLup3Z1d/hK2Xaz3DIkbi4y3slcg9PaQyYuGOfrsMe1WEA sI1LCNSj/GU5jLegy4UGoadsxqnvMY+fGVsYFYP1eYB6IfVzu/d6CdEdofGCjcd/ZVYz /Caw== X-Forwarded-Encrypted: i=1; AJvYcCUHfM/sgaYpccXDirEmGCADv5ooFW2cfj05PHooREHgTYSr7BBbipIOamSAUvhsKU9qWO0=@dpdk.org X-Gm-Message-State: AOJu0YxG3jdZpdK/+vsgH/WtSmma78fbJxG26gitKWfRPtnESDL6+gAW MkNGl8xDsqFx9D5TM69RNhDXAxHTg/6dizv9ls34GRMqnVl5lmvjOrevRfOqkTAtk4RG1Fb10X7 7LW+2NGLjNjUTWm563QdkeNQcBFMlzJNrdYdfnjdu X-Gm-Gg: ASbGncuvunXZd6IlcUx35GxDxMeC20wtRQWhaybqSCfHRWYofmtQUyluOXVEROLudwl EcwwWzB9H0ZhVDNXyo7ARRlPqjk3ANcgOWgM6Y27eSMymmhe+TkPBm5xyIGiYv7neaWA6zmKJf9 5CQKGK2Y7Rv9gPc7OclEDFBIfZECZnaBrpmdyY9IuIEHOEHhkQB6mbNqEhfz+U3Y/iEGT+dfh9h P4FdhiTdanWXDpLjyk2jEi8GKr04CibxInBPuey+0fdjMaQw9tMhRlVrYocqrLciCsI7Bt2UiqR n4g5uuscPKo6Q2X3DVK8uMNuk6nuWazj X-Received: by 2002:a05:600c:444b:b0:434:a1d3:a30f with SMTP id 5b1f17b1804b1-434ddeadf06mr85817415e9.6.1733736461250; Mon, 09 Dec 2024 01:27:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/fK23jvSMjWfuKtKV8hnWhfGD+7Yi3xmDWEzeIWxy7Jni/8fVQSip9nXeLKxzw8YbKvGQWw== X-Received: by 2002:a05:600c:444b:b0:434:a1d3:a30f with SMTP id 5b1f17b1804b1-434ddeadf06mr85817235e9.6.1733736460899; Mon, 09 Dec 2024 01:27:40 -0800 (PST) Received: from localhost (2a01cb000245cb00e9052d5591b817ee.ipv6.abo.wanadoo.fr. [2a01:cb00:245:cb00:e905:2d55:91b8:17ee]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434e8ec8072sm80949615e9.18.2024.12.09.01.27.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Dec 2024 01:27:40 -0800 (PST) Mime-Version: 1.0 Date: Mon, 09 Dec 2024 10:27:39 +0100 Message-Id: Subject: graph: dispatch mode with libevent for control plane Cc: "Jerin Jacob" , "David Marchand" , "Christophe Fontaine" , "Nitin Saxena" From: "Robin Jarry" To: "Nitin Saxena" , "dev@dpdk.org" , "grout@dpdk.org" User-Agent: aerc/0.18.2-105-g161569293b80 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: uooJe8FrziEAA6LsXoonJWdcR_AhHLoGdYDq7Va24A4_1733736461 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed 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 Hi folks, I had a look at the graph dispatch mode and wondered if it could be=20 adapted to be used with event loops for "slow path" processing. The use case I have in mind is having lcores dedicated for control plane=20 operations which are not latency sensitive. It would be nice to allow=20 data plane workers to send packets to these lcores while keeping the=20 packets in the graph. The problem I have with this solution for now, is that all CPUs=20 processing the graph with rte_graph_walk_mcore_dispatch() are supposed=20 to do busy polling. This is not compatible with select/epoll based event=20 loops. Would it be possible to have a way for busy-polling threads to signal=20 non-busy-polling threads that there are packets waiting for them in the=20 graph ring? In grout, we implemented something outside of the graph=20 using pthread_cond_signal(). https://github.com/DPDK/grout/blob/main/modules/infra/datapath/control_outp= ut.c https://github.com/DPDK/grout/blob/main/modules/infra/control/control_outpu= t.c Unless I am mistaken, this does not perform any syscall and does not=20 require acquiring any lock. Only the "slow" thread needs to acquire=20 locks and wait for the data path threads to call pthread_cond_signal(). This solution can only be used for busy-polling -> epoll-based=20 communication, for the other direction epoll-based -> busy-polling there=20 would not need any specific signaling required. Only posting the packets=20 to the graph ring would be enough. What do you think? How would you integrate this into rte_graph? What=20 would the API look like in your opinion? Thanks! --=20 Robin