From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>,
jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, deepak.k.jain@intel.com,
Tomasz Kulasek <tomaszx.kulasek@intel.com>,
stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix assignment of enum values
Date: Fri, 22 Sep 2017 17:48:29 +0100 [thread overview]
Message-ID: <a8f428ea-9ca5-761a-912d-ab4787cd1bca@intel.com> (raw)
In-Reply-To: <20170922123625.4896-1-michalx.k.jastrzebski@intel.com>
On 9/22/2017 1:36 PM, Michal Jastrzebski wrote:
> From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
>
> mixed_enums: Mixing enum types enum i40e_vsi_type and enum
> virtchnl_vsi_type for type
>
> Coverity issue 158651
> Fixes: a58860f68929 ("net/i40e/base: use new virtchnl header file")
> Cc: jingjing.wu@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
> ---
> drivers/net/i40e/i40e_ethdev_vf.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
> index 73c315a..a8d2740 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -1295,7 +1295,15 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,
> if (hw->mac.type == I40E_MAC_X722_VF)
> vf->flags = I40E_FLAG_RSS_AQ_CAPABLE;
> vf->vsi.vsi_id = vf->vsi_res->vsi_id;
> - vf->vsi.type = (enum i40e_vsi_type)vf->vsi_res->vsi_type;
> +
> + switch (vf->vsi_res->vsi_type) {
> + case VIRTCHNL_VSI_SRIOV:
> + vf->vsi.type = I40E_VSI_SRIOV;
> + break;
> + default:
> + vf->vsi.type = I40E_VSI_TYPE_UNKNOWN;
This changes the behavior.
Previously:
vsi_type == VIRTCHNL_VSI_TYPE_INVALID ? type = I40E_VSI_MAIN
Now:
vsi_type == VIRTCHNL_VSI_TYPE_INVALID ? type = I40E_VSI_TYPE_UNKNOWN
> + break;
> + }
> vf->vsi.nb_qps = vf->vsi_res->num_queue_pairs;
> vf->vsi.adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
>
>
next prev parent reply other threads:[~2017-09-22 16:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 12:36 Michal Jastrzebski
2017-09-22 16:48 ` Ferruh Yigit [this message]
2017-09-23 2:05 ` Wu, Jingjing
2017-09-25 13:08 ` Ferruh Yigit
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=a8f428ea-9ca5-761a-912d-ab4787cd1bca@intel.com \
--to=ferruh.yigit@intel.com \
--cc=beilei.xing@intel.com \
--cc=deepak.k.jain@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=michalx.k.jastrzebski@intel.com \
--cc=stable@dpdk.org \
--cc=tomaszx.kulasek@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).