From: "Xu, Rosen" <rosen.xu@intel.com>
To: "Zhang, Tianfei" <tianfei.zhang@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] raw/ifpga/base: release eth group devices
Date: Tue, 1 Dec 2020 08:38:18 +0000 [thread overview]
Message-ID: <BYAPR11MB29014FC3FB09C2E542DB71A189F40@BYAPR11MB2901.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1606288756-24705-1-git-send-email-tianfei.zhang@intel.com>
Hi,
> -----Original Message-----
> From: Zhang, Tianfei <tianfei.zhang@intel.com>
> Sent: Wednesday, November 25, 2020 15:19
> To: dev@dpdk.org; Xu, Rosen <rosen.xu@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: Zhang, Tianfei <tianfei.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH] raw/ifpga/base: release eth group devices
>
> From: Tianfei zhang <tianfei.zhang@intel.com>
>
> Release the eth group resource in fme_eth_group_uinit().
>
> Fixes: 8a256bef32 ("raw/ifpga/base: add eth group driver")
> Cc: stable@dpdk.org
>
> Signed-off-by: Tianfei zhang <tianfei.zhang@intel.com>
> ---
> drivers/raw/ifpga/base/ifpga_fme.c | 20 +++++++++++++++++++-
> 1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/raw/ifpga/base/ifpga_fme.c
> b/drivers/raw/ifpga/base/ifpga_fme.c
> index f29ff31..0a7d3c2 100644
> --- a/drivers/raw/ifpga/base/ifpga_fme.c
> +++ b/drivers/raw/ifpga/base/ifpga_fme.c
> @@ -1288,9 +1288,27 @@ static int fme_eth_group_init(struct ifpga_feature
> *feature)
> return 0;
> }
>
> +static unsigned char fme_eth_group_get_gid(void *base) {
> + struct eth_group_info_reg info;
> +
> + info.info = opae_readq((u8 *)base + ETH_GROUP_INFO);
> +
> + return info.group_id;
> +}
> +
> static void fme_eth_group_uinit(struct ifpga_feature *feature) {
> - UNUSED(feature);
> + struct ifpga_fme_hw *fme = (struct ifpga_fme_hw *)feature->parent;
> + struct eth_group_device *dev;
> + unsigned char group_id = fme_eth_group_get_gid(feature->addr);
> +
> + if (group_id >= MAX_ETH_GROUP_DEVICES)
> + return;
> +
> + dev = fme->eth_dev[group_id];
> + if (dev)
> + eth_group_release(dev);
> }
>
> struct ifpga_feature_ops fme_eth_group_ops = {
> --
> 1.8.3.1
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
parent reply other threads:[~2020-12-01 8:38 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1606288756-24705-1-git-send-email-tianfei.zhang@intel.com>]
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=BYAPR11MB29014FC3FB09C2E542DB71A189F40@BYAPR11MB2901.namprd11.prod.outlook.com \
--to=rosen.xu@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=tianfei.zhang@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).