linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Hariprasad Kelam <hkelam@marvell.com>
Cc: Network Development <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Sunil Kovvuri Goutham <sgoutham@marvell.com>,
	Linu Cherian <lcherian@marvell.com>,
	Geethasowjanya Akula <gakula@marvell.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Subbaraya Sundeep Bhatta <sbhatta@marvell.com>,
	Felix Manlunas <fmanlunas@marvell.com>,
	Christina Jacob <cjacob@marvell.com>,
	Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com>
Subject: Re: [Patch v2 net-next 2/7] octeontx2-af: Add new CGX_CMD to get PHY FEC statistics
Date: Sat, 30 Jan 2021 09:26:30 -0500	[thread overview]
Message-ID: <CAF=yD-+WHAmkXKGa9gSysoA1fUZr-tcEiiTcZ_fODTBB6pghnw@mail.gmail.com> (raw)
In-Reply-To: <MWHPR18MB1421B580CF911A13D1369D98DEB89@MWHPR18MB1421.namprd18.prod.outlook.com>

On Sat, Jan 30, 2021 at 4:53 AM Hariprasad Kelam <hkelam@marvell.com> wrote:
>
> Hi Willem,
>
> > -----Original Message-----
> > From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> > Sent: Thursday, January 28, 2021 1:50 AM
> > To: Hariprasad Kelam <hkelam@marvell.com>
> > Cc: Network Development <netdev@vger.kernel.org>; LKML <linux-
> > kernel@vger.kernel.org>; David Miller <davem@davemloft.net>; Jakub
> > Kicinski <kuba@kernel.org>; Sunil Kovvuri Goutham
> > <sgoutham@marvell.com>; Linu Cherian <lcherian@marvell.com>;
> > Geethasowjanya Akula <gakula@marvell.com>; Jerin Jacob Kollanukkaran
> > <jerinj@marvell.com>; Subbaraya Sundeep Bhatta <sbhatta@marvell.com>;
> > Felix Manlunas <fmanlunas@marvell.com>; Christina Jacob
> > <cjacob@marvell.com>; Sunil Kovvuri Goutham
> > <Sunil.Goutham@cavium.com>
> > Subject: [EXT] Re: [Patch v2 net-next 2/7] octeontx2-af: Add new CGX_CMD
> > to get PHY FEC statistics
> >
> > On Wed, Jan 27, 2021 at 4:04 AM Hariprasad Kelam <hkelam@marvell.com>
> > wrote:
> > >
> > > From: Felix Manlunas <fmanlunas@marvell.com>
> > >
> > > This patch adds support to fetch fec stats from PHY. The stats are put
> > > in the shared data struct fwdata.  A PHY driver indicates that it has
> > > FEC stats by setting the flag fwdata.phy.misc.has_fec_stats
> > >
> > > Besides CGX_CMD_GET_PHY_FEC_STATS, also add CGX_CMD_PRBS and
> > > CGX_CMD_DISPLAY_EYE to enum cgx_cmd_id so that Linux's enum list is in
> > > sync with firmware's enum list.
> > >
> > > Signed-off-by: Felix Manlunas <fmanlunas@marvell.com>
> > > Signed-off-by: Christina Jacob <cjacob@marvell.com>
> > > Signed-off-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com>
> > > Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> >
> >
> > > +struct phy_s {
> > > +       struct {
> > > +               u64 can_change_mod_type : 1;
> > > +               u64 mod_type            : 1;
> > > +               u64 has_fec_stats       : 1;
> >
> > this style is not customary
>
> These structures are shared with firmware and stored in a shared memory. Any change in size of structures will break compatibility. To avoid frequent compatible issues with new vs old firmware we have put spaces where ever we see that there could be more fields added in future.
> So changing this to u8 can have an impact in future.

My comment was intended much simpler: don't add whitespace between the
bit-field variable name and its size expression.

  u64 mod_type:1;

not

  u64 mod_type     : 1;

At least, I have not seen that style anywhere else in the kernel.

  reply	other threads:[~2021-01-30 14:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30  9:52 [Patch v2 net-next 2/7] octeontx2-af: Add new CGX_CMD to get PHY FEC statistics Hariprasad Kelam
2021-01-30 14:26 ` Willem de Bruijn [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-31  7:01 Hariprasad Kelam
2021-01-27  7:45 [Patch v2 net-next 0/7] ethtool support for fec and link configuration Hariprasad Kelam
2021-01-27  7:45 ` [Patch v2 net-next 2/7] octeontx2-af: Add new CGX_CMD to get PHY FEC statistics Hariprasad Kelam
2021-01-27 20:20   ` Willem de Bruijn

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='CAF=yD-+WHAmkXKGa9gSysoA1fUZr-tcEiiTcZ_fODTBB6pghnw@mail.gmail.com' \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=Sunil.Goutham@cavium.com \
    --cc=cjacob@marvell.com \
    --cc=davem@davemloft.net \
    --cc=fmanlunas@marvell.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.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).