From: "Wang, Haiyue" <haiyue.wang@intel.com>
To: Tengfei Zhang <zypscode@outlook.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>,
"Lin, Xueqin" <xueqin.lin@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/e1000: fix nic ops function was no initialized in secondary process
Date: Mon, 21 Jun 2021 07:31:09 +0000 [thread overview]
Message-ID: <BN8PR11MB3795E158E738D719E423DD74F70A9@BN8PR11MB3795.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ME3P282MB16687E51A5B5DDCD990B867FD10D9@ME3P282MB1668.AUSP282.PROD.OUTLOOK.COM>
> -----Original Message-----
> From: Tengfei Zhang <zypscode@outlook.com>
> Sent: Saturday, June 19, 2021 01:27
> To: Wang, Haiyue <haiyue.wang@intel.com>
> Cc: dev@dpdk.org; Tengfei Zhang <zypscode@outlook.com>
> Subject: [PATCH] net/e1000: fix nic ops function was no initialized in secondary process
>
> 'e1000_setup_init_funcs' was not called in secondary process,
> it initialize mac,phy,nvm ops.
> when secondary process get link status,it will coredump.
Thanks, Tengfei.
Since primary / secondary is so complicated, AFAIK, the control path is in
primary, the secondary is mainly for rx/tx ops officially, like new Intel
ice PMD:
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
ice_set_rx_function(dev);
ice_set_tx_function(dev);
return 0;
}
So you can keep your patch as private for special secondary usage. ;-)
>
> Signed-off-by: Tengfei Zhang <zypscode@outlook.com>
> ---
> drivers/net/e1000/em_ethdev.c | 1 +
> drivers/net/e1000/igb_ethdev.c | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
> index a0ca371b02..cd5faa4228 100644
> --- a/drivers/net/e1000/em_ethdev.c
> +++ b/drivers/net/e1000/em_ethdev.c
> @@ -258,6 +258,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
> * has already done this work. Only check we don't need a different
> * RX function */
> if (rte_eal_process_type() != RTE_PROC_PRIMARY){
> + e1000_setup_init_funcs(hw, TRUE);
> if (eth_dev->data->scattered_rx)
> eth_dev->rx_pkt_burst =
> (eth_rx_burst_t)ð_em_recv_scattered_pkts;
> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
> index 10ee0f3341..7d9d60497d 100644
> --- a/drivers/net/e1000/igb_ethdev.c
> +++ b/drivers/net/e1000/igb_ethdev.c
> @@ -737,6 +737,7 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
> * has already done this work. Only check we don't need a different
> * RX function */
> if (rte_eal_process_type() != RTE_PROC_PRIMARY){
> + e1000_setup_init_funcs(hw, TRUE);
> if (eth_dev->data->scattered_rx)
> eth_dev->rx_pkt_burst = ð_igb_recv_scattered_pkts;
> return 0;
> @@ -931,6 +932,7 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
> * has already done this work. Only check we don't need a different
> * RX function */
> if (rte_eal_process_type() != RTE_PROC_PRIMARY){
> + e1000_setup_init_funcs(hw, TRUE);
> if (eth_dev->data->scattered_rx)
> eth_dev->rx_pkt_burst = ð_igb_recv_scattered_pkts;
> return 0;
> --
> 2.26.2
next prev parent reply other threads:[~2021-06-21 7:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 17:26 Tengfei Zhang
2021-06-21 7:31 ` Wang, Haiyue [this message]
2021-06-21 8:34 ` 张 杨
2021-06-22 2:16 ` Wang, Haiyue
2021-06-22 13:56 ` Tengfei Zhang
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=BN8PR11MB3795E158E738D719E423DD74F70A9@BN8PR11MB3795.namprd11.prod.outlook.com \
--to=haiyue.wang@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=xueqin.lin@intel.com \
--cc=zypscode@outlook.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).