From: "Li, Xiaoyun" <xiaoyun.li@intel.com>
To: "T D, Shashank" <shashank.t.d@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] examples/tep_termination: resolve unchecked return value
Date: Wed, 27 Nov 2019 13:11:35 +0000 [thread overview]
Message-ID: <B9E724F4CB7543449049E7AE7669D82F0B32B205@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20191127120341.2845-1-shashank.t.d@intel.com>
> -----Original Message-----
> From: T D, Shashank
> Sent: Wednesday, November 27, 2019 12:04
> To: dev@dpdk.org
> Cc: Li, Xiaoyun <xiaoyun.li@intel.com>
> Subject: [PATCH v2] examples/tep_termination: resolve unchecked return value
>
> This patch checked the return value of rte_eth_dev_info_get function.
> Coverity issue: 349922
>
> Signed-off-by: Shashank T D <shashank.t.d@intel.com>
> ---
> examples/tep_termination/vxlan_setup.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/examples/tep_termination/vxlan_setup.c
> b/examples/tep_termination/vxlan_setup.c
> index eca119a72..384b3167e 100644
> --- a/examples/tep_termination/vxlan_setup.c
> +++ b/examples/tep_termination/vxlan_setup.c
> @@ -195,7 +195,12 @@ vxlan_port_init(uint16_t port, struct rte_mempool
> *mbuf_pool)
>
> if (tso_segsz != 0) {
> struct rte_eth_dev_info dev_info;
> - rte_eth_dev_info_get(port, &dev_info);
> + retval = rte_eth_dev_info_get(port, &dev_info);
> + if (retval != 0)
> + rte_exit(EXIT_FAILURE,
> +
> "Error during getting device (port %u) info: %s\n",
> + port, strerror(-retval));
> +
> if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO)
> == 0)
> RTE_LOG(WARNING, PORT,
> "hardware TSO offload is not supported\n");
> --
> 2.17.1
Acked-by: Xiaoyun Li <Xiaoyun.li@intel.com>
prev parent reply other threads:[~2019-11-27 13:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 10:33 [dpdk-dev] [PATCH] " Shashank T D
2019-11-27 10:59 ` Li, Xiaoyun
2019-11-27 12:03 ` [dpdk-dev] [PATCH v2] " Shashank T D
2019-11-27 13:11 ` Li, Xiaoyun [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B9E724F4CB7543449049E7AE7669D82F0B32B205@SHSMSX101.ccr.corp.intel.com \
--to=xiaoyun.li@intel.com \
--cc=dev@dpdk.org \
--cc=shashank.t.d@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).