public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu•com>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: Xin Long <lucien.xin@gmail•com>,
	network dev <netdev@vger•kernel.org>,
	linux-sctp@vger•kernel.org,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail•com>,
	Vlad Yasevich <vyasevich@gmail•com>,
	daniel@iogearbox•net, davem@davemloft•net
Subject: Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag
Date: Sun, 10 Apr 2016 09:02:27 -0400	[thread overview]
Message-ID: <570A4EE3.9090302@mojatatu.com> (raw)
In-Reply-To: <1460222507.6473.493.camel@edumazet-glaptop3.roam.corp.google.com>

On 16-04-09 01:21 PM, Eric Dumazet wrote:


> Well, once a hole is there, nothing we can do really, because of
> compatibility with old kernels / old binaries.
>
>
> But when a _new_ structure is defined, this is the time where we can ask
> for doing sensible things ;)
>

This one is fixable. sizeof() already includes the accounting of
the pad. something like:

diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index fe95446..52542eb 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -158,6 +158,7 @@ struct tcp_info {
         __u8    tcpi_options;
         __u8    tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;

+       __u8    pad;    /*reuse this space if you need 8bits for something*/
         __u32   tcpi_rto;
         __u32   tcpi_ato;
         __u32   tcpi_snd_mss;

cheers,
jamal

  reply	other threads:[~2016-04-10 13:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09  4:53 [PATCHv2 net-next 0/6] sctp: support sctp_diag in kernel Xin Long
2016-04-09  4:53 ` [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag Xin Long
2016-04-09  5:16   ` Eric Dumazet
2016-04-09 15:19     ` Jamal Hadi Salim
2016-04-09 17:21       ` Eric Dumazet
2016-04-10 13:02         ` Jamal Hadi Salim [this message]
2016-04-09 15:45     ` Xin Long
2016-04-09  5:19   ` Eric Dumazet
2016-04-09 16:10     ` Xin Long
2016-04-09 17:29       ` Eric Dumazet
2016-04-09 17:31       ` Eric Dumazet
2016-04-09 15:16   ` Jamal Hadi Salim
2016-04-10  6:42     ` Xin Long
2016-04-09  4:53 ` [PATCHv2 net-next 2/6] sctp: export some apis or variables for sctp_diag and reuse some for proc Xin Long
2016-04-09  4:53 ` [PATCHv2 net-next 3/6] sctp: export some functions for sctp_diag in inet_diag Xin Long
2016-04-09  4:53 ` [PATCHv2 net-next 4/6] sctp: add the sctp_diag.c file Xin Long
2016-04-09  5:51   ` Eric Dumazet
2016-04-09 15:40     ` Xin Long
2016-04-09 17:23       ` Eric Dumazet
2016-04-11 21:21     ` Marcelo Ricardo Leitner
2016-04-09  4:53 ` [PATCHv2 net-next 5/6] sctp: merge the seq_start/next/exits in remaddrs and assocs Xin Long
2016-04-09  4:53 ` [PATCHv2 net-next 6/6] sctp: fix some rhashtable functions using in sctp proc/diag Xin Long

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=570A4EE3.9090302@mojatatu.com \
    --to=jhs@mojatatu$(echo .)com \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=linux-sctp@vger$(echo .)kernel.org \
    --cc=lucien.xin@gmail$(echo .)com \
    --cc=marcelo.leitner@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --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