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 70500A0350 for ; Wed, 1 Jul 2020 15:01:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D40B91D172; Wed, 1 Jul 2020 15:01:07 +0200 (CEST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id E78961D170 for ; Wed, 1 Jul 2020 15:01:06 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id a6so18204389wmm.0 for ; Wed, 01 Jul 2020 06:01:06 -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=miVSIryhVxbaTYYRJl7DdkYlpZriwUZJv4MARvkW7gI=; b=Q5UsD3CZCd1xP3n7wdqzz2+/He/ttoa4wBvCQlVHjX+jDFwugHU6yxSd2CJrF9qF/r LleUgd4bkwblchWnJ1FnEfXsMPMMEjlMtpooUrws3Zefv8BqjNZaZkEmzJP22t+xCLL+ BHRyF/+02MHK9s96Ck1aWyc0GVp93ZpK8178xOWzy3cd4DxemoVy0eDI1jaTk7z9jUsr IeD0Vfe4XipE2Tn8Q6FEJE2fGnfJL+KlYyXVodOnK+gWKWoZwraOgk0CWDsdfzLuN9eu xv4NYcbKUXptww0ZSgG6qoQW0IAguRS0DB6W4k69sNyAuJNAdAL/4n3mP3CVhA0LvupY QkgA== 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=miVSIryhVxbaTYYRJl7DdkYlpZriwUZJv4MARvkW7gI=; b=gMsRdAMaVYfMi608jRRP7Tkn8q75x9n3gko3G7BiSI/21CZ+uxA5ADddGBGcs9aFSF OnAZVWU82lLz5Io20krG1kh3OwZxSmjl0cVltY/LRKnIJDI9E2lroP1t3ACn9Dkz5CPE 2lCS1/fy7jI8fDBgCML2fQr+sfzD5CsGUnGWc8RQGUKPpogaSRp7xMpscLzjoO8+b5Zn Gr0NtYPH9M8xoCQD3lzhLntjoC3qIZ5x40XjaJNWwybw/0aQsoY4EDyOT3OX7lKcAXNH qMJHdpo78Ih+mC7/0lROIMxy/AS0unoLuNZnkUAuOFFoWBSekWoSmsS/Ec34vifjxg1A 302Q== X-Gm-Message-State: AOAM530b2nE4tdtU0Gdggrv0azCvd4U/372keorWWQoMJ/g/mv4Uxp7L 71r27RAvg+7Y0/f0U/xPdhXeCi4kyD3n4Lpo8uA= X-Google-Smtp-Source: ABdhPJzn3oXY1qFijbMrssG4Mr9KxMB08ROtWGu7I562xpAPIYDLcA4o/7OA6ddBC1ZzCBEZ+ht7Hrk9+LIVBhuR0HE= X-Received: by 2002:a1c:dd09:: with SMTP id u9mr25504963wmg.70.1593608466505; Wed, 01 Jul 2020 06:01:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Cliff Burdick Date: Wed, 1 Jul 2020 06:00:54 -0700 Message-ID: To: Pavel Vajarov 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" 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. >