Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Feb 2015 17:33:36 -0800
From:      NGie Cooper <yaneurabeya@gmail.com>
To:        Navdeep Parhar <np@freebsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r278303 - in head/sys: dev/cxgbe modules/cxgbe modules/cxgbe/if_cxl
Message-ID:  <CAGHfRMCfWoc760X4B%2BWXrGjdUhtXch0VTsv8Ek3J5rY_zeTsyg@mail.gmail.com>
In-Reply-To: <201502060110.t161A58m067355@svn.freebsd.org>
References:  <201502060110.t161A58m067355@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 5, 2015 at 5:10 PM, Navdeep Parhar <np@freebsd.org> wrote:
> Author: np
> Date: Fri Feb  6 01:10:04 2015
> New Revision: 278303
> URL: https://svnweb.freebsd.org/changeset/base/278303
>
> Log:
>   cxgbe(4): Add a minimal if_cxl module that pulls in the real driver as
>   a dependency.  This ensures "ifconfig cxl<n> ..." does the right thing
>   even when it's run with no driver loaded.
>
>   if_cxl.ko is the tiniest module in /boot/kernel.

A couple things:

1. cxl(4) doesn't have a manpage:

$ man 4 cxl
No manual entry for cxl
$ man 4 if_cxl
No manual entry for if_cxl

2. This could have been done with hardlinks to avoid creating an
additional driver (and on the plus side it saves disk space):

$ git diff Makefile
diff --git a/sys/modules/cxgbe/if_cxgbe/Makefile
b/sys/modules/cxgbe/if_cxgbe/Makefile
index 32347f4..b00ee0a 100644
--- a/sys/modules/cxgbe/if_cxgbe/Makefile
+++ b/sys/modules/cxgbe/if_cxgbe/Makefile
@@ -25,5 +25,7 @@ SRCS+=        t4_tracer.c

 CFLAGS+= -I${CXGBE}

+LINKS+=        ${KMOD}.ko if_cxl.ko
+
 .include <bsd.kmod.mk>
 CFLAGS+= ${GCC_MS_EXTENSIONS}

This is basically what I'm going to set out and do to fix this PR:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=186449 (it's another
item that irritates me with misnamed drivers, like ixgbe.ko used to
be...).

Using hardlinks instead of renaming the driver is preferred because it
makes MFCing possible without breaking loader.conf for sysadmins. In
general, major version steps (CURRENT) should use if_<foo>
consistently.

Thanks!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGHfRMCfWoc760X4B%2BWXrGjdUhtXch0VTsv8Ek3J5rY_zeTsyg>