From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965568AbcIPU3K (ORCPT ); Fri, 16 Sep 2016 16:29:10 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:36874 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965082AbcIPU3C (ORCPT ); Fri, 16 Sep 2016 16:29:02 -0400 Subject: Re: [PATCH v2 1/8] ib_mad: incoming sminfo SMPs gets discarded if no process_mad function is registered To: Knut Omang , Doug Ledford References: <66d69383a3376018d99c025cd188150f6673b209.1474049924.git-series.knut.omang@oracle.com> Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Hefty , Hal Rosenstock , Ira Weiny , Sagi Grimberg , Christoph Hellwig , Bart Van Assche , Dag Moxnes , Mark Bloch , Dean Luick From: Santosh Shilimkar Organization: Oracle Corporation Message-ID: Date: Fri, 16 Sep 2016 13:28:09 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <66d69383a3376018d99c025cd188150f6673b209.1474049924.git-series.knut.omang@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/16/2016 11:31 AM, Knut Omang wrote: > From: Dag Moxnes > > The process_mad function is an optional IB driver entry point > allows a driver to intercept or modify MAD traffic. > > This fix allows MAD traffic to flow down to the device also > when MAD traffic is completely handled by the device and > no process_mad function is provided. > > SIF, the new Oracle Infiniband HCA, is the first HCA > where the device itself makes all decision wrt MAD processing. > Up till now devices either supports MAD, and do then > implement the process_mad entry point, or do not > support MAD at all, and then do not implement process_mad. > > SIF introduces a 3rd case: Supports MAD > but do not terminate any MAD requests in the driver. > This case is not handled well by the current code. > > The problem is that the handle_outgoing_dr_smp function > has an implicit assumption that some packets are handled > by the process_mad function itself. > > There is no way to provide return values from the process_mad > function that ensures that packets are always forwarded to the device, > so the only viable solution without breaking the API > seems to be to not implement process_mad. No SOBs ?