DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dai, Wei" <wei.dai@intel.com>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Lu, Wenzhuo" <wenzhuo.lu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Wang, Liang-min" <liang-min.wang@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] net/e1000: fix mailbox interrupt handler
Date: Fri, 12 Jan 2018 02:32:44 +0000	[thread overview]
Message-ID: <49759EB36A64CF4892C1AFEC9231E8D66CF219AC@PGSMSX112.gar.corp.intel.com> (raw)
In-Reply-To: <1514406150-17517-2-git-send-email-qi.z.zhang@intel.com>

> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Thursday, December 28, 2017 4:23 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; Wang, Liang-min
> <liang-min.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH 2/2] net/e1000: fix mailbox interrupt handler
> 
> Mailbox interrupt handler only take care of the PF reset notification, for
> other message mbx->ops.read should not be called since it get chance to
> break the foreground VF to PF communication.
> 
> Fixes: 316f4f1adc2e ("net/igb: support VF mailbox interrupt for link
> up/down")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>

> ---
>  drivers/net/e1000/igb_ethdev.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/e1000/igb_ethdev.c
> b/drivers/net/e1000/igb_ethdev.c index fdc139f..0d8bc49 100644
> --- a/drivers/net/e1000/igb_ethdev.c
> +++ b/drivers/net/e1000/igb_ethdev.c
> @@ -2970,13 +2970,17 @@ void igbvf_mbx_process(struct rte_eth_dev
> *dev)
>  	struct e1000_mbx_info *mbx = &hw->mbx;
>  	u32 in_msg = 0;
> 
> -	if (mbx->ops.read(hw, &in_msg, 1, 0))
> -		return;
> +	/* peek the message first */
> +	in_msg = E1000_READ_REG(hw, E1000_VMBMEM(0));
> 
>  	/* PF reset VF event */
> -	if (in_msg == E1000_PF_CONTROL_MSG)
> +	if (in_msg == E1000_PF_CONTROL_MSG) {
> +		/* dummy mbx read to ack pf */
> +		if (mbx->ops.read(hw, &in_msg, 1, 0))
> +			return;
>  		_rte_eth_dev_callback_process(dev,
> RTE_ETH_EVENT_INTR_RESET,
>  					      NULL, NULL);
> +	}
>  }
> 
>  static int
> --
> 2.7.4

  reply	other threads:[~2018-01-12  2:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-27 20:22 [dpdk-dev] [PATCH 1/2] net/ixgbe: " Qi Zhang
2017-12-27 20:22 ` [dpdk-dev] [PATCH 2/2] net/e1000: " Qi Zhang
2018-01-12  2:32   ` Dai, Wei [this message]
2018-01-13 16:14   ` Zhang, Helin
2017-12-28  4:38 ` [dpdk-dev] [PATCH 1/2] net/ixgbe: " Dai, Wei
2018-01-11  8:07   ` Zhang, Qi Z
2018-01-12  2:29     ` Dai, Wei
2018-01-12  2:30 ` Dai, Wei
2018-01-13  6:27 ` Zhang, Helin
2018-01-13 16:13 ` Zhang, Helin

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=49759EB36A64CF4892C1AFEC9231E8D66CF219AC@PGSMSX112.gar.corp.intel.com \
    --to=wei.dai@intel.com \
    --cc=dev@dpdk.org \
    --cc=liang-min.wang@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --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).