[ovs-dev] [PATCH] ofproto: add support of OFPR_ACTION_SET as packet-in reason for OF1.4+
Shu Shen
shu.shen at radisys.com
Wed Feb 4 01:52:49 UTC 2015
> On Feb 3, 2015, at 3:39 PM, Ben Pfaff <blp at nicira.com> wrote:
>
>> On Mon, Feb 02, 2015 at 04:18:19PM -0800, Shu Shen wrote:
>> This patch adds support for OFPR_ACTION_SET as the packet-in reason when
>> a Packet-In message is triggered by an output action within an
>> action-set. By default reason code OFPR_ACTION_SET is enabled for async
>> messages when Openflow 1.4+ is used. A test case is included.
>>
>> Signed-off-by: Shu Shen <shu.shen at radisys.com>
>
> Thanks for the contribution.
>
> I think that this will report OFPR_ACTION_SET in the case where the
> action set contains an output action then an "apply_actions" sends a
> packet to the controller. That is, with a flow table something like
> this:
>
> table=0, actions=write_actions(controller),goto_table:1
> table=1, actions=controller
>
> I think that both "controller" actions will use OFPR_ACTION_SET.
Thanks for catching this. I'm updating the test case for better coverage and will revise the patch as well.
>
> This needs {} around each of the conditional statements (see
> CodingStyle.md):
Will update the code.
>> + {
>> + enum ofp_packet_in_reason reason = OFPR_ACTION;
>> + if (ctx->in_group)
>> + reason = OFPR_GROUP;
>> + else if (OFPP_UNSET != ctx->xin->flow.actset_output)
>> + reason = OFPR_ACTION_SET;
>> + execute_controller_action(ctx, max_len, reason, 0);
>> + }
>
> Thanks,
>
> Ben.
More information about the dev
mailing list