DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Ke1X" <ke1x.zhang@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Li, Xiaoyun" <xiaoyun.li@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH v5] fix mbuf release function point corrupt in multi-process
Date: Fri, 13 May 2022 01:34:02 +0000	[thread overview]
Message-ID: <PH7PR11MB5984A8FA6CD9BE406E18D11ADCCA9@PH7PR11MB5984.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220512102655.35af90a9@hermes.local>


> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Friday, May 13, 2022 1:27 AM
> To: Zhang, Ke1X <ke1x.zhang@intel.com>
> Cc: Li, Xiaoyun <xiaoyun.li@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>; dev@dpdk.org
> Subject: Re: [PATCH v5] fix mbuf release function point corrupt in multi-
> process
> 
> On Thu, 12 May 2022 05:57:19 +0000
> Ke Zhang <ke1x.zhang@intel.com> wrote:
> 
> >
> > -static const struct iavf_rxq_ops def_rxq_ops = {
> > -	.release_mbufs = release_rxq_mbufs,
> > +static
> > +struct iavf_rxq_ops iavf_rxq_release_mbufs_ops[] = {
> > +	[IAVF_REL_MBUFS_DEFAULT].release_mbufs = release_rxq_mbufs,
> > +	[IAVF_REL_MBUFS_SSE_VEC].release_mbufs =
> iavf_rx_queue_release_mbufs_sse,
> >  };
> >
> > -static const struct iavf_txq_ops def_txq_ops = {
> > -	.release_mbufs = release_txq_mbufs,
> > +static
> > +struct iavf_txq_ops iavf_txq_release_mbufs_ops[] = {
> > +	[IAVF_REL_MBUFS_DEFAULT].release_mbufs = release_txq_mbufs,
> > +	[IAVF_REL_MBUFS_SSE_VEC].release_mbufs =
> iavf_tx_queue_release_mbufs_sse,
> > +	[IAVF_REL_MBUFS_AVX512_VEC].release_mbufs =
> iavf_tx_queue_release_mbufs_avx512,
> >  };
> 
> Did you have to take const off of these?

Thanks for your comments, I check the other code like linux kernel , I found there are no const for the function pointer, like:

static struct pci_driver ice_driver = {
	.name = KBUILD_MODNAME,
	.id_table = ice_pci_tbl,
	.probe = ice_probe,
	.remove = ice_remove,
#ifdef CONFIG_PM
	.driver.pm = &ice_pm_ops,
#endif /* CONFIG_PM */
	.shutdown = ice_shutdown,
#ifndef STATIC_QOS_CFG_SUPPORT
	.sriov_configure = ice_sriov_configure,
#endif /* !STATIC_QOS_CFG_SUPPORT */
#ifdef HAVE_RHEL7_PCI_DRIVER_RH
	.pci_driver_rh = &ice_driver_rh,
#endif /* HAVE_RHEL7_PCI_DRIVER_RH */
	.err_handler = &ice_pci_err_handler
};

So I don't add the const.


  reply	other threads:[~2022-05-13  1:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02  9:51 [PATCH] net/iavf: fix iavf crashed on dev_stop when running in multi-process mode Ke Zhang
2022-04-03  2:07 ` Zhang, Qi Z
2022-04-14  9:29 ` [PATCH v2] " Ke Zhang
2022-04-18  6:41   ` Zhang, Qi Z
2022-05-07  6:24   ` [PATCH v3] fix mbuf release function point corrupt in multi-process Ke Zhang
2022-05-09  1:16   ` Ke Zhang
2022-05-09  1:35     ` Zhang, Qi Z
2022-05-10  2:54     ` [PATCH v4] " Ke Zhang
2022-05-12  2:21       ` [PATCH v5] " Ke Zhang
2022-05-12  5:57       ` Ke Zhang
2022-05-12 17:26         ` Stephen Hemminger
2022-05-13  1:34           ` Zhang, Ke1X [this message]
2022-05-13  1:57             ` Stephen Hemminger
2022-05-12  7:44       ` Ke Zhang
2022-05-16  6:41         ` [PATCH v6] " Ke Zhang
2022-05-16  6:55         ` Ke Zhang
2022-05-17  7:27           ` Zhang, Qi Z
2022-05-19  7:36           ` [PATCH v7] net/iavf: " Ke Zhang
2022-05-19  9:25             ` Zhang, Qi Z

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=PH7PR11MB5984A8FA6CD9BE406E18D11ADCCA9@PH7PR11MB5984.namprd11.prod.outlook.com \
    --to=ke1x.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=xiaoyun.li@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).