DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 18/24] net/bnxt: add support for flow filter ops
Date: Thu, 28 Sep 2017 17:05:23 +0100	[thread overview]
Message-ID: <82c7d78a-8af2-1523-2bab-4ca6e79e45b6@intel.com> (raw)
In-Reply-To: <20170928141329.73874-19-ajit.khaparde@broadcom.com>

On 9/28/2017 3:13 PM, Ajit Khaparde wrote:
> This patch adds support for flow validate/create/destroy/flush,
> ethertype add/del ops
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> --
> v1->v2: incorporate review comments.
> v2->v3: fix 32-bit builds.

<...>

> +static struct rte_flow *
> +bnxt_flow_create(struct rte_eth_dev *dev,
> +		  const struct rte_flow_attr *attr,
> +		  const struct rte_flow_item pattern[],
> +		  const struct rte_flow_action actions[],
> +		  struct rte_flow_error *error)
> +{
> +	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
> +	struct bnxt_filter_info *filter;
> +	struct bnxt_vnic_info *vnic;
> +	struct rte_flow *flow;
> +	unsigned int i;
> +	int ret = 0;
> +
> +	flow = rte_zmalloc("bnxt_flow", sizeof(struct rte_flow), 0);
> +	if (!flow) {
> +		rte_flow_error_set(error, ENOMEM,
> +				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
> +				   "Failed to allocate memory");
> +		return flow;
> +	}
> +
> +	ret = bnxt_flow_agrs_validate(attr, pattern, actions, error);
> +	if (ret != 0) {

Hi Ajit,

clang is giving following [1] build error here. Error log is quite
verbose, clang even suggests multiple solutions :)

[1]
.../dpdk/drivers/net/bnxt/bnxt_filter.c:923:6: error: variable 'filter'
is used uninitialized whenever 'if' condition is true
[-Werror,-Wsometimes-uninitialized]
        if (ret != 0) {
            ^~~~~~~~
.../dpdk/drivers/net/bnxt/bnxt_filter.c:965:23: note: uninitialized use
occurs here
        bnxt_free_filter(bp, filter);
                             ^~~~~~
.../dpdk/drivers/net/bnxt/bnxt_filter.c:923:2: note: remove the 'if' if
its condition is always false
        if (ret != 0) {
        ^~~~~~~~~~~~~~~
.../dpdk/drivers/net/bnxt/bnxt_filter.c:908:33: note: initialize the
variable 'filter' to silence this warning
        struct bnxt_filter_info *filter;
                                       ^
                                        = NULL

  reply	other threads:[~2017-09-28 16:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 14:13 [dpdk-dev] [PATCH v3 00/24] bnxt patchset Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 01/24] net/bnxt: fix HWRM_*() macros and locking Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 02/24] net/bnxt: use 64-bits of address for vlan_table Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 03/24] net/bnxt: fix an issue with group id calculation Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 04/24] net/bnxt: fix calculation of number of pools Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 05/24] net/bnxt: handle multi queue mode properly Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 06/24] net/bnxt: fix rx handling and buffer allocation logic Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 07/24] net/bnxt: fix an issue with broadcast traffic Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 08/24] net/bnxt: fix usage of ETH_VMDQ_* flags Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 09/24] net/bnxt: set checksum offload flags correctly Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 10/24] net/bnxt: update status of Rx IP/L4 CKSUM Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 11/24] net/bnxt: add support for xstats get by id Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 12/24] net/bnxt: fix config rss update Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 13/24] net/bnxt: set the hash_key_size Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 14/24] net/bnxt: add support for rx_queue_count Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 15/24] net/bnxt: add support for rx_descriptor_status Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 16/24] net/bnxt: add support for tx_descriptor_status Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 17/24] net/bnxt: add new HWRM structs to support flow filtering Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 18/24] net/bnxt: add support for flow filter ops Ajit Khaparde
2017-09-28 16:05   ` Ferruh Yigit [this message]
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 19/24] doc: update release notes Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 20/24] net/bnxt: fix per queue stats display in xstats Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 21/24] net/bnxt: prevent interrupt handler from accessing freed memory Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 22/24] net/bnxt: add dev_supported_ptypes_get dev_op Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 23/24] net/bnxt: add support for get/set EEPROM Ajit Khaparde
2017-09-28 14:13 ` [dpdk-dev] [PATCH v3 24/24] net/bnxt: add support for rx_queue_intr_enable/disable APIs Ajit Khaparde

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=82c7d78a-8af2-1523-2bab-4ca6e79e45b6@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    /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).