On 15 Mar 2026, at 16:26, Eli Britstein wrote:
> On 12/03/2026 12:39, Eelco Chaudron wrote:
>> External email: Use caution opening links or attachments
>>
>>
>> On 9 Feb 2026, at 14:29, Eli Britstein wrote:
>>
>>> From: Ariel Levkovich <[email protected]>
>>>
>>> Add a new option to build ovs with doca by specifying '--with-doca' in the
>>> configure line.
>>>
>>> This flag must be used along with '--with-dpdk'. Otherwise the configure
>>> step
>>> will fail.
>>>
>>> An example:
>>>
>>> ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
>>> --with-dpdk=static --with-doca=static
>> Thanks for the patch, Ariel/Eli! Much appreciated.
>>
>> I did not dive too deeply into the automake changes, and I would love for
>> someone with more experience in that area to take a look as well. That
>> said, I did notice quite a bit of unusual handling going on there. Is all
>> of that really necessary, or might there be a cleaner way to approach it?
>> Maybe there is even an opportunity to simplify things in the DOCA package
>> itself.
> Ack. I simplified it, will be in v2.
Thanks :)
>>> Co-authored-by: Salem Sol <[email protected]>
>>> Signed-off-by: Salem Sol <[email protected]>
>>> Co-authored-by: Eli Britstein <[email protected]>
>>> Signed-off-by: Eli Britstein <[email protected]>
>>> Signed-off-by: Ariel Levkovich <[email protected]>
>>> ---
>>> acinclude.m4 | 248 ++++++++++++++++++++++++++++++++++
>>> configure.ac | 1 +
>>> lib/automake.mk | 4 +
>>> lib/ovs-doca.c | 86 ++++++++++++
>>> lib/ovs-doca.h | 31 +++++
>>> utilities/checkpatch_dict.txt | 2 +
>>> vswitchd/bridge.c | 5 +
>>> vswitchd/ovs-vswitchd.c | 3 +
>>> vswitchd/vswitch.ovsschema | 9 +-
>>> vswitchd/vswitch.xml | 10 ++
>>> 10 files changed, 397 insertions(+), 2 deletions(-)
>>> create mode 100644 lib/ovs-doca.c
>>> create mode 100644 lib/ovs-doca.h
>>>
>>> diff --git a/acinclude.m4 b/acinclude.m4
>>> index 586163ef3..72411df48 100644
>>> --- a/acinclude.m4
>>> +++ b/acinclude.m4
>>> @@ -367,6 +367,253 @@ AC_DEFUN([OVS_CHECK_LINUX_AF_XDP], [
>>> AM_CONDITIONAL([HAVE_AF_XDP], test "$AF_XDP_ENABLE" = true)
>>> ])
>>>
>>> +dnl OVS_CHECK_DOCA
>>> +dnl
>>> +dnl Configure DOCA source tree
>> Skipped reviewing this part.
>>
>> [...]
>>
>>> diff --git a/lib/ovs-doca.c b/lib/ovs-doca.c
>>> new file mode 100644
>>> index 000000000..eae361a21
>>> --- /dev/null
>>> +++ b/lib/ovs-doca.c
>>> @@ -0,0 +1,86 @@
>>> +/*
>>> + * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION &
>>> AFFILIATES.
>>> + * All rights reserved.
>>> + * SPDX-License-Identifier: Apache-2.0
>>> + *
>>> + * Licensed under the Apache License, Version 2.0 (the "License");
>>> + * you may not use this file except in compliance with the License.
>>> + * You may obtain a copy of the License at
>>> + *
>>> + * http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +
>>> +#include <config.h>
>>> +
>>> +#include "compiler.h"
>>> +#include "ovs-doca.h"
>>> +#include "vswitch-idl.h"
>>> +
>>> +#ifdef DOCA_NETDEV
>>> +
>>> +#include <rte_common.h>
>>> +#include <rte_pmd_mlx5.h>
>>> +
>>> +#include <doca_version.h>
>>> +
>>> +/* DOCA disables dpdk steering as a constructor in higher priority.
>>> + * Set a lower priority one to enable it back. Disable it only upon using
>>> + * doca ports.
>>> + */
>>> +RTE_INIT(dpdk_steering_enable)
>>> +{
>>> + rte_pmd_mlx5_enable_steering();
>> This sounds a bit scary to me.
>>
>> Is there anything else DOCA changes in DPDK which is not visible to the
>> user? Especially since normal DPDK ports might be used, and when
>> compiled with DOCA it could behave differently than when compiled
>> without DOCA. The latter should ideally not be the case with DOCA
>> integration.
>
> With doca compiled, dpdk steering (mlx5 only) is disabled in a constructor.
> This constructor in OVS is for enabling it back.
Anything else DOCA configures in this constructor that is DPDK specific?
> There is a limitation that doca/mlx5-dpdk ports cannot be concurrently used.
> In the same ESW it doesn't make any sense, so the only use-case in which this
> limitation takes place is if the user wants to use mixed configuration of one
> ESW with doca and another with dpdk (again, mlx5 only) ports.
It makes sense that a single ESW must be under one netdev's (DPDK or
DOCA) control. But if we have one ESW in DPDK and one in DOCA, we might
have a problem, right?
> We think that this is an acceptable limitation.
I guess this limitation should be mentioned in the doca.rst doc, i.e.,
either all MLX ports must be controlled by DOCA or DPDK, not mixed.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev