DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: "Harris, James R" <james.r.harris@intel.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/2] timer: use rte_mp_msg to pass TSC hz to secondary procs
Date: Fri, 16 Aug 2019 19:01:39 +0000
Message-ID: <06DB8249-1130-420C-8A7D-381C55936C74@intel.com> (raw)
In-Reply-To: <a8a03b10-0497-5e0b-5624-b73c096dc8e7@intel.com>



On 8/16/19, 12:56 AM, "Burakov, Anatoly" <anatoly.burakov@intel.com> wrote:

    
    <snip>
    
    > @@ -89,6 +96,65 @@ set_tsc_freq(void)
    >   	eal_tsc_resolution_hz = freq;
    >   }
    >   
    > +static void
    > +set_tsc_freq_secondary(void)
    > +{
    > +	struct rte_mp_msg mp_req;
    > +	struct rte_mp_reply mp_reply;
    > +	struct timer_mp_param *r;
    > +	struct timespec ts = {.tv_sec = 1, .tv_nsec = 0};
    > +
    > +	memset(&mp_req, 0, sizeof(mp_req));
    > +	strcpy(mp_req.name, EAL_TIMER_MP);
    > +	if (rte_mp_request_sync(&mp_req, &mp_reply, &ts) || mp_reply.nb_received != 1) {
    
    If rte_mp_request_sync returns 0 but mp_reply.nb_receieved isn't set to 
    1, you'll be leaking mp_reply.msgs.


Ha - of course you're right.  I didn't notice this when using the VFIO code as a reference for
how to code this.  I'll respin this patch and then push patches to fix the VFIO code separately.

Thanks,

-Jim


  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 11:27 Jim Harris
2019-08-15 11:27 ` [dpdk-dev] [PATCH 2/2] timer: don't check tsc flags in secondary processes Jim Harris
2019-08-16  7:56 ` [dpdk-dev] [PATCH 1/2] timer: use rte_mp_msg to pass TSC hz to secondary procs Burakov, Anatoly
2019-08-16 19:01   ` Harris, James R [this message]
2019-08-26  9:54 ` Bruce Richardson

Reply instructions:

You may reply publically 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=06DB8249-1130-420C-8A7D-381C55936C74@intel.com \
    --to=james.r.harris@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    /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

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git