From patchwork Wed Apr 3 13:06:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Squyres X-Patchwork-Id: 2387311 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9014BDFB79 for ; Wed, 3 Apr 2013 13:22:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760892Ab3DCNWh (ORCPT ); Wed, 3 Apr 2013 09:22:37 -0400 Received: from mtv-iport-3.cisco.com ([173.36.130.14]:21089 "EHLO mtv-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758808Ab3DCNWh (ORCPT ); Wed, 3 Apr 2013 09:22:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1650; q=dns/txt; s=iport; t=1364995357; x=1366204957; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=MRmTR+oF9yy7NXAkGGu5FToeTlkwKTfALXOj72J/wys=; b=eRtgzmNbcsSM/OD8gicU325l8qZDtjrLQu+mY+x8UeM7vhAGxqI9vxFG Ok+saU8HTVc5IS+kQeRW9MehS5xJCua/uutH/PaNqhrM+sclkwxTEerSo TbzwkoVWMRTWTWqCO6bTKEpSHJqs/turJ7Wr7f5oJZrfUREFbYI8VWQbq 8=; X-IronPort-AV: E=Sophos;i="4.87,401,1363132800"; d="scan'208";a="75156647" Received: from mtv-core-4.cisco.com ([171.68.58.9]) by mtv-iport-3.cisco.com with ESMTP; 03 Apr 2013 13:13:07 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by mtv-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id r33DD6Om011623; Wed, 3 Apr 2013 13:13:06 GMT Received: by cisco.com (Postfix, from userid 182726) id 235D03FAA583; Wed, 3 Apr 2013 06:13:06 -0700 (PDT) From: Jeff Squyres To: linux-rdma@vger.kernel.org Cc: umalhi@cisco.com, Jeff Squyres Subject: [PATCH 2/4] Add IBV_MTU_1500|9000 enums. Date: Wed, 3 Apr 2013 06:06:53 -0700 Message-Id: <1364994415-8330-2-git-send-email-jsquyres@cisco.com> X-Mailer: git-send-email 1.8.1.1 In-Reply-To: <1364994415-8330-1-git-send-email-jsquyres@cisco.com> References: <1364994415-8330-1-git-send-email-jsquyres@cisco.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Allow specification of common Ethernet MTUs. --- examples/devinfo.c | 2 ++ examples/pingpong.c | 2 ++ include/infiniband/verbs.h | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/devinfo.c b/examples/devinfo.c index 98a6b4b..6700882 100644 --- a/examples/devinfo.c +++ b/examples/devinfo.c @@ -118,8 +118,10 @@ static const char *mtu_str(enum ibv_mtu max_mtu) case IBV_MTU_256: return "256"; case IBV_MTU_512: return "512"; case IBV_MTU_1024: return "1024"; + case IBV_MTU_1500: return "1500"; case IBV_MTU_2048: return "2048"; case IBV_MTU_4096: return "4096"; + case IBV_MTU_9000: return "9000"; default: return "invalid MTU"; } } diff --git a/examples/pingpong.c b/examples/pingpong.c index 90732ef..d7443a8 100644 --- a/examples/pingpong.c +++ b/examples/pingpong.c @@ -42,8 +42,10 @@ enum ibv_mtu pp_mtu_to_enum(int mtu) case 256: return IBV_MTU_256; case 512: return IBV_MTU_512; case 1024: return IBV_MTU_1024; + case 1500: return IBV_MTU_1500; case 2048: return IBV_MTU_2048; case 4096: return IBV_MTU_4096; + case 9000: return IBV_MTU_9000; default: return -1; } } diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h index 6a6944c..1583c34 100644 --- a/include/infiniband/verbs.h +++ b/include/infiniband/verbs.h @@ -150,8 +150,10 @@ enum ibv_mtu { IBV_MTU_256 = 1, IBV_MTU_512 = 2, IBV_MTU_1024 = 3, - IBV_MTU_2048 = 4, - IBV_MTU_4096 = 5 + IBV_MTU_1500 = 4, + IBV_MTU_2048 = 5, + IBV_MTU_4096 = 6, + IBV_MTU_9000 = 7 }; enum ibv_port_state {