From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Veerasenareddy Burru <vburru@marvell.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<aayarekar@marvell.com>, <sedara@marvell.com>,
<sburla@marvell.com>, <linux-doc@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v3 5/7] octeon_ep: support asynchronous notifications
Date: Wed, 15 Feb 2023 17:36:07 +0100 [thread overview]
Message-ID: <Y+0J94sowllCe5Gs@boxer> (raw)
In-Reply-To: <20230214051422.13705-6-vburru@marvell.com>
On Mon, Feb 13, 2023 at 09:14:20PM -0800, Veerasenareddy Burru wrote:
> Add asynchronous notification support to the control mailbox.
>
> Signed-off-by: Veerasenareddy Burru <vburru@marvell.com>
> Signed-off-by: Abhijit Ayarekar <aayarekar@marvell.com>
> ---
> v2 -> v3:
> * no change
>
> v1 -> v2:
> * no change
>
> .../marvell/octeon_ep/octep_ctrl_net.c | 29 +++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c b/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c
> index 715af1891d0d..80bcd6cd4732 100644
> --- a/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c
> +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c
> @@ -279,6 +279,33 @@ static int process_mbox_resp(struct octep_device *oct,
> return 0;
> }
>
> +static int process_mbox_notify(struct octep_device *oct,
void
> + struct octep_ctrl_mbox_msg *msg)
> +{
> + struct octep_ctrl_net_f2h_req *req;
> + struct net_device *netdev = oct->netdev;
RCT
> +
> + req = (struct octep_ctrl_net_f2h_req *)msg->sg_list[0].msg;
> + switch (req->hdr.s.cmd) {
> + case OCTEP_CTRL_NET_F2H_CMD_LINK_STATUS:
> + if (netif_running(netdev)) {
> + if (req->link.state) {
> + dev_info(&oct->pdev->dev, "netif_carrier_on\n");
> + netif_carrier_on(netdev);
> + } else {
> + dev_info(&oct->pdev->dev, "netif_carrier_off\n");
> + netif_carrier_off(netdev);
> + }
> + }
> + break;
> + default:
> + pr_info("Unknown mbox req : %u\n", req->hdr.s.cmd);
> + break;
> + }
> +
> + return 0;
> +}
> +
> int octep_ctrl_net_recv_fw_messages(struct octep_device *oct)
> {
> static u16 msg_sz = sizeof(union octep_ctrl_net_max_data);
> @@ -303,6 +330,8 @@ int octep_ctrl_net_recv_fw_messages(struct octep_device *oct)
> process_mbox_req(oct, &msg);
> else if (msg.hdr.s.flags & OCTEP_CTRL_MBOX_MSG_HDR_FLAG_RESP)
> process_mbox_resp(oct, &msg);
> + else if (msg.hdr.s.flags & OCTEP_CTRL_MBOX_MSG_HDR_FLAG_NOTIFY)
> + process_mbox_notify(oct, &msg);
> }
>
> return 0;
> --
> 2.36.0
>
next prev parent reply other threads:[~2023-02-15 16:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 5:14 [PATCH net-next v3 0/7] octeon_ep: deferred probe and mailbox Veerasenareddy Burru
2023-02-14 5:14 ` [PATCH net-next v3 1/7] octeon_ep: defer probe if firmware not ready Veerasenareddy Burru
2023-02-14 17:32 ` Maciej Fijalkowski
2023-02-15 11:43 ` Leon Romanovsky
2023-02-17 8:21 ` [EXT] " Veerasenareddy Burru
2023-02-14 5:14 ` [PATCH net-next v3 2/7] octeon_ep: poll for control messages Veerasenareddy Burru
2023-02-14 17:42 ` Maciej Fijalkowski
2023-02-17 8:25 ` [EXT] " Veerasenareddy Burru
2023-02-14 5:14 ` [PATCH net-next v3 3/7] octeon_ep: control mailbox for multiple PFs Veerasenareddy Burru
2023-02-14 17:49 ` Maciej Fijalkowski
2023-02-17 17:15 ` [EXT] " Veerasenareddy Burru
2023-02-14 5:14 ` [PATCH net-next v3 4/7] octeon_ep: enhance control mailbox for VF support Veerasenareddy Burru
2023-02-15 15:55 ` Maciej Fijalkowski
2023-03-22 7:24 ` [EXT] " Veerasenareddy Burru
2023-02-14 5:14 ` [PATCH net-next v3 5/7] octeon_ep: support asynchronous notifications Veerasenareddy Burru
2023-02-15 16:36 ` Maciej Fijalkowski [this message]
2023-03-22 7:26 ` [EXT] " Veerasenareddy Burru
2023-02-14 5:14 ` [PATCH net-next v3 6/7] octeon_ep: control mbox support for VF stats and link info Veerasenareddy Burru
2023-02-14 5:14 ` [PATCH net-next v3 7/7] octeon_ep: add heartbeat monitor Veerasenareddy Burru
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=Y+0J94sowllCe5Gs@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=aayarekar@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sburla@marvell.com \
--cc=sedara@marvell.com \
--cc=vburru@marvell.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).