Hi Jerin BR Rongwei
> -----Original Message----- > From: Jerin Jacob <jerinjac...@gmail.com> > Sent: Monday, January 23, 2023 21:20 > To: Rongwei Liu <rongw...@nvidia.com> > Cc: dev@dpdk.org; Matan Azrad <ma...@nvidia.com>; Slava Ovsiienko > <viachesl...@nvidia.com>; Ori Kam <or...@nvidia.com>; NBU-Contact- > Thomas Monjalon (EXTERNAL) <tho...@monjalon.net>; > step...@networkplumber.org; Raslan Darawsheh <rasl...@nvidia.com>; > Ferruh Yigit <ferruh.yi...@amd.com>; Andrew Rybchenko > <andrew.rybche...@oktetlabs.ru> > Subject: Re: [PATCH v4 3/3] ethdev: add standby flags for live migration > > External email: Use caution opening links or attachments > > > On Wed, Jan 18, 2023 at 9:15 PM Rongwei Liu <rongw...@nvidia.com> wrote: > > > > Some flags are added to the process state API for live migration in > > order to change the behavior of the flow rules in a standby process. > > > > Signed-off-by: Rongwei Liu <rongw...@nvidia.com> > > --- > > lib/ethdev/rte_ethdev.h | 21 +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > > > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index > > 1505396ced..9ae4f426a7 100644 > > --- a/lib/ethdev/rte_ethdev.h > > +++ b/lib/ethdev/rte_ethdev.h > > @@ -2260,6 +2260,27 @@ int rte_eth_dev_owner_get(const uint16_t > > port_id, __rte_experimental int rte_eth_process_set_role(bool > > standby, uint32_t flags); > > > > +/**@{@name Process role flags > > + * used when migrating from an application to another one. > > + * @see rte_eth_process_set_active > > + */ > > +/** > > + * When set on a standby process, ingress flow rules will be > > +effective > > + * in active and standby processes, so the ingress traffic may be > > duplicated. > > + */ > > +#define RTE_ETH_PROCESS_FLAG_STANDBY_DUP_FLOW_INGRESS > RTE_BIT32(0) > > > How to duplicate if action has statefull items for example, > rte_flow_action_security::security_session -> it store the live pointer > rte_flow_action_meter::mtr_id; -> MTR object ID created with > rte_mtr_create() I agree with you, not all actions can be supported in the active/standby model. That' why we have return value checking and rollback. In Nvidia driver doc, we suggested user to start from 'rss/queue/jump' actions. Meter is possible, at least per my view. Assume: "meter g_action queue 0 / y_action drop / r_action drop" Old application: create meter_id 'A' with pre-defined limitation. New application: create meter_id 'B' which has the same parameters with 'A'. 1. 1st possible approach: Hardware duplicates the traffic; old application use meter 'A' and new application uses meter 'B' to control traffic throughputs. Since traffic is duplicated, so it can go to different meters. 2. 2nd possible approach: Meter 'A' and 'B' point to the same hardware resource, and traffic reaches this part first and if green, duplication happens.