On Feb 12, 2014, at 3:48 PM, Pravin Shelar <pshe...@nicira.com> wrote:

> On Tue, Feb 11, 2014 at 4:07 PM, Jarno Rajahalme <jrajaha...@nicira.com> 
> wrote:
>> Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com>
>> ---
>> datapath/datapath.c |   60 
>> +++++++++++++++++++++++++++------------------------
>> 1 file changed, 32 insertions(+), 28 deletions(-)
>> 
>> diff --git a/datapath/datapath.c b/datapath/datapath.c
>> index a46ceb0..90fdc60 100644
>> --- a/datapath/datapath.c
>> +++ b/datapath/datapath.c
>> @@ -492,14 +492,24 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, 
>> struct genl_info *info)
>> {
>>        struct ovs_header *ovs_header = info->userhdr;
>>        struct nlattr **a = info->attrs;
>> -       struct sw_flow_actions *acts;
>>        struct sk_buff *packet;
>> -       struct sw_flow *flow;
>>        struct datapath *dp;
>>        struct ethhdr *eth;
>> +       struct sw_flow flow;
>> +       struct {
>> +               struct sw_flow_actions acts;
>> +               u64 buf[512 / sizeof (u64)];
>> +       } sw_acts;
>> +       struct sw_flow_actions *acts;
>>        int len;
>>        int err;
>> 
> 
> I am not sure about stack usage here. Specifically on platforms with
> 4KB stack we can overrun kernel stack.

AFAIK this is only called from user threads. Are they also limited by the 
kernel stack? Regardless, ‘sw_acts’ can be made smaller, as new space will be 
allocated if it is not enough. The intention is that most of the time the 
actions would fit to the stub in the stack. Do you have suggestions for such a 
size (e.g., some VLAN manipulations + output to a tunnel)?

  Jarno

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to