From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: motomu <motomu@hongo.wide.ad.jp>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] drivers/net/e1000/igb_ethdev.c:fix eth_igb_add_del_flex_filter
Date: Mon, 13 Jul 2015 09:00:42 +0000 [thread overview]
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC0909CF99FA@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1432484252-3517-1-git-send-email-motomu@hongo.wide.ad.jp>
Hi Motomu,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of motomu
> Sent: Monday, May 25, 2015 12:18 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] drivers/net/e1000/igb_ethdev.c:fix
> eth_igb_add_del_flex_filter
>
> From: Motomu Utsumi <motomu@hongo.wide.ad.jp>
>
> in add flexfiler it always write to same register address, so when try to adapt
> some filters only last one is enabled.
I don't understand what the " same register address " means. So, I don't think it's necessary to change the code. Would you like to give more details? Thanks.
Wenzhuo
> I substitute value based on based on flex_filter->index for reg_off.
>
> in del flexfilter, it delete target filter and also delete first filter because of similar
> reason.
> I substitute value based on based on it->index for reg_off.
>
> ---
> drivers/net/e1000/igb_ethdev.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
> index e4b370d..5a7f50a 100644
> --- a/drivers/net/e1000/igb_ethdev.c
> +++ b/drivers/net/e1000/igb_ethdev.c
> @@ -2781,10 +2781,6 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
> }
>
> wufc = E1000_READ_REG(hw, E1000_WUFC);
> - if (flex_filter->index < E1000_MAX_FHFT)
> - reg_off = E1000_FHFT(flex_filter->index);
> - else
> - reg_off = E1000_FHFT_EXT(flex_filter->index -
> E1000_MAX_FHFT);
>
> if (add) {
> if (eth_igb_flex_filter_lookup(&filter_info->flex_list,
> @@ -2813,6 +2809,10 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
> rte_free(flex_filter);
> return -ENOSYS;
> }
> + if (flex_filter->index < E1000_MAX_FHFT)
> + reg_off = E1000_FHFT(flex_filter->index);
> + else
> + reg_off = E1000_FHFT_EXT(flex_filter->index - E1000_MAX_FHFT);
>
> E1000_WRITE_REG(hw, E1000_WUFC, wufc |
> E1000_WUFC_FLEX_HQ |
> (E1000_WUFC_FLX0 << flex_filter->index));
> @@ -2841,6 +2841,10 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
> rte_free(flex_filter);
> return -ENOENT;
> }
> + if (it->index < E1000_MAX_FHFT)
> + reg_off = E1000_FHFT(it->index);
> + else
> + reg_off = E1000_FHFT_EXT(it->index - E1000_MAX_FHFT);
>
> for (i = 0; i < E1000_FHFT_SIZE_IN_DWD; i++)
> E1000_WRITE_REG(hw, reg_off + i * sizeof(uint32_t), 0);
> --
> 1.8.3.1
prev parent reply other threads:[~2015-07-13 9:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-24 16:17 motomu
2015-07-10 14:48 ` Thomas Monjalon
2015-07-13 9:00 ` Lu, Wenzhuo [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=6A0DE07E22DDAD4C9103DF62FEBC0909CF99FA@shsmsx102.ccr.corp.intel.com \
--to=wenzhuo.lu@intel.com \
--cc=dev@dpdk.org \
--cc=motomu@hongo.wide.ad.jp \
/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).