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 EBD28A0350 for ; Wed, 1 Jul 2020 15:10:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D0CA91C1CC; Wed, 1 Jul 2020 15:10:02 +0200 (CEST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by dpdk.org (Postfix) with ESMTP id 93F901BFBC for ; Wed, 1 Jul 2020 15:10:01 +0200 (CEST) Received: by mail-wr1-f45.google.com with SMTP id f7so20744925wrw.1 for ; Wed, 01 Jul 2020 06:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c6ewDcyDwooj6SAeIrMOfLEaViPVL25oYIxBOfcHE6Q=; b=f3PSeAo6s4DGo29gR5TJPn0gH3G4C5tVhmnmCGLilgZBvCX46nxKZrOrkPBdyNcX+w C7PiMYYcTDK88uZahvnIjy6E2t++JTQBYLfKEITuTBa41/hYxLCHuQanw9UNwHpaZaOL zNxqQnReMMYkDx1Z8eSk4CAqOHlhh4LctPynztJKioFdBt8MoeG/rW2ic59IQYMhWFnF wWagdZfXc+OnYCFB1rc5lVTpp3OKxeJZ8b5s6fuJbZLxdOqBDzXbXYgWJqUCVRMvD1oS Z21wxMPSeO+/di4F0JW2jHX0eKTfwXupC6zreOugR0R9HAqf0DwNdD7hQn6Syt9dJi83 7EIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c6ewDcyDwooj6SAeIrMOfLEaViPVL25oYIxBOfcHE6Q=; b=ZCsJ4K+pJfLJUmflwcWxsiAmw3VPona0hlXG5Czl6bxzoerBGU5S8W5u36Sxiqus2D gC1dq1KTBfcR/rtkrupJqHCsSXm3cGZ/4KdQ15fKtUue6lFpInSvzgYaP5EQg6LOvbIS Ib1c4m9GcQfaQpoUEE35X/pbA0S5fRRiaY3ZMKaX+YJdT5eu5vVZT9dQxKTyU2b7MDpf HT1fBnLWY409OWnnTnCdHC3/xVZvTozbq3r921j6vwC7Z5Rf2p6kPZuGb8xVDhIK0x4C qjaAH8zQo4BGYMSv4juxhvYCKpgNn82nRIYQ5acND7QIyt/hmP2EfTC1Yyq3mlRqbRtp RBsA== X-Gm-Message-State: AOAM530qtmzdsruw7FbDZ7/Y1SLvNxnipql92OutzlcYXVXrYIcfTf4e O/+uYHoOR4xl2FLQlwLbm55fKXm6LoBns98LGYR/AXIc X-Google-Smtp-Source: ABdhPJx2ff2dSc0aXjaMofO5/M2HtN45n856oB5W7fNcrHAxc2rJ5ISYgeDiSO0kHiY8s6fEShRuY1n9uu2yEle/ZJ8= X-Received: by 2002:a5d:5686:: with SMTP id f6mr26228645wrv.15.1593609001367; Wed, 01 Jul 2020 06:10:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pavel Vajarov Date: Wed, 1 Jul 2020 16:09:49 +0300 Message-ID: To: Cliff Burdick Cc: users Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Handling KNI in a secondary process X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Thanks for the thread suggestion. Haven't thought about that for some reason. On Wed, Jul 1, 2020 at 4:01 PM Cliff Burdick wrote: > Running it as a separate thread in your primary application will not slow > it down any more than running a second process, so I'd try that first. > > Both primary and secondary processes have master lcores, which is where > all the initialization is done for pools and rings before spawning the > packet processing threads. > > > On Wed, Jul 1, 2020, 02:49 Pavel Vajarov wrote: > >> Hi there, >> >> Basically my question is whether it's possible to handle KNI packets >> (rte_kni_tx_burst, rte_kni_handle_request, rte_kni_rx_burst) in a >> secondary >> process? >> >> My idea to do this is to avoid slowing down the primary process with KNI >> handling. I'm thinking of using a shared memory ring buffer to send the >> needed packets to the secondary process (just like in the >> mulitprocess/client_server_mp example) and then the secondary process will >> do the KNI processing. Is this setup possible? >> >> I'm asking this because I read that the rte_kni_init function that >> "This function is to be executed on the MASTER lcore only" and I was >> wondering will I be able to use the kni related functions from a secondary >> process? >> Or maybe I need to initialize the KNI in the master process and then >> use rte_kni_get before start using the KNI? >> >> Thanks, >> Pavel. >> >