public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Firo Yang <firo.yang@suse•com>
To: Jakub Kicinski <kuba@kernel•org>
Cc: marcelo.leitner@gmail•com, vyasevich@gmail•com,
	nhorman@tuxdriver•com, mkubecek@suse•com, davem@davemloft•net,
	edumazet@google•com, pabeni@redhat•com,
	linux-sctp@vger•kernel.org, netdev@vger•kernel.org,
	linux-kernel@vger•kernel.org, firogm@gmail•com
Subject: Re: [PATCH v2 1/1] sctp: sysctl: make extra pointers netns aware
Date: Thu, 1 Dec 2022 12:11:12 +0800	[thread overview]
Message-ID: <Y4gpYPlWNLe5o8Hy@suse.com> (raw)
In-Reply-To: <20221129204818.7d8204b4@kernel.org>

The 11/29/2022 20:48, Jakub Kicinski wrote:
> On Fri, 25 Nov 2022 20:11:27 +0800 Firo Yang wrote:
> > +#define SCTP_RTO_MIN_IDX       1
> > +#define SCTP_RTO_MAX_IDX       2
> > +#define SCTP_PF_RETRANS_IDX    3
> > +#define SCTP_PS_RETRANS_IDX    4
> 
> Use these to index the entries, please, like this:
> 
> struct bla table[] = {
> 	[MY_INDEX_ONE] = {
> 		.whatever = 1,
> 	},
> 	[MY_INDEX_TWO] = {
> 		.fields = 2,
> 	},
> 	{
> 		.there = 3,
> 	},
> 	{
> 		.are = 4,
> 	},
> };
> 
> I think that works even without all entries in the table having the
> index.. ?
> 

Cool. I will send a V3.

Thanks,
// Firo

      reply	other threads:[~2022-12-01  4:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25 12:11 [PATCH v2 1/1] sctp: sysctl: make extra pointers netns aware Firo Yang
2022-11-25 12:22 ` Marcelo Ricardo Leitner
2022-11-30  4:48 ` Jakub Kicinski
2022-12-01  4:11   ` Firo Yang [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=Y4gpYPlWNLe5o8Hy@suse.com \
    --to=firo.yang@suse$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=firogm@gmail$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-sctp@vger$(echo .)kernel.org \
    --cc=marcelo.leitner@gmail$(echo .)com \
    --cc=mkubecek@suse$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nhorman@tuxdriver$(echo .)com \
    --cc=pabeni@redhat$(echo .)com \
    --cc=vyasevich@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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