On 13/03/2023 12:35, Eelco Chaudron wrote:
>
>
> On 13 Mar 2023, at 11:27, Roi Dayan wrote:
>
>> From: Oz Shlomo <[email protected]>
>>
>> Currently jumping over a output-to-port action is translated to tc
>> mirror action and stolen control action.
>> However, the tc control action is not propagated to the hw offload action,
>> thus the hardware action will mirror the packet and continue to the next
>> action.
>>
>> Transalte mirror/stolen to "mirred egress redirect" action which terminates
>> the action list.
>
> I did not review the code, but before I do, can you add a test case for this
> scenario? Asking as there is quite some translation logic involved and I want
> to make sure we are not breaking any of this.
thanks Eelco.
We'll take a look about a test case for this and the fix cleaning chains commit.
>
>> Fixes: e4daf88a4390 ("netdev-offload-tc: Handle check_pkt_len datapath
>> action.")
>> Signed-off-by: Oz Shlomo <[email protected]>
>> Reviewed-by: Roi Dayan <[email protected]>
>> ---
>> lib/tc.c | 13 ++++++++-----
>> 1 file changed, 8 insertions(+), 5 deletions(-)
>>
>> diff --git a/lib/tc.c b/lib/tc.c
>> index 4c07e22162e7..fe06d3c110b6 100644
>> --- a/lib/tc.c
>> +++ b/lib/tc.c
>> @@ -3341,13 +3341,16 @@ nl_msg_put_flower_acts(struct ofpbuf *request,
>> struct tc_flower *flower)
>> }
>> action->jump_action = JUMP_ACTION_STOP;
>> } else {
>> - if (ingress) {
>> - nl_msg_put_act_mirred(request, ifindex, action_pc,
>> - TCA_INGRESS_MIRROR);
>> + int out_action;
>> +
>> + if (action_pc == TC_ACT_STOLEN) {
>> + out_action = TCA_EGRESS_REDIR;
>> } else {
>> - nl_msg_put_act_mirred(request, ifindex, action_pc,
>> - TCA_EGRESS_MIRROR);
>> + out_action = TCA_EGRESS_MIRROR;
>> }
>> +
>> + nl_msg_put_act_mirred(request, ifindex, action_pc,
>> + out_action);
>> }
>> nl_msg_put_act_cookie(request, &flower->act_cookie);
>> nl_msg_put_act_flags(request);
>> --
>> 2.38.0
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev