From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B02CC169C4 for ; Mon, 11 Feb 2019 07:53:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5004E20811 for ; Mon, 11 Feb 2019 07:53:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726860AbfBKHxU (ORCPT ); Mon, 11 Feb 2019 02:53:20 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:51238 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725931AbfBKHxU (ORCPT ); Mon, 11 Feb 2019 02:53:20 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@mellanox.com) with ESMTPS (AES256-SHA encrypted); 11 Feb 2019 09:53:17 +0200 Received: from l-dev-uefi14.mtl.labs.mlnx. (l-dev-uefi14.mtl.labs.mlnx [10.134.80.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x1B7rHbM029920; Mon, 11 Feb 2019 09:53:17 +0200 From: Eli Britstein To: netdev@vger.kernel.org Cc: Roi Dayan , Pablo Neira Ayuso , Jiri Pirko , Saeed Mahameed , Eli Britstein Subject: [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure Date: Mon, 11 Feb 2019 09:52:59 +0200 Message-Id: <20190211075259.39058-1-elibr@mellanox.com> X-Mailer: git-send-email 2.14.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Implementation of macro "flow_action_for_each" introduced in commit e3ab786b42535 ("flow_offload: add flow action infrastructure") and used in commit 738678817573c ("drivers: net: use flow action infrastructure") iterated the first item twice and did not reach the last one. Fix it. Fixes: e3ab786b42535 ("flow_offload: add flow action infrastructure") Fixes: 738678817573c ("drivers: net: use flow action infrastructure") Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan --- include/net/flow_offload.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h index 23166caa0da5..a307ccb18015 100644 --- a/include/net/flow_offload.h +++ b/include/net/flow_offload.h @@ -171,7 +171,7 @@ static inline bool flow_action_has_entries(const struct flow_action *action) } #define flow_action_for_each(__i, __act, __actions) \ - for (__i = 0, __act = &(__actions)->entries[0]; __i < (__actions)->num_entries; __act = &(__actions)->entries[__i++]) + for (__i = 0, __act = &(__actions)->entries[0]; __i < (__actions)->num_entries; __act = &(__actions)->entries[++__i]) struct flow_rule { struct flow_match match; -- 2.14.5