All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Keller, Jacob E" <jacob.e.keller@intel.com>
Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>,
	Duncan Roe <duncan_roe@optusnet.com.au>
Subject: Re: [PATCH libmnl v2 2/2] libmnl: add support for signed types
Date: Mon, 8 Aug 2022 19:48:44 +0200	[thread overview]
Message-ID: <YvFMfK5eeDbr2n0t@salvia> (raw)
In-Reply-To: <PH0PR11MB50955D3ADF0ED245A778D94FD6639@PH0PR11MB5095.namprd11.prod.outlook.com>

On Mon, Aug 08, 2022 at 05:46:50PM +0000, Keller, Jacob E wrote:
> 
> 
> > -----Original Message-----
> > From: Pablo Neira Ayuso <pablo@netfilter.org>
> > Sent: Monday, August 08, 2022 7:09 AM
> > To: Keller, Jacob E <jacob.e.keller@intel.com>
> > Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>; Duncan Roe
> > <duncan_roe@optusnet.com.au>
> > Subject: Re: [PATCH libmnl v2 2/2] libmnl: add support for signed types
> > 
> > Hi,
> > 
> > On Fri, Aug 05, 2022 at 02:00:40PM -0700, Jacob Keller wrote:
> > > libmnl has get and put functions for unsigned integer types. It lacks
> > > support for the signed variations. On some level this is technically
> > > sufficient. A user could use the unsigned variations and then cast to a
> > > signed value at use. However, this makes resulting code in the application
> > > more difficult to follow. Introduce signed variations of the integer get
> > > and put functions.
> > >
> > > Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> > > ---
> > >  include/libmnl/libmnl.h |  16 ++++
> > >  src/attr.c              | 194 +++++++++++++++++++++++++++++++++++++++-
> > >  2 files changed, 209 insertions(+), 1 deletion(-)
> > >
> > [...]
> > > @@ -127,6 +139,10 @@ enum mnl_attr_data_type {
> > >  	MNL_TYPE_U16,
> > >  	MNL_TYPE_U32,
> > >  	MNL_TYPE_U64,
> > > +	MNL_TYPE_S8,
> > > +	MNL_TYPE_S16,
> > > +	MNL_TYPE_S32,
> > > +	MNL_TYPE_S64,
> > 
> > This breaks ABI, you have to add new types at the end of the
> > enumeration.
> > 
> 
> To clarify, I believe this would be at the end just before MNL_TYPE_MAX?

Right after MNL_TYPE_BINARY, it is ok to update MNL_TYPE_MAX.

  reply	other threads:[~2022-08-08 17:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 21:00 [PATCH libmnl v2 1/2] libmnl: update attribute function comments to use \return Jacob Keller
2022-08-05 21:00 ` [PATCH libmnl v2 2/2] libmnl: add support for signed types Jacob Keller
2022-08-08 14:09   ` Pablo Neira Ayuso
2022-08-08 16:38     ` Keller, Jacob E
2022-08-08 17:46     ` Keller, Jacob E
2022-08-08 17:48       ` Pablo Neira Ayuso [this message]
2022-08-06  0:25 ` [PATCH libmnl v2 1/2] libmnl: update attribute function comments to use \return Duncan Roe
2022-08-08 14:12 ` Pablo Neira Ayuso

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=YvFMfK5eeDbr2n0t@salvia \
    --to=pablo@netfilter.org \
    --cc=duncan_roe@optusnet.com.au \
    --cc=jacob.e.keller@intel.com \
    --cc=netfilter-devel@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.