[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54F9BFCB.5030100@mojatatu.com>
Date: Fri, 06 Mar 2015 09:55:07 -0500
From: Jamal Hadi Salim <jhs@...atatu.com>
To: sfeldma@...il.com, netdev@...r.kernel.org, davem@...emloft.net,
jiri@...nulli.us, roopa@...ulusnetworks.com,
alexander.h.duyck@...hat.com
Subject: Re: [PATCH net-next v4 2/8] netdevice: add IPv4 fib add/del ops
On 03/06/15 00:21, sfeldma@...il.com wrote:
> From: Scott Feldman <sfeldma@...il.com>
>
> Add two new ndo ops for IPv4 fib offload support, add and del. Add uses
> modifiy semantics if fib entry already offloaded.
The above semantic will not express correctly the intent that the tools
like iproute2 expose and user space expects.
I think you need to pass the netlink flags to do it correctly at
the driver level.
i.e classical table operations per netlink flags (NLM_F_CREATE,
NLM_F_REPLACE, NLM_F_EXCL, NLM_F_APPEND)
1) Create: NLM_F_CREATE
2) Create exclusively i.e reject if already created
(NLM_F_CREATE|NLM_F_EXCL)
3) Create or modify (which is the semantic you are refering to)
NLM_F_CREATE|NLM_F_REPLACE
4) Append - which means "I dont care if it exists, just append it"
NLM_F_CREATE|NLM_F_APPEND
cheers,
jamal
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists