Page MenuHomeFreeBSD

D29102.id85342.diff
No OneTemporary

D29102.id85342.diff

diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c
--- a/sys/dev/bnxt/if_bnxt.c
+++ b/sys/dev/bnxt/if_bnxt.c
@@ -327,8 +327,6 @@
.isc_driver_version = bnxt_driver_version,
};
-if_shared_ctx_t bnxt_sctx = &bnxt_sctx_init;
-
/*
* Device Methods
*/
@@ -336,7 +334,7 @@
static void *
bnxt_register(device_t dev)
{
- return bnxt_sctx;
+ return (&bnxt_sctx_init);
}
/*
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -554,8 +554,6 @@
.isc_ntxd_default = {EM_DEFAULT_TXD},
};
-if_shared_ctx_t em_sctx = &em_sctx_init;
-
static struct if_shared_ctx igb_sctx_init = {
.isc_magic = IFLIB_MAGIC,
.isc_q_align = PAGE_SIZE,
@@ -583,8 +581,6 @@
.isc_ntxd_default = {EM_DEFAULT_TXD},
};
-if_shared_ctx_t igb_sctx = &igb_sctx_init;
-
/*****************************************************************
*
* Dump Registers
@@ -707,13 +703,13 @@
static void *
em_register(device_t dev)
{
- return (em_sctx);
+ return (&em_sctx_init);
}
static void *
igb_register(device_t dev)
{
- return (igb_sctx);
+ return (&igb_sctx_init);
}
static int
diff --git a/sys/dev/e1000/igb_txrx.c b/sys/dev/e1000/igb_txrx.c
--- a/sys/dev/e1000/igb_txrx.c
+++ b/sys/dev/e1000/igb_txrx.c
@@ -72,8 +72,6 @@
.ift_legacy_intr = em_intr
};
-extern if_shared_ctx_t em_sctx;
-
/**********************************************************************
*
* Setup work for hardware segmentation offload (TSO) on
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -392,8 +392,6 @@
.isc_ntxd_default = {DEFAULT_TXD},
};
-if_shared_ctx_t ixgbe_sctx = &ixgbe_sctx_init;
-
/************************************************************************
* ixgbe_if_tx_queues_alloc
************************************************************************/
@@ -855,7 +853,7 @@
static void *
ixgbe_register(device_t dev)
{
- return (ixgbe_sctx);
+ return (&ixgbe_sctx_init);
} /* ixgbe_register */
/************************************************************************
diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c
--- a/sys/dev/ixgbe/if_ixv.c
+++ b/sys/dev/ixgbe/if_ixv.c
@@ -233,12 +233,10 @@
.isc_ntxd_default = {DEFAULT_TXD},
};
-if_shared_ctx_t ixv_sctx = &ixv_sctx_init;
-
static void *
ixv_register(device_t dev)
{
- return (ixv_sctx);
+ return (&ixv_sctx_init);
}
/************************************************************************
diff --git a/sys/dev/ixgbe/ix_txrx.c b/sys/dev/ixgbe/ix_txrx.c
--- a/sys/dev/ixgbe/ix_txrx.c
+++ b/sys/dev/ixgbe/ix_txrx.c
@@ -72,8 +72,6 @@
.ift_legacy_intr = NULL
};
-extern if_shared_ctx_t ixgbe_sctx;
-
/************************************************************************
* ixgbe_tx_ctx_setup
*
diff --git a/sys/dev/ixl/if_iavf.c b/sys/dev/ixl/if_iavf.c
--- a/sys/dev/ixl/if_iavf.c
+++ b/sys/dev/ixl/if_iavf.c
@@ -272,13 +272,11 @@
.isc_ntxd_default = {IXL_DEFAULT_RING},
};
-if_shared_ctx_t iavf_sctx = &iavf_sctx_init;
-
/*** Functions ***/
static void *
iavf_register(device_t dev)
{
- return (iavf_sctx);
+ return (&iavf_sctx_init);
}
static int
diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c
--- a/sys/dev/ixl/if_ixl.c
+++ b/sys/dev/ixl/if_ixl.c
@@ -351,13 +351,11 @@
.isc_ntxd_default = {IXL_DEFAULT_RING},
};
-if_shared_ctx_t ixl_sctx = &ixl_sctx_init;
-
/*** Functions ***/
static void *
ixl_register(device_t dev)
{
- return (ixl_sctx);
+ return (&ixl_sctx_init);
}
static int
diff --git a/sys/net/iflib.h b/sys/net/iflib.h
--- a/sys/net/iflib.h
+++ b/sys/net/iflib.h
@@ -49,7 +49,7 @@
struct iflib_ctx;
typedef struct iflib_ctx *if_ctx_t;
struct if_shared_ctx;
-typedef struct if_shared_ctx *if_shared_ctx_t;
+typedef const struct if_shared_ctx *if_shared_ctx_t;
struct if_int_delay_info;
typedef struct if_int_delay_info *if_int_delay_info_t;
struct if_pseudo;

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 9:38 PM (6 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15746937
Default Alt Text
D29102.id85342.diff (3 KB)

Event Timeline