Message ID | 1515996674-26338-6-git-send-email-hemant.agrawal@nxp.com |
---|---|
State | New |
Headers | show |
Series | Dynamic HW Mempool Detection Support | expand |
-----Original Message----- > Date: Mon, 15 Jan 2018 11:41:14 +0530 > From: Hemant Agrawal <hemant.agrawal@nxp.com> > To: dev@dpdk.org > CC: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, > santosh.shukla@caviumnetworks.com > Subject: [PATCH v2 5/5] mbuf: add user command line config mempools ops API > X-Mailer: git-send-email 2.7.4 > > This patch add the user command line configured mempool ops name > API to librte_mbuf and sends a deprecation notice to remove the > similar API from eal. > > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> > --- > doc/guides/rel_notes/deprecation.rst | 7 +++++++ > lib/librte_mbuf/rte_mbuf.c | 8 +++++++- > lib/librte_mbuf/rte_mbuf.h | 10 ++++++++++ > lib/librte_mbuf/rte_mbuf_version.map | 1 + > 4 files changed, 25 insertions(+), 1 deletion(-) > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst > index 13e8543..ec8018f 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -8,6 +8,13 @@ API and ABI deprecation notices are to be posted here. > Deprecation Notices > ------------------- > > +* eal: a mbuf specific API was part of eal APIs. This is now being > + moved to librte_mbuf to be with other similar APIs. > + The following API is target to be deprecated on 18.05. > + > + - ``rte_eal_mbuf_default_mempool_ops`` replaced by > + ``rte_mbuf_user_mempool_ops'' > + I think, deprecation notice need to be in a separate 'doc" patch. > * eal: several API and ABI changes are planned for ``rte_devargs`` in v18.02. > The format of device command line parameters will change. The bus will need > to be explicitly stated in the device declaration. The enum ``rte_devtype`` > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index 482676c..c587d3a 100644 > --- a/lib/librte_mbuf/rte_mbuf.c > +++ b/lib/librte_mbuf/rte_mbuf.c > @@ -168,12 +168,18 @@ rte_mbuf_platform_mempool_ops(void) > return internal_config.plat_mbuf_pool_ops_name; > } > > +const char * > +rte_mbuf_user_mempool_ops(void) > +{ > + return internal_config.user_mbuf_pool_ops_name; > +} > + > /* Return mbuf pool ops name */ > static const char * > rte_mbuf_best_mempool_ops(void) > { > /* User defined mempool ops takes the priority */ > - const char *best_ops = rte_eal_mbuf_default_mempool_ops(); I think, we may need to remove the stale rte_eal_mbuf_default_mempool_ops() once it is replaced. > + const char *best_ops = rte_mbuf_user_mempool_ops(); > if (best_ops) > return best_ops; > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index f958e3c..7feacc0 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -1143,6 +1143,16 @@ const char* > rte_mbuf_platform_mempool_ops(void); > > /** > + * Get user command line configured pool ops name for mbuf > + * > + * @return > + * returns user pool ops name. > + */ > + > +const char* > +rte_mbuf_user_mempool_ops(void); > + > +/** > * Get the data room size of mbufs stored in a pktmbuf_pool > * > * The data room size is the amount of data that can be stored in a > diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map > index 9b53502..d4af497 100644 > --- a/lib/librte_mbuf/rte_mbuf_version.map > +++ b/lib/librte_mbuf/rte_mbuf_version.map > @@ -41,6 +41,7 @@ DPDK_18.02 { > > rte_mbuf_platform_mempool_ops; > rte_mbuf_register_platform_mempool_ops; > + rte_mbuf_user_mempool_ops; > rte_pktmbuf_pool_create_specific; > > } DPDK_16.11; > -- > 2.7.4 >
On 1/15/2018 5:59 PM, Jerin Jacob wrote: > -----Original Message----- >> Date: Mon, 15 Jan 2018 11:41:14 +0530 >> From: Hemant Agrawal <hemant.agrawal@nxp.com> >> This patch add the user command line configured mempool ops name >> API to librte_mbuf and sends a deprecation notice to remove the >> similar API from eal. >> >> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> >> --- >> doc/guides/rel_notes/deprecation.rst | 7 +++++++ >> lib/librte_mbuf/rte_mbuf.c | 8 +++++++- >> lib/librte_mbuf/rte_mbuf.h | 10 ++++++++++ >> lib/librte_mbuf/rte_mbuf_version.map | 1 + >> 4 files changed, 25 insertions(+), 1 deletion(-) >> >> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst >> index 13e8543..ec8018f 100644 >> --- a/doc/guides/rel_notes/deprecation.rst >> +++ b/doc/guides/rel_notes/deprecation.rst >> @@ -8,6 +8,13 @@ API and ABI deprecation notices are to be posted here. >> Deprecation Notices >> ------------------- >> >> +* eal: a mbuf specific API was part of eal APIs. This is now being >> + moved to librte_mbuf to be with other similar APIs. >> + The following API is target to be deprecated on 18.05. >> + >> + - ``rte_eal_mbuf_default_mempool_ops`` replaced by >> + ``rte_mbuf_user_mempool_ops'' >> + > > I think, deprecation notice need to be in a separate 'doc" patch. Yes. you are right. <snip>.. >> +const char * >> +rte_mbuf_user_mempool_ops(void) >> +{ >> + return internal_config.user_mbuf_pool_ops_name; >> +} >> + >> /* Return mbuf pool ops name */ >> static const char * >> rte_mbuf_best_mempool_ops(void) >> { >> /* User defined mempool ops takes the priority */ >> - const char *best_ops = rte_eal_mbuf_default_mempool_ops(); > > I think, we may need to remove the stale rte_eal_mbuf_default_mempool_ops() once > it is replaced. Do you mean that till the API is not deprecated, we shall keep the usage?
-----Original Message----- > Date: Mon, 15 Jan 2018 20:05:16 +0530 > From: Hemant Agrawal <hemant.agrawal@nxp.com> > To: Jerin Jacob <jerin.jacob@caviumnetworks.com> > CC: dev@dpdk.org, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com > Subject: Re: [PATCH v2 5/5] mbuf: add user command line config mempools ops > API > User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 > Thunderbird/45.8.0 > > On 1/15/2018 5:59 PM, Jerin Jacob wrote: > > -----Original Message----- > > > Date: Mon, 15 Jan 2018 11:41:14 +0530 > > > From: Hemant Agrawal <hemant.agrawal@nxp.com> > > > > This patch add the user command line configured mempool ops name > > > API to librte_mbuf and sends a deprecation notice to remove the > > > similar API from eal. > > > > > > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> > > > --- > > > doc/guides/rel_notes/deprecation.rst | 7 +++++++ > > > lib/librte_mbuf/rte_mbuf.c | 8 +++++++- > > > lib/librte_mbuf/rte_mbuf.h | 10 ++++++++++ > > > lib/librte_mbuf/rte_mbuf_version.map | 1 + > > > 4 files changed, 25 insertions(+), 1 deletion(-) > > > > > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst > > > index 13e8543..ec8018f 100644 > > > --- a/doc/guides/rel_notes/deprecation.rst > > > +++ b/doc/guides/rel_notes/deprecation.rst > > > @@ -8,6 +8,13 @@ API and ABI deprecation notices are to be posted here. > > > Deprecation Notices > > > ------------------- > > > > > > +* eal: a mbuf specific API was part of eal APIs. This is now being > > > + moved to librte_mbuf to be with other similar APIs. > > > + The following API is target to be deprecated on 18.05. > > > + > > > + - ``rte_eal_mbuf_default_mempool_ops`` replaced by > > > + ``rte_mbuf_user_mempool_ops'' > > > + > > > > I think, deprecation notice need to be in a separate 'doc" patch. > > Yes. you are right. > > <snip>.. > > > > +const char * > > > +rte_mbuf_user_mempool_ops(void) > > > +{ > > > + return internal_config.user_mbuf_pool_ops_name; > > > +} > > > + > > > /* Return mbuf pool ops name */ > > > static const char * > > > rte_mbuf_best_mempool_ops(void) > > > { > > > /* User defined mempool ops takes the priority */ > > > - const char *best_ops = rte_eal_mbuf_default_mempool_ops(); > > > > I think, we may need to remove the stale rte_eal_mbuf_default_mempool_ops() once > > it is replaced. > > Do you mean that till the API is not deprecated, we shall keep the usage? Yes >
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 13e8543..ec8018f 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -8,6 +8,13 @@ API and ABI deprecation notices are to be posted here. Deprecation Notices ------------------- +* eal: a mbuf specific API was part of eal APIs. This is now being + moved to librte_mbuf to be with other similar APIs. + The following API is target to be deprecated on 18.05. + + - ``rte_eal_mbuf_default_mempool_ops`` replaced by + ``rte_mbuf_user_mempool_ops'' + * eal: several API and ABI changes are planned for ``rte_devargs`` in v18.02. The format of device command line parameters will change. The bus will need to be explicitly stated in the device declaration. The enum ``rte_devtype`` diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 482676c..c587d3a 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -168,12 +168,18 @@ rte_mbuf_platform_mempool_ops(void) return internal_config.plat_mbuf_pool_ops_name; } +const char * +rte_mbuf_user_mempool_ops(void) +{ + return internal_config.user_mbuf_pool_ops_name; +} + /* Return mbuf pool ops name */ static const char * rte_mbuf_best_mempool_ops(void) { /* User defined mempool ops takes the priority */ - const char *best_ops = rte_eal_mbuf_default_mempool_ops(); + const char *best_ops = rte_mbuf_user_mempool_ops(); if (best_ops) return best_ops; diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index f958e3c..7feacc0 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1143,6 +1143,16 @@ const char* rte_mbuf_platform_mempool_ops(void); /** + * Get user command line configured pool ops name for mbuf + * + * @return + * returns user pool ops name. + */ + +const char* +rte_mbuf_user_mempool_ops(void); + +/** * Get the data room size of mbufs stored in a pktmbuf_pool * * The data room size is the amount of data that can be stored in a diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map index 9b53502..d4af497 100644 --- a/lib/librte_mbuf/rte_mbuf_version.map +++ b/lib/librte_mbuf/rte_mbuf_version.map @@ -41,6 +41,7 @@ DPDK_18.02 { rte_mbuf_platform_mempool_ops; rte_mbuf_register_platform_mempool_ops; + rte_mbuf_user_mempool_ops; rte_pktmbuf_pool_create_specific; } DPDK_16.11;
This patch add the user command line configured mempool ops name API to librte_mbuf and sends a deprecation notice to remove the similar API from eal. Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> --- doc/guides/rel_notes/deprecation.rst | 7 +++++++ lib/librte_mbuf/rte_mbuf.c | 8 +++++++- lib/librte_mbuf/rte_mbuf.h | 10 ++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) -- 2.7.4