Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-13 Thread Jarno Rajahalme
> On Apr 13, 2016, at 5:17 PM, Ben Pfaff wrote: > > On Wed, Apr 13, 2016 at 05:17:13PM -0700, Ben Pfaff wrote: >> On Wed, Apr 13, 2016 at 05:06:16PM -0700, Joe Stringer wrote: >>> On 13 April 2016 at 16:12, Ben Pfaff wrote: On Tue, Apr 12, 2016 at 10:56:50PM

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-13 Thread Ben Pfaff
On Wed, Apr 13, 2016 at 05:17:13PM -0700, Ben Pfaff wrote: > On Wed, Apr 13, 2016 at 05:06:16PM -0700, Joe Stringer wrote: > > On 13 April 2016 at 16:12, Ben Pfaff wrote: > > > On Tue, Apr 12, 2016 at 10:56:50PM -0700, Joe Stringer wrote: > > >> On 12 April 2016 at 21:13, Ben Pfaff

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-13 Thread Ben Pfaff
On Wed, Apr 13, 2016 at 05:06:16PM -0700, Joe Stringer wrote: > On 13 April 2016 at 16:12, Ben Pfaff wrote: > > On Tue, Apr 12, 2016 at 10:56:50PM -0700, Joe Stringer wrote: > >> On 12 April 2016 at 21:13, Ben Pfaff wrote: > >> > On Tue, Apr 12, 2016 at 11:38:38AM

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-13 Thread Joe Stringer
On 13 April 2016 at 16:12, Ben Pfaff wrote: > On Tue, Apr 12, 2016 at 10:56:50PM -0700, Joe Stringer wrote: >> On 12 April 2016 at 21:13, Ben Pfaff wrote: >> > On Tue, Apr 12, 2016 at 11:38:38AM -0700, William Tu wrote: >> >> Should we expose "truncate" to the

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-13 Thread Ben Pfaff
On Tue, Apr 12, 2016 at 10:56:50PM -0700, Joe Stringer wrote: > On 12 April 2016 at 21:13, Ben Pfaff wrote: > > On Tue, Apr 12, 2016 at 11:38:38AM -0700, William Tu wrote: > >> Should we expose "truncate" to the ovs-ofctl action list? > >> > >> I was thinking about this ovs-ofctl

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-13 Thread pravin shelar
On Tue, Apr 12, 2016 at 9:13 PM, Ben Pfaff wrote: > On Tue, Apr 12, 2016 at 11:38:38AM -0700, William Tu wrote: >> Should we expose "truncate" to the ovs-ofctl action list? >> >> I was thinking about this ovs-ofctl syntax: >> actions='output(max_len=64, port=1), output:2' >> >>

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-12 Thread Joe Stringer
On 12 April 2016 at 21:13, Ben Pfaff wrote: > On Tue, Apr 12, 2016 at 11:38:38AM -0700, William Tu wrote: >> Should we expose "truncate" to the ovs-ofctl action list? >> >> I was thinking about this ovs-ofctl syntax: >> actions='output(max_len=64, port=1), output:2' >> >> then

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-12 Thread Ben Pfaff
On Tue, Apr 12, 2016 at 11:38:38AM -0700, William Tu wrote: > Should we expose "truncate" to the ovs-ofctl action list? > > I was thinking about this ovs-ofctl syntax: > actions='output(max_len=64, port=1), output:2' > > then at datapath it translates to actions > truncate(64),

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-12 Thread William Tu
Should we expose "truncate" to the ovs-ofctl action list? I was thinking about this ovs-ofctl syntax: actions='output(max_len=64, port=1), output:2' then at datapath it translates to actions truncate(64), output(1), output(2) So 64B to port1, and 100B to port2. Regards, William On

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-12 Thread Joe Stringer
On 12 April 2016 at 11:10, William Tu wrote: > Hi Joe, > >> There is no need to truncate packet immediately. We can keep the >> >> > truncate len in skb_ovs_cb and use it to truncate packet right before >> > seeing it over port or to user-space up-call. >> >> So, if you have a

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-12 Thread William Tu
Hi Joe, > There is no need to truncate packet immediately. We can keep the > > truncate len in skb_ovs_cb and use it to truncate packet right before > > seeing it over port or to user-space up-call. > > So, if you have a packet with length 100, then do the following actions: > >

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-12 Thread Joe Stringer
On 11 April 2016 at 18:46, pravin shelar wrote: > On Mon, Apr 11, 2016 at 5:58 PM, Ben Pfaff wrote: >> On Mon, Apr 11, 2016 at 01:14:26PM -0700, pravin shelar wrote: >>> The datapath truncate action should not be associated with output >>> action. It should be

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-11 Thread William Tu
Hi Pravin and Ben, Thanks for the feedback and yes, it's better to make truncate without associating to the output action. I will make the modification and resubmit v3 patch. Regards, William On Mon, Apr 11, 2016 at 6:49 PM, Ben Pfaff wrote: > On Mon, Apr 11, 2016 at 06:46:27PM

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-11 Thread Ben Pfaff
On Mon, Apr 11, 2016 at 06:46:27PM -0700, pravin shelar wrote: > On Mon, Apr 11, 2016 at 5:58 PM, Ben Pfaff wrote: > > On Mon, Apr 11, 2016 at 01:14:26PM -0700, pravin shelar wrote: > >> The datapath truncate action should not be associated with output > >> action. It should be

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-11 Thread pravin shelar
On Mon, Apr 11, 2016 at 5:58 PM, Ben Pfaff wrote: > On Mon, Apr 11, 2016 at 01:14:26PM -0700, pravin shelar wrote: >> The datapath truncate action should not be associated with output >> action. It should be general truncate action with truncate length >> parameter. This way we can

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-11 Thread Ben Pfaff
On Mon, Apr 11, 2016 at 01:14:26PM -0700, pravin shelar wrote: > The datapath truncate action should not be associated with output > action. It should be general truncate action with truncate length > parameter. This way we can apply it to actions other than output. This may require more care

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-11 Thread pravin shelar
On Fri, Apr 1, 2016 at 5:37 PM, William Tu wrote: > The patch proposes adding 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

Re: [ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-06 Thread Joe Stringer
On 1 April 2016 at 17:37, William Tu wrote: > The patch proposes adding 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

[ovs-dev] [PATCH v2] ofp-actions: Add a new action to truncate a packet.

2016-04-01 Thread William Tu
The patch proposes adding 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