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 234D5A0C41 for ; Mon, 20 Sep 2021 16:43:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 067EA410EC; Mon, 20 Sep 2021 16:43:43 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 450E940DF7 for ; Mon, 20 Sep 2021 16:43:41 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id s16so8209845pfk.0 for ; Mon, 20 Sep 2021 07:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FfcXIv2RGtFE8TTPzgm0uvZmfRBqlvtNHc4+V8mmuzU=; b=AYJ98zn5A9+X0I/mPJsmIwyvmsv+QSIt+mbjALWmxBAWDkjkAyAHHnrFugpIAHP9EP drl8IqU57AHWl5+eSX6+JKLQcxEdQdrGdTeE9AosE20v8o83o1Oo4fdIc9ChMh07qXcR 3plemd5xMZ7SoURccHL6ukdedA3wSWu7pt2dl+sReveAP4sX88WZiHJzH8oKiS/+C333 XGX8fZSKUDEVnzBDCTAmR3RETIUbL/ULeDEwfkFFmyDRH0+5eA9QKupizbzeqv4aneJw ztXkNtwT6EsgjIigl0JNE7iMG4RoTEVzRgGgHmx/a4ofSVg0+GJ12tTHB6kUB85Udd4U CrHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FfcXIv2RGtFE8TTPzgm0uvZmfRBqlvtNHc4+V8mmuzU=; b=o+Z1vaEC4hmSs6yAkVAx01Iy+55iD+gIhuh6cLaCIMnA1mP4SaUY5OnMqZ2GMM/RnT aBUb3otvP8knOi0ox6n8N+fO9m0vnT0FO/ZNrpjudx51u577oosUKz1muEpT9iNM2qgF OVMO+YZuJ1/Vgx34rTt1B6dwkSJPU+1zldFcIcSrSFNZhPnHyjUQEA4Pw2DSDB/FXKtN 5lXLX/J+N9BKVUoZXGG1HLf5xYEh8YOAkaNZpado924AeG1R1AmOiy+jJfl9zCKRnDjV mJ5mqyv50e9sUVnyMmWVGu657B/PPftX+LjEpQucnFNEWgf+yy5ZTKcgF25sEuUwwbn6 RMNA== X-Gm-Message-State: AOAM533ucy5TQ6GGjCrv0wWe8Mys5fpalKK0xkPuadWlc0Cw3dtE7laU fSL5bycB1atKu0NSRpK2oRHxxw== X-Google-Smtp-Source: ABdhPJwBRsOuPRCcpO36w91jMwbYGF2FmQRGD88h0DyhC7i6EtCxJkNf7RnAHsYdjBdkul1c2Tk21w== X-Received: by 2002:a63:da49:: with SMTP id l9mr23407172pgj.277.1632149020274; Mon, 20 Sep 2021 07:43:40 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id f127sm14910258pfa.25.2021.09.20.07.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 07:43:39 -0700 (PDT) Date: Mon, 20 Sep 2021 07:43:37 -0700 From: Stephen Hemminger To: "Loftus, Ciara" Cc: "dev@dpdk.org" , "stable@dpdk.org" , "Yigit, Ferruh" , "Zhang, Qi Z" , "Burakov, Anatoly" Message-ID: <20210920074337.595f3742@hermes.local> In-Reply-To: References: <20210903161525.9929-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/af_xdp: fix support of secondary process X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Mon, 20 Sep 2021 13:23:57 +0000 "Loftus, Ciara" wrote: > > -----Original Message----- > > From: dev On Behalf Of Stephen Hemminger > > Sent: Friday 3 September 2021 17:15 > > To: dev@dpdk.org > > Cc: Stephen Hemminger ; > > stable@dpdk.org; xiaolong.ye@intel.com > > Subject: [dpdk-dev] [PATCH] net/af_xdp: fix support of secondary process > > > > Doing basic operations like info_get or get_stats was broken > > in af_xdp PMD. The info_get would crash because dev->device > > was NULL in secondary process. Fix this by doing same initialization > > as af_packet and tap devices. > > > > The get_stats would crash because the XDP socket is not open in > > primary process. As a workaround don't query kernel for dropped > > packets when called from secondary process. > > > > Note: this does not address the other bug which is that transmitting > > in secondary process is broken because the send() in tx_kick > > will fail because XDP socket fd is not valid in secondary process. > > Hi Stephen, > > Apologies for the delayed reply, I was on vacation. > > In the Bugzilla report you suggest we: > "mark AF_XDP as broken in with primary/secondary > and return an error in probe in secondary process". > I agree with this suggestion. However with this patch we still permit secondary, and just make sure it doesn't crash for get_stats. Did you change your mind? > Personally, I would prefer to have primary/secondary either working 100% or else not allowed at all by throwing an error during probe. What do you think? Do you have a reason/use case to permit secondary processes despite some features not being available eg. full stats, tx? > > Thanks, > Ciara There are two cases where secondary is useful even if send/receive can't work from secondary process. The pdump and proc-info applications can work with these patches. I am using XDP over pdump as an easy way to get packets into the code for testing. The flag in the documentation doesn't have a "limited" version. If you want, will send another patch to disable secondary support. Supporting secondary, means adding a mechanism to pass the socket around.