From patchwork Fri Feb 15 12:05:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li RongQing X-Patchwork-Id: 1042800 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baidu.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 441BmK4tXpz9sLw for ; Fri, 15 Feb 2019 23:05:36 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 2C03AB5F; Fri, 15 Feb 2019 12:05:34 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D5C89B5D for ; Fri, 15 Feb 2019 12:05:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tc-sys-mailedm05.tc.baidu.com (mx56.baidu.com [61.135.168.56]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 48479FE for ; Fri, 15 Feb 2019 12:05:32 +0000 (UTC) Received: from localhost (cp01-cos-dev01.cp01.baidu.com [10.92.119.46]) by tc-sys-mailedm05.tc.baidu.com (Postfix) with ESMTP id 6BB251EBA008 for ; Fri, 15 Feb 2019 20:05:29 +0800 (CST) From: Li RongQing To: dev@openvswitch.org Date: Fri, 15 Feb 2019 20:05:29 +0800 Message-Id: <1550232329-698-1-git-send-email-lirongqing@baidu.com> X-Mailer: git-send-email 1.7.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] netdev-dpdk: remove constant arguments for ingress_policer_run X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org should_steal is always true, not need to be passed Signed-off-by: Li RongQing --- lib/netdev-dpdk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index f07b10c88..7ae29f3c2 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -2070,13 +2070,13 @@ netdev_dpdk_policer_run(struct rte_meter_srtcm *meter, static int ingress_policer_run(struct ingress_policer *policer, struct rte_mbuf **pkts, - int pkt_cnt, bool should_steal) + int pkt_cnt) { int cnt = 0; rte_spinlock_lock(&policer->policer_lock); cnt = netdev_dpdk_policer_run(&policer->in_policer, &policer->in_prof, - pkts, pkt_cnt, should_steal); + pkts, pkt_cnt, true); rte_spinlock_unlock(&policer->policer_lock); return cnt; @@ -2189,7 +2189,7 @@ netdev_dpdk_vhost_rxq_recv(struct netdev_rxq *rxq, dropped = nb_rx; nb_rx = ingress_policer_run(policer, (struct rte_mbuf **) batch->packets, - nb_rx, true); + nb_rx); dropped -= nb_rx; } @@ -2229,7 +2229,7 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq, struct dp_packet_batch *batch, dropped = nb_rx; nb_rx = ingress_policer_run(policer, (struct rte_mbuf **) batch->packets, - nb_rx, true); + nb_rx); dropped -= nb_rx; }