From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH rdma-next 01/10] IB/core: Add raw packet protocol Date: Mon, 28 Nov 2016 15:25:59 -0700 Message-ID: <20161128222559.GB744@obsidianresearch.com> References: <1480258296-27032-1-git-send-email-leon@kernel.org> <1480258296-27032-2-git-send-email-leon@kernel.org> <20161128170056.GC28381@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Or Gerlitz Cc: Leon Romanovsky , Doug Ledford , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Steve Wise , Mike Marciniszyn , Dennis Dalessandro , Lijun Ou , "Wei Hu(Xavier)" , Faisal Latif , Yishai Hadas , Selvin Xavier , Devesh Sharma , Mitesh Ahuja , Christian Benvenuti , Dave Goodell , Moni Shoua , Or Gerlitz List-Id: linux-rdma@vger.kernel.org On Mon, Nov 28, 2016 at 10:57:00PM +0200, Or Gerlitz wrote: > On Mon, Nov 28, 2016 at 7:00 PM, Jason Gunthorpe > wrote: > > On Sun, Nov 27, 2016 at 04:51:27PM +0200, Leon Romanovsky wrote: > > > >> +static inline bool rdma_protocol_raw_packet(const struct ib_device *device, u8 port_num) > >> +{ > >> + return device->port_immutable[port_num].core_cap_flags & RDMA_CORE_CAP_PROT_RAW_PACKET; > >> +} > > > > Does the mlx drivers really register ports with different capabilities > > as the same ib_device? I'm not sure that should be allowed. > > mlx4 yeah (practically for the last ~10 years) for instance Eth ports > don't support SMI -- this goes back to the fact that mlx4 devices are > single PCI function with potentially two ports and each port can be struct ib_device is not linked to a PCI device. AFAIK mlx4 created one ib_device for rocee ports and one for IB, or at least it should or things are already broken. > set to different link layer. But this no more holds for mlx5, these > devices are function-per-port and hence IB device per port. Since it has nothing to do with pci devices, please do this properly. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html