From patchwork Wed Jul 5 12:27:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shachar Beiser X-Patchwork-Id: 784573 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3x2gC26Lxvz9s7g for ; Wed, 5 Jul 2017 22:28:30 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 73BB9AAE; Wed, 5 Jul 2017 12:28:19 +0000 (UTC) X-Original-To: ovs-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 39085A86 for ; Wed, 5 Jul 2017 12:28:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 2E596A7 for ; Wed, 5 Jul 2017 12:28:16 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from shacharbe@mellanox.com) with ESMTPS (AES256-SHA encrypted); 5 Jul 2017 15:27:49 +0300 Received: from r-aa-dragon21.mtr.labs.mlnx (r-aa-dragon21.mtr.labs.mlnx [10.209.68.158]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v65CRngc009606; Wed, 5 Jul 2017 15:27:49 +0300 Received: from r-aa-dragon21.mtr.labs.mlnx (localhost [127.0.0.1]) by r-aa-dragon21.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id v65CRn4Y025918; Wed, 5 Jul 2017 12:27:49 GMT Received: (from shacharbe@localhost) by r-aa-dragon21.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id v65CRn2G025917; Wed, 5 Jul 2017 12:27:49 GMT From: Shachar Beiser To: ovs-dev@openvswitch.org Date: Wed, 5 Jul 2017 12:27:10 +0000 Message-Id: <1dd8e98a5c4f52c22d5d2cfab7babba84292013a.1499257385.git.shacharbe@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Shachar Beiser Subject: [ovs-dev] [PATCH 03/11] ovs/dp-cls: saving rx queue identifier 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 The receive queue id is saved in order to direct the data-path classifier traffic towards it. Signed-off-by: Shachar Beiser --- lib/dp-packet.h | 1 + lib/netdev.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/dp-packet.h b/lib/dp-packet.h index d2549b1..28c8aa0 100644 --- a/lib/dp-packet.h +++ b/lib/dp-packet.h @@ -645,6 +645,7 @@ struct dp_packet_batch { size_t count; bool trunc; /* true if the batch needs truncate. */ struct dp_packet *packets[NETDEV_MAX_BURST]; + int rxqid; }; static inline void diff --git a/lib/netdev.c b/lib/netdev.c index 765bf4b..69dfea4 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -57,6 +57,7 @@ #ifdef __linux__ #include "tc.h" #endif +#include "dpif-netdev.h" VLOG_DEFINE_THIS_MODULE(netdev); @@ -680,6 +681,7 @@ netdev_rxq_recv(struct netdev_rxq *rx, struct dp_packet_batch *batch) } else { batch->count = 0; } + batch->rxqid = rx->queue_id; return retval; }