Re: [RFC net-next] net: xfrm: support setting an output mark.

2017-08-10 Thread Steffen Klassert
On Thu, Aug 10, 2017 at 02:13:15AM +0900, Lorenzo Colitti wrote: > On Tue, Aug 8, 2017 at 4:51 PM, Steffen Klassert > wrote: > > I thought you can just split the 32 bit mark into two 16 bit marks > > by setting an appropriate mask at the xfrm and the routing mark. > > But this has the drawback tha

Re: [RFC net-next] net: xfrm: support setting an output mark.

2017-08-09 Thread Lorenzo Colitti
On Tue, Aug 8, 2017 at 4:51 PM, Steffen Klassert wrote: > I thought you can just split the 32 bit mark into two 16 bit marks > by setting an appropriate mask at the xfrm and the routing mark. > But this has the drawback that the socket needs to know how possibly > tunneled packets should be routed

Re: [RFC net-next] net: xfrm: support setting an output mark.

2017-08-08 Thread Steffen Klassert
On Mon, Aug 07, 2017 at 10:34:37PM +0900, Lorenzo Colitti wrote: > On Mon, Aug 7, 2017 at 8:16 PM, Steffen Klassert > wrote: > > > XFRMA_OFFLOAD_DEV, /* struct xfrm_state_offload */ > > > + XFRMA_OUTPUT_MARK, /* __u32 */ > > > __XFRMA_MAX > > > > Hm, why don't you use the

Re: [RFC net-next] net: xfrm: support setting an output mark.

2017-08-07 Thread Lorenzo Colitti
On Mon, Aug 7, 2017 at 8:16 PM, Steffen Klassert wrote: > > XFRMA_OFFLOAD_DEV, /* struct xfrm_state_offload */ > > + XFRMA_OUTPUT_MARK, /* __u32 */ > > __XFRMA_MAX > > Hm, why don't you use the existing xfrm_mark for this? > Having two different marks on one SA seems to b

Re: [RFC net-next] net: xfrm: support setting an output mark.

2017-08-07 Thread Steffen Klassert
On Mon, Aug 07, 2017 at 06:23:26PM +0900, Lorenzo Colitti wrote: > On systems that use mark-based routing it may be necessary for > routing lookups to use marks in order for packets to be routed > correctly. An example of such a system is Android, which uses > socket marks to route packets via diff

[RFC net-next] net: xfrm: support setting an output mark.

2017-08-07 Thread Lorenzo Colitti
On systems that use mark-based routing it may be necessary for routing lookups to use marks in order for packets to be routed correctly. An example of such a system is Android, which uses socket marks to route packets via different networks. Currently, routing lookups in tunnel mode always use a m