From: Andrew Lunn <andrew@lunn.ch>
To: Salil Mehta <salil.mehta@huawei.com>
Cc: davem@davemloft.net, yisen.zhuang@huawei.com,
huangdaode@hisilicon.com, lipeng321@huawei.com,
mehta.salil.lnk@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxarm@huawei.com
Subject: Re: [PATCH V2 net-next 2/8] net: hns3: Add support of the HNAE3 framework
Date: Wed, 14 Jun 2017 03:32:23 +0200 [thread overview]
Message-ID: <20170614013223.GF23384@lunn.ch> (raw)
In-Reply-To: <20170613231035.494020-3-salil.mehta@huawei.com>
On Wed, Jun 14, 2017 at 12:10:29AM +0100, Salil Mehta wrote:
> This patch adds the support of the HNAE3 (Hisilicon Network
> Acceleration Engine 3) framework support to the HNS3 driver.
>
> Framework facilitates clients like ENET(HNS3 Ethernet Driver), RoCE
> and user-space Ethernet drivers (like ODP etc.) to register with HNAE3
> devices and their associated operations.
>
> Signed-off-by: Daode Huang <huangdaode@hisilicon.com>
> Signed-off-by: lipeng <lipeng321@huawei.com>
> Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
> Signed-off-by: Yisen Zhuang <yisen.zhuang@huawei.com>
> ---
> drivers/net/ethernet/hisilicon/hns3/hnae3.c | 305 +++++++++++++++++++
> drivers/net/ethernet/hisilicon/hns3/hnae3.h | 449 ++++++++++++++++++++++++++++
> 2 files changed, 754 insertions(+)
> create mode 100644 drivers/net/ethernet/hisilicon/hns3/hnae3.c
> create mode 100644 drivers/net/ethernet/hisilicon/hns3/hnae3.h
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.c b/drivers/net/ethernet/hisilicon/hns3/hnae3.c
> new file mode 100644
> index 0000000..f133e1d
> --- /dev/null
> +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.c
> @@ -0,0 +1,305 @@
> +/*
> + * Copyright (c) 2016-2017 Hisilicon Limited.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#include <linux/slab.h>
> +#include <linux/list.h>
> +#include <linux/spinlock.h>
> +
> +#include "hnae3.h"
> +
> +static LIST_HEAD(hnae3_ae_algo_list);
> +static LIST_HEAD(hnae3_client_list);
> +static LIST_HEAD(hnae3_ae_dev_list);
> +
> +static DEFINE_SPINLOCK(hnae3_list_ae_algo_lock);
> +static DEFINE_SPINLOCK(hnae3_list_client_lock);
> +static DEFINE_SPINLOCK(hnae3_list_ae_dev_lock);
> +
> +static void hnae3_list_add(spinlock_t *lock, struct list_head *node,
> + struct list_head *head)
> +{
> + unsigned long flags;
> +
> + spin_lock_irqsave(lock, flags);
> + list_add_tail_rcu(node, head);
> + spin_unlock_irqrestore(lock, flags);
> +}
> +
> +static void hnae3_list_del(spinlock_t *lock, struct list_head *node)
> +{
> + unsigned long flags;
> +
> + spin_lock_irqsave(lock, flags);
> + list_del_rcu(node);
> + spin_unlock_irqrestore(lock, flags);
> +}
You have these two _rcu operations here, and no others. I don't see
any rcu_read_lock(), or call_rcu(), etc.
I'm not an RCU expert, but this looks odd to me.
Andrew
next prev parent reply other threads:[~2017-06-14 1:32 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 23:10 [PATCH V2 net-next 0/8] Hisilicon Network Subsystem 3 Ethernet Driver Salil Mehta
2017-06-13 23:10 ` [PATCH V2 net-next 1/8] net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC Salil Mehta
2017-06-13 23:53 ` Stephen Hemminger
2017-06-17 10:47 ` Salil Mehta
2017-06-19 15:48 ` Stephen Hemminger
2017-07-22 23:57 ` Salil Mehta
2017-06-13 23:10 ` [PATCH V2 net-next 2/8] net: hns3: Add support of the HNAE3 framework Salil Mehta
2017-06-14 1:32 ` Andrew Lunn [this message]
2017-06-17 11:12 ` Salil Mehta
2017-06-14 1:37 ` Andrew Lunn
2017-06-17 11:18 ` Salil Mehta
2017-06-17 12:11 ` Andrew Lunn
2017-06-18 14:53 ` Andrew Lunn
2017-07-22 23:31 ` Salil Mehta
2017-06-13 23:10 ` [PATCH V2 net-next 3/8] net: hns3: Add HNS3 IMP(Integrated Mgmt Proc) Cmd Interface Support Salil Mehta
2017-06-13 23:10 ` [PATCH V2 net-next 4/8] net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support Salil Mehta
2017-06-13 23:10 ` [PATCH V2 net-next 5/8] net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver Salil Mehta
2017-06-13 23:10 ` [PATCH V2 net-next 6/8] net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC Salil Mehta
2017-06-13 23:46 ` Florian Fainelli
2017-06-17 10:40 ` Salil Mehta
2017-06-14 2:42 ` Andrew Lunn
2017-06-17 11:56 ` Salil Mehta
2017-06-14 2:55 ` Andrew Lunn
2017-06-17 11:56 ` Salil Mehta
2017-06-13 23:10 ` [PATCH V2 net-next 7/8] net: hns3: Add Ethtool support to HNS3 driver Salil Mehta
2017-06-13 23:55 ` Stephen Hemminger
2017-06-17 11:05 ` Salil Mehta
2017-06-14 2:19 ` Andrew Lunn
2017-06-17 11:20 ` Salil Mehta
2017-06-14 2:32 ` Andrew Lunn
2017-06-17 11:54 ` Salil Mehta
2017-06-13 23:10 ` [PATCH V2 net-next 8/8] net: hns3: Add HNS3 driver to kernel build framework & MAINTAINERS Salil Mehta
2017-06-14 10:52 ` kbuild test robot
2017-06-14 15:37 ` kbuild test robot
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=20170614013223.GF23384@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=huangdaode@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=mehta.salil.lnk@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=yisen.zhuang@huawei.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).