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 2B9D245B3A; Mon, 14 Oct 2024 18:58:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B70FB402CC; Mon, 14 Oct 2024 18:58:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id B65CD4026C for ; Mon, 14 Oct 2024 18:58:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728925129; 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: in-reply-to:in-reply-to:references:references; bh=xdxPJtFHV/532wYCOb/lE0Qu4qvrB5/mjz1W3sjuLUs=; b=Tj3Iy6rdqxE9PvsflfNSvfzFsUJpoqhBZfx+vX6hKyqm315zgglBqFEMUs3p1cL9cix5r+ jT94qF4RdLtiVNiaq69EcJycjlY+7P9KmiZwOGr/UG2jlfYclV2k2a6NiN43v80YdQxQ2L ATD9Cdfds2cmGF/U3+epZxqcLpNAzww= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-yLAHnYDNMzWHYj595nDpaw-1; Mon, 14 Oct 2024 12:58:48 -0400 X-MC-Unique: yLAHnYDNMzWHYj595nDpaw-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-539f7ed336bso840843e87.2 for ; Mon, 14 Oct 2024 09:58:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728925126; x=1729529926; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xdxPJtFHV/532wYCOb/lE0Qu4qvrB5/mjz1W3sjuLUs=; b=T2irbMrIO6lmAnCxkDxOyj0kTkYgfjOSsFWCkBwc5mhkg1zgWE8zm57BK6rj3BBuui sF2nwuLydIHtRN9hUubhu8F6lCte932oGhFaSXI8QAj+O7kXRkOFM1mt/JDrpA4U0OPe l0mXrWagj75WInyrGd62Zbxz1O5ZESRQvYAfEe7bzU5U9rBFXTXAMSNhX4alfOvGL2Z7 BofKE2Ljwj5GZtpEdLy2Wcq1rKbTOkGIkS0A5kqVAqEXSCOTsWQDwOO3XSXocLPY+l8A Sqd3gnhjSBETmBjLUpqcqB7eWL+WrMmoOHIDhDMHQyENJILUfqEFHkoZbqc0sOwnqmjH CAYw== X-Gm-Message-State: AOJu0YyHjNJI50sPKOyiDxa04VoMW/76KxfYOQt6Ulh2iEW76q8i3zwJ mA6fcdUK6thLfMdbTrCJrbnP103f9BNKmtDlRX6lPNcGLrQhLYla7mMAApzPzIUsFpRn2lfrBGT NYHvePId80a1TQ2Gsrckel/cjDn0Fs7Cc4Bv9B/HYc0P7fJG8ZgH43mv/B/Ekzng5zcfqH+HeX+ gn2US1LZi1ho3Ke+w= X-Received: by 2002:a05:6512:31d3:b0:539:fc75:99c4 with SMTP id 2adb3069b0e04-539fc759c55mr1162191e87.20.1728925126410; Mon, 14 Oct 2024 09:58:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFR6m9qhuz+7oWxVOCTLYRvGhonmr0Ymbq06j1yoVsLNmOnIfTYN4GxDgXA8+hSEBBaVn38htdkoaJ18uHGk6s= X-Received: by 2002:a05:6512:31d3:b0:539:fc75:99c4 with SMTP id 2adb3069b0e04-539fc759c55mr1162175e87.20.1728925125974; Mon, 14 Oct 2024 09:58:45 -0700 (PDT) MIME-Version: 1.0 References: <20241008175524.450829-1-vladimir.medvedkin@intel.com> <20241010112734.682093-1-vladimir.medvedkin@intel.com> In-Reply-To: <20241010112734.682093-1-vladimir.medvedkin@intel.com> From: David Marchand Date: Mon, 14 Oct 2024 18:58:34 +0200 Message-ID: Subject: Re: [PATCH v3 1/2] fib: implement RCU rule reclamation To: Vladimir Medvedkin Cc: dev@dpdk.org, rjarry@redhat.com, mb@smartsharesystems.com, stephen@networkplumber.org, ruifeng.wang@arm.com, honnappa.nagarahalli@arm.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Thu, Oct 10, 2024 at 1:27=E2=80=AFPM Vladimir Medvedkin wrote: > diff --git a/lib/fib/rte_fib.c b/lib/fib/rte_fib.c > index 4f9fba5a4f..730f50c1ba 100644 > --- a/lib/fib/rte_fib.c > +++ b/lib/fib/rte_fib.c > @@ -338,3 +338,14 @@ rte_fib_select_lookup(struct rte_fib *fib, > return -EINVAL; > } > } > + > +int > +rte_fib_rcu_qsbr_add(struct rte_fib *fib, struct rte_fib_rcu_config *cfg= ) > +{ > + switch (fib->type) { > + case RTE_FIB_DIR24_8: > + return dir24_8_rcu_qsbr_add(fib->dp, cfg, fib->name); > + default: > + return -ENOTSUP; This does not align with the documented API. Please send a fix. > + } > +} > diff --git a/lib/fib/rte_fib.h b/lib/fib/rte_fib.h > index d7a5aafe53..346eb7f149 100644 [snip] > /** > * Create FIB > * > @@ -219,6 +248,25 @@ rte_fib_get_rib(struct rte_fib *fib); > int > rte_fib_select_lookup(struct rte_fib *fib, enum rte_fib_lookup_type type= ); > > +/** > + * Associate RCU QSBR variable with a FIB object. > + * > + * @param fib > + * the fib object to add RCU QSBR > + * @param cfg > + * RCU QSBR configuration > + * @return > + * On success - 0 > + * On error - 1 with error code set in rte_errno. > + * Possible rte_errno codes are: > + * - EINVAL - invalid pointer > + * - EEXIST - already added QSBR > + * - ENOMEM - memory allocation failure > + * - ENOTSUP - not supported by configured dataplane algorithm In general, the fib API returns a negative integer in general. I'll merge this patch as is for rc1 but I would prefer to have something consistent for rc2. Can you send a followup patch? > + */ > +__rte_experimental > +int rte_fib_rcu_qsbr_add(struct rte_fib *fib, struct rte_fib_rcu_config = *cfg); > + > #ifdef __cplusplus > } > #endif Thanks. --=20 David Marchand