Message ID | 1508432048-2265-7-git-send-email-antonio.fischetti@intel.com |
---|---|
State | Accepted |
Headers | show |
Series | netdev-dpdk: Fix mempool management and other cleanup. | expand |
>From: Fischetti, Antonio >Sent: Thursday, October 19, 2017 5:54 PM >To: dev@openvswitch.org >Cc: Kavanagh, Mark B <mark.b.kavanagh@intel.com>; Darrell Ball ><dlu998@gmail.com>; Loftus, Ciara <ciara.loftus@intel.com>; Kevin Traynor ><ktraynor@redhat.com>; Aaron Conole <aconole@redhat.com>; Fischetti, Antonio ><antonio.fischetti@intel.com> >Subject: [PATCH v8 6/6] netdev-dpdk: Rename dpdk_mp_put as dpdk_mp_free. > >For readability purposes dpdk_mp_put is renamed as dpdk_mp_free. > >CC: Mark B Kavanagh <mark.b.kavanagh@intel.com> >CC: Darrell Ball <dlu998@gmail.com> >CC: Ciara Loftus <ciara.loftus@intel.com> >CC: Kevin Traynor <ktraynor@redhat.com> >CC: Aaron Conole <aconole@redhat.com> >Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com> >--- Hi Antonio, I already Acked this patch in v6 (it was patch 4/5 of that series) - in future, please carry forward Acks ;) Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com> Cheers, Mark > lib/netdev-dpdk.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c >index bf143e0..82652f0 100644 >--- a/lib/netdev-dpdk.c >+++ b/lib/netdev-dpdk.c >@@ -602,8 +602,9 @@ dpdk_mp_get(struct netdev_dpdk *dev, int mtu, bool >*mp_exists) > return dmp; > } > >+/* Release an existing mempool. */ > static void >-dpdk_mp_put(struct dpdk_mp *dmp) >+dpdk_mp_free(struct dpdk_mp *dmp) > { > char *mp_name; > >@@ -649,7 +650,8 @@ netdev_dpdk_mempool_configure(struct netdev_dpdk *dev) > dev->max_packet_len = MTU_TO_FRAME_LEN(dev->mtu); > return EEXIST; > } else { >- dpdk_mp_put(dev->dpdk_mp); >+ /* A new mempool was created, release the previous one. */ >+ dpdk_mp_free(dev->dpdk_mp); > dev->dpdk_mp = mp; > dev->mtu = dev->requested_mtu; > dev->socket_id = dev->requested_socket_id; >@@ -1094,7 +1096,7 @@ common_destruct(struct netdev_dpdk *dev) > OVS_EXCLUDED(dev->mutex) > { > rte_free(dev->tx_q); >- dpdk_mp_put(dev->dpdk_mp); >+ dpdk_mp_free(dev->dpdk_mp); > > ovs_list_remove(&dev->list_node); > free(ovsrcu_get_protected(struct ingress_policer *, >-- >2.4.11
On 10/19/2017 05:54 PM, antonio.fischetti@intel.com wrote: > For readability purposes dpdk_mp_put is renamed as dpdk_mp_free. > > CC: Mark B Kavanagh <mark.b.kavanagh@intel.com> > CC: Darrell Ball <dlu998@gmail.com> > CC: Ciara Loftus <ciara.loftus@intel.com> > CC: Kevin Traynor <ktraynor@redhat.com> > CC: Aaron Conole <aconole@redhat.com> > Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com> > --- Acked-by: Kevin Traynor <ktraynor@redhat.com> > lib/netdev-dpdk.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index bf143e0..82652f0 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -602,8 +602,9 @@ dpdk_mp_get(struct netdev_dpdk *dev, int mtu, bool *mp_exists) > return dmp; > } > > +/* Release an existing mempool. */ > static void > -dpdk_mp_put(struct dpdk_mp *dmp) > +dpdk_mp_free(struct dpdk_mp *dmp) > { > char *mp_name; > > @@ -649,7 +650,8 @@ netdev_dpdk_mempool_configure(struct netdev_dpdk *dev) > dev->max_packet_len = MTU_TO_FRAME_LEN(dev->mtu); > return EEXIST; > } else { > - dpdk_mp_put(dev->dpdk_mp); > + /* A new mempool was created, release the previous one. */ > + dpdk_mp_free(dev->dpdk_mp); > dev->dpdk_mp = mp; > dev->mtu = dev->requested_mtu; > dev->socket_id = dev->requested_socket_id; > @@ -1094,7 +1096,7 @@ common_destruct(struct netdev_dpdk *dev) > OVS_EXCLUDED(dev->mutex) > { > rte_free(dev->tx_q); > - dpdk_mp_put(dev->dpdk_mp); > + dpdk_mp_free(dev->dpdk_mp); > > ovs_list_remove(&dev->list_node); > free(ovsrcu_get_protected(struct ingress_policer *, >
> -----Original Message----- > From: Kavanagh, Mark B > Sent: Friday, October 20, 2017 9:44 AM > To: Fischetti, Antonio <antonio.fischetti@intel.com>; dev@openvswitch.org > Cc: Darrell Ball <dlu998@gmail.com>; Loftus, Ciara <ciara.loftus@intel.com>; > Kevin Traynor <ktraynor@redhat.com>; Aaron Conole <aconole@redhat.com> > Subject: RE: [PATCH v8 6/6] netdev-dpdk: Rename dpdk_mp_put as dpdk_mp_free. > > >From: Fischetti, Antonio > >Sent: Thursday, October 19, 2017 5:54 PM > >To: dev@openvswitch.org > >Cc: Kavanagh, Mark B <mark.b.kavanagh@intel.com>; Darrell Ball > ><dlu998@gmail.com>; Loftus, Ciara <ciara.loftus@intel.com>; Kevin Traynor > ><ktraynor@redhat.com>; Aaron Conole <aconole@redhat.com>; Fischetti, Antonio > ><antonio.fischetti@intel.com> > >Subject: [PATCH v8 6/6] netdev-dpdk: Rename dpdk_mp_put as dpdk_mp_free. > > > >For readability purposes dpdk_mp_put is renamed as dpdk_mp_free. > > > >CC: Mark B Kavanagh <mark.b.kavanagh@intel.com> > >CC: Darrell Ball <dlu998@gmail.com> > >CC: Ciara Loftus <ciara.loftus@intel.com> > >CC: Kevin Traynor <ktraynor@redhat.com> > >CC: Aaron Conole <aconole@redhat.com> > >Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com> > >--- > > > Hi Antonio, > > I already Acked this patch in v6 (it was patch 4/5 of that series) - in future, > please carry forward Acks ;) [Antonio] My bad, sorry for that. > > Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com> > > Cheers, > Mark > >
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index bf143e0..82652f0 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -602,8 +602,9 @@ dpdk_mp_get(struct netdev_dpdk *dev, int mtu, bool *mp_exists) return dmp; } +/* Release an existing mempool. */ static void -dpdk_mp_put(struct dpdk_mp *dmp) +dpdk_mp_free(struct dpdk_mp *dmp) { char *mp_name; @@ -649,7 +650,8 @@ netdev_dpdk_mempool_configure(struct netdev_dpdk *dev) dev->max_packet_len = MTU_TO_FRAME_LEN(dev->mtu); return EEXIST; } else { - dpdk_mp_put(dev->dpdk_mp); + /* A new mempool was created, release the previous one. */ + dpdk_mp_free(dev->dpdk_mp); dev->dpdk_mp = mp; dev->mtu = dev->requested_mtu; dev->socket_id = dev->requested_socket_id; @@ -1094,7 +1096,7 @@ common_destruct(struct netdev_dpdk *dev) OVS_EXCLUDED(dev->mutex) { rte_free(dev->tx_q); - dpdk_mp_put(dev->dpdk_mp); + dpdk_mp_free(dev->dpdk_mp); ovs_list_remove(&dev->list_node); free(ovsrcu_get_protected(struct ingress_policer *,
For readability purposes dpdk_mp_put is renamed as dpdk_mp_free. CC: Mark B Kavanagh <mark.b.kavanagh@intel.com> CC: Darrell Ball <dlu998@gmail.com> CC: Ciara Loftus <ciara.loftus@intel.com> CC: Kevin Traynor <ktraynor@redhat.com> CC: Aaron Conole <aconole@redhat.com> Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com> --- lib/netdev-dpdk.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)