> -----Original Message-----
> From: Darrell Ball [mailto:db...@vmware.com]
> Sent: Tuesday, September 26, 2017 9:22 PM
> To: Fischetti, Antonio <antonio.fische...@intel.com>; d...@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH 3/4] netdev-dpdk: log an err message when a
> mempool name is empty.
> 
> 
> 
> On 9/26/17, 8:06 AM, "ovs-dev-boun...@openvswitch.org on behalf of
> antonio.fische...@intel.com" <ovs-dev-boun...@openvswitch.org on behalf of
> antonio.fische...@intel.com> wrote:
> 
>     Log an error message when the creation of a name for a
>     new mempool fails.
> 
>     CC: Ciara Loftus <ciara.lof...@intel.com>
>     CC: Kevin Traynor <ktray...@redhat.com>
>     CC: Aaron Conole <acon...@redhat.com>
>     Signed-off-by: Antonio Fischetti <antonio.fische...@intel.com>
>     ---
>      lib/netdev-dpdk.c | 3 +++
>      1 file changed, 3 insertions(+)
> 
>     diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>     index f3f42ee..7c673ec 100644
>     --- a/lib/netdev-dpdk.c
>     +++ b/lib/netdev-dpdk.c
>     @@ -502,6 +502,9 @@ dpdk_mp_name(struct dpdk_mp *dmp)
>          int ret = snprintf(mp_name, RTE_MEMPOOL_NAMESIZE, "ovs_%x_%d_%u",
>                             h, dmp->mtu, dmp->mp_size);
>          if (ret < 0 || ret >= RTE_MEMPOOL_NAMESIZE) {
>     +        VLOG_ERR("Failed to generate a mempool name for \"%s\". "
>     +                "Hash:0x%x, mtu:%d, mbufs:%u",
>     +                dmp->if_name, h, dmp->mtu, dmp->mp_size);
> 
> [Darrell] “Unlikely” to fail but this could be an ovs_assert(…)

[Antonio] ok will replace with
     ovs_assert(ret >= 0 && ret < RTE_MEMPOOL_NAMESIZE);

> 
> 
>              return NULL;
>          }
>          return mp_name;
>     --
>     2.4.11
> 
>     _______________________________________________
>     dev mailing list
>     d...@openvswitch.org
>     https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__mail.openvswitch.org_mailman_listinfo_ovs-
> 2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-
> uZnsw&m=VXc6b9RFgB9FaMDL4JevWOtvj0gTpvDJYBS30fvVj8Y&s=Eeo-
> qAFITbCVhSWvMvxHDN4IzLsDEIYI1MmIsoUtDOE&e=
> 

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to