lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5587775C.2010203@cumulusnetworks.com>
Date:	Sun, 21 Jun 2015 19:47:56 -0700
From:	roopa <roopa@...ulusnetworks.com>
To:	Thomas Graf <tgraf@...g.ch>
CC:	ebiederm@...ssion.com, rshearma@...cade.com, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light
 weight tunnels

On 6/21/15, 1:32 PM, Thomas Graf wrote:
> On 06/18/15 at 09:49pm, Roopa Prabhu wrote:
>> +#include <net/ip.h>
>> +#include <net/rtnetlink.h>
>> +
>> +#define LWTUNNEL_HASH_BITS   7
>> +#define LWTUNNEL_HASH_SIZE   (1 << LWTUNNEL_HASH_BITS)
>> +
>> +struct lwtunnel_hdr {
>> +	int             len;
>> +	__u8            data[0];
>> +};
> The name header is a bit misleading here. Certain encaps won't
> preallocate the header. How we just add a len to lwt_state and
> allow the user have private data? Not sure we need to split this
> into a separate struct anyway.
sure, I have been debating about that as well.
>
>> +/* lw tunnel state flags */
>> +#define LWTUNNEL_STATE_OUTPUT_REDIRECT 0x1
>> +
>> +#define lwtunnel_output_redirect(lwtstate) (lwtstate && \
>> +			(lwtstate->flags & LWTUNNEL_STATE_OUTPUT_REDIRECT))
> Converting this to a static inline function would add type checks
> by the compiler and it shouldn't result in any different code.
will do,
>
>> +#define MAX_LWTUNNEL_ENCAP_OPS 8
>> +extern const struct lwtunnel_encap_ops __rcu *
>> +		lwtun_encaps[MAX_LWTUNNEL_ENCAP_OPS];
> I guess we require everybody to add themselves to the enum so
> we might as well just derive the MAX from the enum MAX. Unless you
> want out of tree modules to register themselves.

I am ok with deriving the MAX from enum Max.
>
>> +
>> +struct lwtunnel_state *lwtunnel_state_alloc(int hdr_len)
>> +{
>> +	struct lwtunnel_state *lws;
>> +
>> +	return kzalloc(sizeof(*lws) + hdr_len, GFP_KERNEL);
> Should this set refcnt to 1?
My alloc does not bump the refcnt but its done right before it is 
assigned to a nexthop.
I was planning on checking the convention followed for this. will check 
and change if needed.


Thanks!




--
To unsubscribe from this list: send the line "unsubscribe netdev" in

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ