DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Qi Zhang <qi.z.zhang@intel.com>,
	wenzhuo.lu@intel.com, qiming.yang@intel.com
Cc: paul.m.stillwell.jr@intel.com, dev@dpdk.org, bruce.richardson@intel.com
Subject: Re: [dpdk-dev] [PATCH 6/7] net/ice/base: add flow module
Date: Wed, 16 Jan 2019 12:14:56 +0000	[thread overview]
Message-ID: <9d5993d2-cbd7-7726-a543-4c5517de1ee6@intel.com> (raw)
In-Reply-To: <20190115125658.15421-7-qi.z.zhang@intel.com>

On 1/15/2019 12:56 PM, Qi Zhang wrote:
> Add the module that implemented flow abstraction that base on
> flexible pipeline.
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>

<...>

> +/**
> + * ice_flow_find_entry - look for a flow entry using its unique ID
> + * @hw: pointer to the hw struct
> + * @blk: classification stage
> + * @entry_id: unique ID to identify this flow entry
> + *
> + * This function looks for the flow entry with the specified unique ID in all
> + * flow profiles of the specified classification stage. If the entry is found,
> + * and it returns the handle to the flow entry. Otherwise, it returns
> + * ICE_FLOW_ENTRY_ID_INVAL.
> + */
> +u64 ice_flow_find_entry(struct ice_hw *hw, enum ice_block blk, u64 entry_id)
> +{
> +	struct ice_flow_entry *found = NULL;
> +	struct ice_flow_prof *p;
> +
> +	ice_acquire_lock(&hw->fl_profs_locks[blk]);
> +
> +	LIST_FOR_EACH_ENTRY(p, &hw->fl_profs[blk], ice_flow_prof, l_entry) {
> +		struct ice_flow_entry *e;
> +
> +		ice_acquire_lock(&p->entries_lock);
> +		LIST_FOR_EACH_ENTRY(e, &p->entries, ice_flow_entry, l_entry)
> +			if (e->id == entry_id) {
> +				found = e;
> +				break;
> +			}
> +		ice_release_lock(&p->entries_lock);
> +
> +		if (found)
> +			break;
> +	}
> +
> +	ice_release_lock(&hw->fl_profs_locks[blk]);
> +
> +	return found ? ICE_FLOW_ENTRY_HNDL(found) : ICE_FLOW_ENTRY_HANDLE_INVAL;

ICE_FLOW_ENTRY_HNDL macro is causing build error for 32-bits build [1], there
are a few more usage of this macro, all are causing same issue:

[1]
Building i686-native-linuxapp-gcc ...
In file included from .../drivers/net/ice/base/ice_flow.c:6:
.../drivers/net/ice/base/ice_flow.c: In function ‘ice_flow_find_entry’:
.../drivers/net/ice/base/ice_flow.h:242:33: error: cast from pointer to integer
of different size [-Werror=pointer-to-int-cast]
 #define ICE_FLOW_ENTRY_HNDL(e) ((u64)e)
                                 ^
.../drivers/net/ice/base/ice_flow.c:1247:17: note: in expansion of macro
‘ICE_FLOW_ENTRY_HNDL’
  return found ? ICE_FLOW_ENTRY_HNDL(found) : ICE_FLOW_ENTRY_HANDLE_INVAL;
                 ^~~~~~~~~~~~~~~~~~~

<...>

> +/**
> + * ice_flow_rem_entry - Remove a flow entry
> + * @hw: pointer to the hw struct
> + * @entry_h: handle to the flow entry to be removed
> + */
> +enum ice_status ice_flow_rem_entry(struct ice_hw *hw, u64 entry_h)
> +{
> +	struct ice_flow_entry *entry;
> +	struct ice_flow_prof *prof;
> +	enum ice_status status;
> +
> +	if (entry_h == ICE_FLOW_ENTRY_HANDLE_INVAL)
> +		return ICE_ERR_PARAM;
> +
> +	entry = ICE_FLOW_ENTRY_PTR(entry_h);

causing build error for 32-bits [2]:

[2]
.../drivers/net/ice/base/ice_flow.c: In function ‘ice_flow_rem_entry’:
.../drivers/net/ice/base/ice_flow.h:243:32: error: cast to pointer from integer
of different size [-Werror=int-to-pointer-cast]
 #define ICE_FLOW_ENTRY_PTR(h) ((struct ice_flow_entry *)(h))
                                ^
.../drivers/net/ice/base/ice_flow.c:1350:10: note: in expansion of macro
‘ICE_FLOW_ENTRY_PTR’
  entry = ICE_FLOW_ENTRY_PTR(entry_h);
          ^~~~~~~~~~~~~~~~~~

  reply	other threads:[~2019-01-16 12:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 12:56 [dpdk-dev] [PATCH 0/7] net/ice: update share code Qi Zhang
2019-01-15 12:56 ` [dpdk-dev] [PATCH 1/7] net/ice/base: code clean Qi Zhang
2019-01-15 12:56 ` [dpdk-dev] [PATCH 2/7] net/ice/base: add API to support resource allocate Qi Zhang
2019-01-15 12:56 ` [dpdk-dev] [PATCH 3/7] net/ice/base: add package download related data structure Qi Zhang
2019-01-15 12:56 ` [dpdk-dev] [PATCH 4/7] net/ice/base: add some help macros Qi Zhang
2019-01-15 12:56 ` [dpdk-dev] [PATCH 5/7] net/ice/base: add flexible pipeline module Qi Zhang
2019-01-15 12:56 ` [dpdk-dev] [PATCH 6/7] net/ice/base: add flow module Qi Zhang
2019-01-16 12:14   ` Ferruh Yigit [this message]
2019-01-15 12:56 ` [dpdk-dev] [PATCH 7/7] net/ice/base: free flow profile entries Qi Zhang
2019-01-16 12:15   ` Ferruh Yigit
2019-01-16  5:05 ` [dpdk-dev] [PATCH 0/7] net/ice: update share code Lu, Wenzhuo
2019-01-16 12:16 ` Ferruh Yigit
2019-01-16 14:13 ` [dpdk-dev] [PATCH v2 " Qi Zhang
2019-01-16 14:13   ` [dpdk-dev] [PATCH v2 1/7] net/ice/base: code clean Qi Zhang
2019-01-16 14:13   ` [dpdk-dev] [PATCH v2 2/7] net/ice/base: add API to support resource allocate Qi Zhang
2019-01-16 14:13   ` [dpdk-dev] [PATCH v2 3/7] net/ice/base: add package download related data structure Qi Zhang
2019-01-16 14:13   ` [dpdk-dev] [PATCH v2 4/7] net/ice/base: add some help macros Qi Zhang
2019-01-16 14:13   ` [dpdk-dev] [PATCH v2 5/7] net/ice/base: add flexible pipeline module Qi Zhang
2019-01-16 14:13   ` [dpdk-dev] [PATCH v2 6/7] net/ice/base: add flow module Qi Zhang
2019-01-16 14:13   ` [dpdk-dev] [PATCH v2 7/7] net/ice/base: free flow profile entries Qi Zhang
2019-01-17 13:31   ` [dpdk-dev] [PATCH v2 0/7] net/ice: update share code Zhang, Qi Z

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=9d5993d2-cbd7-7726-a543-4c5517de1ee6@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=paul.m.stillwell.jr@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=wenzhuo.lu@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).