netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Tristram.Ha@microchip.com
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Pavel Machek <pavel@ucw.cz>,
	Ruediger Schmitt <ruediger.schmitt@philips.com>,
	muvarov@gmail.com, nathan.leigh.conrad@gmail.com,
	vivien.didelot@savoirfairelinux.com,
	UNGLinuxDriver@microchip.com, netdev@vger.kernel.org
Subject: Re: [PATCH v3 net-next] net: dsa: microchip: Add MIB counter reading support
Date: Thu, 7 Dec 2017 00:13:32 +0100	[thread overview]
Message-ID: <20171206231332.GE28774@lunn.ch> (raw)
In-Reply-To: <1512524828-16250-1-git-send-email-Tristram.Ha@microchip.com>

> +	for (i = 0; i < dev->mib_port_cnt; i++) {
> +		p = &dev->ports[i];
> +		if (!p->on)
> +			continue;
> +		mib = &p->mib;
> +		mutex_lock(&mib->cnt_mutex);
> +
> +		/* read only dropped counters when link is not up */
> +		if (p->link_down)
> +			p->link_down = 0;
> +		else if (!p->link_up)
> +			mib->cnt_ptr = dev->reg_mib_cnt;

So this is the code you were referring to, when i asked if it can be
up and down at the same time.

I'm having a hard time understand this. Please try to implement this
some other way to make it clear what is going on.

     Andrew

      reply	other threads:[~2017-12-06 23:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06  1:47 [PATCH v3 net-next] net: dsa: microchip: Add MIB counter reading support Tristram.Ha
2017-12-06 23:13 ` Andrew Lunn [this message]

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=20171206231332.GE28774@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Tristram.Ha@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=f.fainelli@gmail.com \
    --cc=muvarov@gmail.com \
    --cc=nathan.leigh.conrad@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=ruediger.schmitt@philips.com \
    --cc=vivien.didelot@savoirfairelinux.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).