On 9/15/25 9:34 PM, Sragdhara Datta Chaudhuri wrote:
> Network function:
> nf-add <nf-name> <inport> <outport> - Add a new NF
> nf-del <nf-name-or-uuid> - Delete a NF
> nf-list - List all NFs
>
> Network function group:
> nfg-add <nfg-name> <id> <mode> [<nf1> <nf2> ...]
> - Add a new NFG (mode must be "inline", id a value between 1 and 255)
> nfg-del <nfg-name-or-uuid> - Delete a NFG
> nfg-list [<nfg-name-or-uuid>] - List all NFGs
> nfg-add-nf <nfg-name-or-uuid> <nf-name-or-uuid>
> - Add a NF to a NFG
> nfg-del-nf <nfg-name-or-uuid> <nf-name-or-uuid>
> - Remove a NF from a NFG
>
> ACL (new optional parameter added for NFG):
> acl-add <ls>|<pg> <direction> <priority> <match> <action> [<nfg-name-or-uuid>]
>
> Signed-off-by: Sragdhara Datta Chaudhuri <[email protected]>
> Acked-by: Naveen Yerramneni <[email protected]>
> Acked-by:Numan Siddique <[email protected]>
> ---
Hi Sragdhara, Naveen, Numan,
Thanks for this new revision and reviews!
> tests/ovn-nbctl.at | 109 ++++++++
> utilities/ovn-nbctl.8.xml | 104 +++++++-
> utilities/ovn-nbctl.c | 509 +++++++++++++++++++++++++++++++++++++-
> 3 files changed, 718 insertions(+), 4 deletions(-)
>
[...]
> +static void
> +nbctl_nf_group_del_network_function(struct ctl_context *ctx)
> +{
> + const struct nbrec_network_function *nf;
> + const struct nbrec_network_function_group *nf_group;
> + bool must_exist = !shash_find(&ctx->options, "--if-exists");
> +
> + char * error = nf_group_by_name_or_uuid(ctx, ctx->argv[1], must_exist,
> + &nf_group);
> + if (error) {
> + ctx->error = error;
> + return;
> + }
> + if (!nf_group) {
> + return;
> + }
> +
> + error = nf_by_name_or_uuid(ctx, ctx->argv[2], must_exist, &nf);
> + if (error) {
> + ctx->error = error;
> + return;
> + }
> +
> + /* Find the network-function_group that contains 'network-function',
> + * then delete it. */
> + for (size_t i = 0; i < nf_group->n_network_function; i++) {
> + if (nf_group->network_function[i] == nf) {
> + nbrec_network_function_group_verify_network_function(nf_group);
> + nbrec_network_function_group_update_network_function_delvalue(
> + nf_group, nf);
> + return;
> + }
> + }
> + if (must_exist) {
> + ctl_error(ctx, "network-function %s is not part of any logical
> switch",
Nit: I think this should be "network-function %s is not part of any group".
I changed it and applied the patch to main.
Regards,
Dumitru
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev