Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 May 2015 20:56:12 +0000 (UTC)
From:      Eric Joyner <erj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r283668 - in stable/10/sys: conf dev/ixgbe modules modules/ix modules/ixgbe modules/ixv
Message-ID:  <201505282056.t4SKuCIX055744@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: erj
Date: Thu May 28 20:56:11 2015
New Revision: 283668
URL: https://svnweb.freebsd.org/changeset/base/283668

Log:
  Fix build issue and incompatibilites introduced by r283620.
  
  - Re-introduce "device ixgbe" option for kernel configs. This allows
    users to continue using existing kernel configurations, while still
    letting if_ix and if_ixv exist to allow ifconfig magic to work.
    Though the amd64 GENERIC config has "device ix" and "device ixv" instead of
    "device ixgbe".
  
    This is achieved by making the if_ixgbe module a stub that depends
    on if_ix and if_ixv.
  
  - Replace if_baudrate assignment with if_initbaudrate() call.
  
  Thanks to jhb@ for the stub module suggestion and pointing out the if_baudrate
  error.
  
  Approved by:	jfv (mentor)

Added:
  stable/10/sys/dev/ixgbe/ixgbe.c   (contents, props changed)
Modified:
  stable/10/sys/conf/files
  stable/10/sys/dev/ixgbe/if_ix.c
  stable/10/sys/modules/Makefile
  stable/10/sys/modules/ix/Makefile
  stable/10/sys/modules/ixgbe/Makefile
  stable/10/sys/modules/ixv/Makefile

Modified: stable/10/sys/conf/files
==============================================================================
--- stable/10/sys/conf/files	Thu May 28 20:36:37 2015	(r283667)
+++ stable/10/sys/conf/files	Thu May 28 20:56:11 2015	(r283668)
@@ -1716,35 +1716,37 @@ iwn6050.fw			optional iwn6050fw | iwnfw	
 dev/ixgb/if_ixgb.c		optional ixgb
 dev/ixgb/ixgb_ee.c		optional ixgb
 dev/ixgb/ixgb_hw.c		optional ixgb
-dev/ixgbe/if_ix.c		optional ix inet \
+dev/ixgbe/ixgbe.c		optional ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP"
-dev/ixgbe/if_ixv.c		optional ixv inet \
+dev/ixgbe/if_ix.c		optional ix inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP"
-dev/ixgbe/ix_txrx.c		optional ixv inet \
+dev/ixgbe/if_ixv.c		optional ixv inet | ixgbe inet \
+	compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP"
+dev/ixgbe/ix_txrx.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_phy.c		optional ix ixv inet \
+dev/ixgbe/ixgbe_phy.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_api.c		optional ix ixv inet \
+dev/ixgbe/ixgbe_api.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_common.c	optional ix ixv inet \
+dev/ixgbe/ixgbe_common.c	optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_mbx.c		optional ix ixv inet \
+dev/ixgbe/ixgbe_mbx.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_vf.c		optional ix ixv inet \
+dev/ixgbe/ixgbe_vf.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_82598.c		optional ix ixv inet \
+dev/ixgbe/ixgbe_82598.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_82599.c		optional ix ixv inet \
+dev/ixgbe/ixgbe_82599.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_x540.c		optional ix ixv inet \
+dev/ixgbe/ixgbe_x540.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_x550.c		optional ix ixv inet \
+dev/ixgbe/ixgbe_x550.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_dcb.c		optional ix ixv inet \
+dev/ixgbe/ixgbe_dcb.c		optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_dcb_82598.c	optional ix ixv inet \
+dev/ixgbe/ixgbe_dcb_82598.c	optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_dcb_82599.c	optional ix ixv inet \
+dev/ixgbe/ixgbe_dcb_82599.c	optional ix inet | ixv inet | ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
 dev/ixl/if_ixl.c		optional ixl inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixl"

Modified: stable/10/sys/dev/ixgbe/if_ix.c
==============================================================================
--- stable/10/sys/dev/ixgbe/if_ix.c	Thu May 28 20:36:37 2015	(r283667)
+++ stable/10/sys/dev/ixgbe/if_ix.c	Thu May 28 20:56:11 2015	(r283668)
@@ -2491,20 +2491,11 @@ ixgbe_setup_interface(device_t dev, stru
 		return (-1);
 	}
 	if_initname(ifp, device_get_name(dev), device_get_unit(dev));
-	ifp->if_baudrate = IF_Gbps(10);
+	if_initbaudrate(ifp, IF_Gbps(10));
 	ifp->if_init = ixgbe_init;
 	ifp->if_softc = adapter;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = ixgbe_ioctl;
-#if __FreeBSD_version >= 1100036
-	if_setgetcounterfn(ifp, ixgbe_get_counter);
-#endif
-#if __FreeBSD_version >= 1100045
-	/* TSO parameters */
-	ifp->if_hw_tsomax = 65518;
-	ifp->if_hw_tsomaxsegcount = IXGBE_82599_SCATTER;
-	ifp->if_hw_tsomaxsegsize = 2048;
-#endif
 #ifndef IXGBE_LEGACY_TX
 	ifp->if_transmit = ixgbe_mq_start;
 	ifp->if_qflush = ixgbe_qflush;

Added: stable/10/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/sys/dev/ixgbe/ixgbe.c	Thu May 28 20:56:11 2015	(r283668)
@@ -0,0 +1,50 @@
+/******************************************************************************
+
+  Copyright (c) 2001-2015, Intel Corporation 
+  All rights reserved.
+  
+  Redistribution and use in source and binary forms, with or without 
+  modification, are permitted provided that the following conditions are met:
+  
+   1. Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+  
+   2. Redistributions in binary form must reproduce the above copyright 
+      notice, this list of conditions and the following disclaimer in the 
+      documentation and/or other materials provided with the distribution.
+  
+   3. Neither the name of the Intel Corporation nor the names of its 
+      contributors may be used to endorse or promote products derived from 
+      this software without specific prior written permission.
+  
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+
+******************************************************************************/
+/*$FreeBSD$*/
+
+#include <sys/cdefs.h>
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+
+static int
+mod_event(module_t mod, int cmd, void *arg)
+{
+	return (0);
+}
+
+static moduledata_t ixgbe_mod = {"if_ixgbe", mod_event};
+DECLARE_MODULE(ixgbe, ixgbe_mod, SI_SUB_EXEC, SI_ORDER_ANY);
+MODULE_DEPEND(ixgbe, ix, 1, 1, 1);
+MODULE_DEPEND(ixgbe, ixv, 1, 1, 1);
+

Modified: stable/10/sys/modules/Makefile
==============================================================================
--- stable/10/sys/modules/Makefile	Thu May 28 20:36:37 2015	(r283667)
+++ stable/10/sys/modules/Makefile	Thu May 28 20:56:11 2015	(r283668)
@@ -171,9 +171,10 @@ SUBDIR=	\
 	${_iwifw} \
 	${_iwn} \
 	${_iwnfw} \
-	${_ixgb} \
 	${_ix} \
 	${_ixv} \
+	${_ixgb} \
+	${_ixgbe} \
 	${_ixl} \
 	${_ixlv} \
 	jme \
@@ -616,6 +617,8 @@ _iwn=		iwn
 .if ${MK_SOURCELESS_UCODE} != "no"
 _iwnfw=		iwnfw
 .endif
+_ix=		ix
+_ixv=		ixv
 _ixgb=		ixgb
 _ixgbe=		ixgbe
 _mly=		mly
@@ -722,6 +725,8 @@ _iwn=		iwn
 .if ${MK_SOURCELESS_UCODE} != "no"
 _iwnfw=		iwnfw
 .endif
+_ix=		ix
+_ixv=		ixv
 _ixgb=		ixgb
 _ixgbe=		ixgbe
 _ixl=		ixl

Modified: stable/10/sys/modules/ix/Makefile
==============================================================================
--- stable/10/sys/modules/ix/Makefile	Thu May 28 20:36:37 2015	(r283667)
+++ stable/10/sys/modules/ix/Makefile	Thu May 28 20:56:11 2015	(r283668)
@@ -4,7 +4,7 @@
 
 KMOD    = if_ix
 SRCS    = device_if.h bus_if.h pci_if.h
-SRCS	+= opt_inet.h opt_inet6.h opt_rss.h
+SRCS	+= opt_inet.h opt_inet6.h
 SRCS    += if_ix.c ix_txrx.c
 # Shared source
 SRCS    += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c

Modified: stable/10/sys/modules/ixgbe/Makefile
==============================================================================
--- stable/10/sys/modules/ixgbe/Makefile	Thu May 28 20:36:37 2015	(r283667)
+++ stable/10/sys/modules/ixgbe/Makefile	Thu May 28 20:56:11 2015	(r283668)
@@ -1,29 +1,10 @@
 #$FreeBSD$
 
-.include <bsd.own.mk>
-
 .PATH:  ${.CURDIR}/../../dev/ixgbe
 
 KMOD    = if_ixgbe
 SRCS    = device_if.h bus_if.h pci_if.h
-SRCS	+= opt_inet.h opt_inet6.h
-SRCS    += ixgbe.c ixv.c
-# Shared source
-SRCS    += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c
-SRCS    += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c
-SRCS    += ixgbe_82599.c ixgbe_82598.c ixgbe_x540.c
+SRCS    += ixgbe.c
 CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP
 
-.if !defined(KERNBUILDDIR)
-.if ${MK_INET_SUPPORT} != "no"
-opt_inet.h:
-	@echo "#define INET 1" > ${.TARGET}
-.endif
-
-.if ${MK_INET6_SUPPORT} != "no"
-opt_inet6.h:
-	@echo "#define INET6 1" > ${.TARGET}
-.endif
-.endif
-
 .include <bsd.kmod.mk>

Modified: stable/10/sys/modules/ixv/Makefile
==============================================================================
--- stable/10/sys/modules/ixv/Makefile	Thu May 28 20:36:37 2015	(r283667)
+++ stable/10/sys/modules/ixv/Makefile	Thu May 28 20:56:11 2015	(r283668)
@@ -4,7 +4,7 @@
 
 KMOD    = if_ixv
 SRCS    = device_if.h bus_if.h pci_if.h
-SRCS	+= opt_inet.h opt_inet6.h opt_rss.h
+SRCS	+= opt_inet.h opt_inet6.h
 SRCS    += if_ixv.c ix_txrx.c
 # Shared source
 SRCS    += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505282056.t4SKuCIX055744>