From owner-svn-src-head@FreeBSD.ORG Thu Jul 11 13:23:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 250741F1; Thu, 11 Jul 2013 13:23:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id F3C221CC9; Thu, 11 Jul 2013 13:23:16 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4927CB982; Thu, 11 Jul 2013 09:23:16 -0400 (EDT) From: John Baldwin To: Garrett Cooper Subject: Re: svn commit: r253048 - in head/sys/ofed: drivers/net/mlx4 include/linux Date: Thu, 11 Jul 2013 08:26:44 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201307082125.r68LPDlY023493@svn.freebsd.org> <201307091120.22114.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201307110826.44287.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 11 Jul 2013 09:23:16 -0400 (EDT) Cc: svn-src-head , svn-src-all , src-committers , shahark@mellanox.com, acornehl@gmail.com X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 13:23:17 -0000 On Wednesday, July 10, 2013 7:58:30 pm Garrett Cooper wrote: > On Tue, Jul 9, 2013 at 8:20 AM, John Baldwin wrote: > > ... > > > I hadn't seen it. I had wondered if the '\n' issue was a generic sysfs thing. > > It sounds like it is and I'd be happy to revert the mlx4 change and alter the > > sysfs bits to manage the newline directly if that is more appropriate. > > I'll doublecheck this, but basically I'm really adverse to diverging > from Linux in this area -- hence that's why I did what I did in the PR > I mentioned. I checked the other sysfs attributes under sys/ofed and all the ones that deal with strings expect the newline. There might be some that are "blobs" that do not expect newlines, but it wasn't clear. I do agree that it would be best to avoid diffs for this case if possible in all the sysfs handlers. (It would be even nicer if ofed used a more abstract notion for device attributes in its drivers that could map to sysctl on FreeBSD and sysfs device attributes on Linux, but that's a much larger change, and one OFED would have to want to do.) > > I'd also like this to use sysctl_handle_string() if at all possible. Are you in > > a position to test patches still? > > Unfortunately I'm not right now :(. Anthony may or may not be able to > test this out (I used his machine when we were hacking around on IB > stuff). > > > If so, maybe give this a whirl. It's similar to yours except it uses > > sysctl_handle_string() and strlcat() rather than continuing to do things > > by hand. It also outputs an empty string to userland if the attribute > > doesn't have a show method (your version would never pass out an old > > string in that case unlike the original code). > > Can you please pass along a patch to Anthony and me so we can try and > apply it to test it out (Gmail's going to taint the inline patch, as > is the EMC Exchange server with the patch attachment)? If Anthony > still has the machine setup, then I'd be more than happy to test out > the patch :). Ok, I've put the patch at a URL. Note that it is relative to what was just committed to HEAD, so to test on 9 you'd have to apply both patches. http://www.freebsd.org/~jhb/patches/ofed_sysfs.patch -- John Baldwin