From patchwork Fri Aug 2 22:20:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hefty, Sean" X-Patchwork-Id: 2838201 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3E781BF53E for ; Fri, 2 Aug 2013 22:20:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66F5420371 for ; Fri, 2 Aug 2013 22:20:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92FFE20352 for ; Fri, 2 Aug 2013 22:20:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754090Ab3HBWUb (ORCPT ); Fri, 2 Aug 2013 18:20:31 -0400 Received: from mga01.intel.com ([192.55.52.88]:20958 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754184Ab3HBWUa (ORCPT ); Fri, 2 Aug 2013 18:20:30 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 02 Aug 2013 15:20:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,804,1367996400"; d="scan'208";a="375385379" Received: from cst-linux.jf.intel.com ([10.23.221.72]) by fmsmga001.fm.intel.com with ESMTP; 02 Aug 2013 15:20:28 -0700 From: sean.hefty@intel.com To: linux-rdma@vger.kernel.org Cc: Sean Hefty Subject: [PATCH librdmacm 4/5] rsocket: Return 0 on success for SOL_RDMA options Date: Fri, 2 Aug 2013 15:20:21 -0700 Message-Id: <1375482022-5953-5-git-send-email-sean.hefty@intel.com> X-Mailer: git-send-email 1.7.3 In-Reply-To: <1375482022-5953-1-git-send-email-sean.hefty@intel.com> References: <1375482022-5953-1-git-send-email-sean.hefty@intel.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Hefty The processing of SOL_RDMA does not set the return value in the case of successfully handled options. Signed-off-by: Sean Hefty --- src/rsocket.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/rsocket.c b/src/rsocket.c index 57df290..d544dd0 100644 --- a/src/rsocket.c +++ b/src/rsocket.c @@ -3314,18 +3314,22 @@ int rsetsockopt(int socket, int level, int optname, switch (optname) { case RDMA_SQSIZE: rs->sq_size = min((*(uint32_t *) optval), RS_QP_MAX_SIZE); + ret = 0; break; case RDMA_RQSIZE: rs->rq_size = min((*(uint32_t *) optval), RS_QP_MAX_SIZE); + ret = 0; break; case RDMA_INLINE: rs->sq_inline = min(*(uint32_t *) optval, RS_QP_MAX_SIZE); if (rs->sq_inline < RS_MIN_INLINE) rs->sq_inline = RS_MIN_INLINE; + ret = 0; break; case RDMA_IOMAPSIZE: rs->target_iomap_size = (uint16_t) rs_scale_to_value( (uint8_t) rs_value_to_scale(*(int *) optval, 8), 8); + ret = 0; break; case RDMA_ROUTE: if ((rs->optval = calloc(optlen, 1))) {