Re: [ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-09 Thread William Tu
>> I understand that's what userspace does. What about in the datapath? >> Do the datapaths properly handle it if userspace adds a flow that does >> "truncate, pop_vlan, ..., output"? The kernel datapath, in particular, >> should be able to handle malicious or buggy userspace. >> > > There is che

Re: [ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-09 Thread pravin shelar
On Thu, Jun 9, 2016 at 7:38 PM, Ben Pfaff wrote: > On Thu, Jun 09, 2016 at 05:32:05PM -0700, William Tu wrote: >> >> Signed-off-by: William Tu >> > >> > I'm a bit nervous about cutlen. Can a packet change, for example by >> > popping a VLAN header, after cutlen is set? If so, can this cause the

Re: [ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-09 Thread Ben Pfaff
On Thu, Jun 09, 2016 at 05:32:05PM -0700, William Tu wrote: > >> Signed-off-by: William Tu > > > > I'm a bit nervous about cutlen. Can a packet change, for example by > > popping a VLAN header, after cutlen is set? If so, can this cause the > > packet length to drop below 0, or below 14? > > >

Re: [ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-09 Thread William Tu
Hi Ben, Thanks for the feedback. >> Signed-off-by: William Tu > > I'm a bit nervous about cutlen. Can a packet change, for example by > popping a VLAN header, after cutlen is set? If so, can this cause the > packet length to drop below 0, or below 14? > I don't want this happen. As a result,

Re: [ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-09 Thread Ben Pfaff
On Tue, Jun 07, 2016 at 10:53:52PM -0700, William Tu wrote: > The patch adds a new action to support packet truncation. The new action > is formatted as 'output(port=n,max_len=m)', as output to port n, with > packet size being MIN(original_size, m). > > One use case is to enable port mirroring to

Re: [ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-08 Thread pravin shelar
On Tue, Jun 7, 2016 at 10:53 PM, William Tu wrote: > The patch adds a new action to support packet truncation. The new action > is formatted as 'output(port=n,max_len=m)', as output to port n, with > packet size being MIN(original_size, m). > > One use case is to enable port mirroring to send sma

[ovs-dev] [PATCHv6 1/3] ofp-actions: Add truncate action.

2016-06-07 Thread William Tu
The patch adds a new action to support packet truncation. The new action is formatted as 'output(port=n,max_len=m)', as output to port n, with packet size being MIN(original_size, m). One use case is to enable port mirroring to send smaller packets to the destination port so that only useful pack