Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145965980
D37827.id114453.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D37827.id114453.diff
View Options
diff --git a/sys/dev/vnic/nic.h b/sys/dev/vnic/nic.h
--- a/sys/dev/vnic/nic.h
+++ b/sys/dev/vnic/nic.h
@@ -292,7 +292,7 @@
struct nicvf *pnicvf;
device_t dev;
- struct ifnet * ifp;
+ if_t ifp;
struct sx core_sx;
struct ifmedia if_media;
uint32_t if_flags;
diff --git a/sys/dev/vnic/nicvf_main.c b/sys/dev/vnic/nicvf_main.c
--- a/sys/dev/vnic/nicvf_main.c
+++ b/sys/dev/vnic/nicvf_main.c
@@ -147,17 +147,17 @@
static int nicvf_setup_ifmedia(struct nicvf *);
static void nicvf_hw_addr_random(uint8_t *);
-static int nicvf_if_ioctl(struct ifnet *, u_long, caddr_t);
+static int nicvf_if_ioctl(if_t, u_long, caddr_t);
static void nicvf_if_init(void *);
static void nicvf_if_init_locked(struct nicvf *);
-static int nicvf_if_transmit(struct ifnet *, struct mbuf *);
-static void nicvf_if_qflush(struct ifnet *);
-static uint64_t nicvf_if_getcounter(struct ifnet *, ift_counter);
+static int nicvf_if_transmit(if_t, struct mbuf *);
+static void nicvf_if_qflush(if_t);
+static uint64_t nicvf_if_getcounter(if_t, ift_counter);
static int nicvf_stop_locked(struct nicvf *);
-static void nicvf_media_status(struct ifnet *, struct ifmediareq *);
-static int nicvf_media_change(struct ifnet *);
+static void nicvf_media_status(if_t, struct ifmediareq *);
+static int nicvf_media_change(if_t);
static void nicvf_tick_stats(void *);
@@ -336,7 +336,7 @@
static int
nicvf_setup_ifnet(struct nicvf *nic)
{
- struct ifnet *ifp;
+ if_t ifp;
ifp = if_alloc(IFT_ETHER);
if (ifp == NULL) {
@@ -418,7 +418,7 @@
}
static int
-nicvf_if_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+nicvf_if_ioctl(if_t ifp, u_long cmd, caddr_t data)
{
struct nicvf *nic;
struct rcv_queue *rq;
@@ -571,7 +571,7 @@
nicvf_if_init_locked(struct nicvf *nic)
{
struct queue_set *qs = nic->qs;
- struct ifnet *ifp;
+ if_t ifp;
int qidx;
int err;
caddr_t if_addr;
@@ -643,7 +643,7 @@
}
static int
-nicvf_if_transmit(struct ifnet *ifp, struct mbuf *mbuf)
+nicvf_if_transmit(if_t ifp, struct mbuf *mbuf)
{
struct nicvf *nic = if_getsoftc(ifp);
struct queue_set *qs = nic->qs;
@@ -699,7 +699,7 @@
}
static void
-nicvf_if_qflush(struct ifnet *ifp)
+nicvf_if_qflush(if_t ifp)
{
struct nicvf *nic;
struct queue_set *qs;
@@ -721,7 +721,7 @@
}
static uint64_t
-nicvf_if_getcounter(struct ifnet *ifp, ift_counter cnt)
+nicvf_if_getcounter(if_t ifp, ift_counter cnt)
{
struct nicvf *nic;
struct nicvf_hw_stats *hw_stats;
@@ -755,7 +755,7 @@
}
static void
-nicvf_media_status(struct ifnet *ifp, struct ifmediareq *ifmr)
+nicvf_media_status(if_t ifp, struct ifmediareq *ifmr)
{
struct nicvf *nic = if_getsoftc(ifp);
@@ -799,7 +799,7 @@
}
static int
-nicvf_media_change(struct ifnet *ifp __unused)
+nicvf_media_change(if_t ifp __unused)
{
return (0);
@@ -1523,7 +1523,7 @@
static int
nicvf_stop_locked(struct nicvf *nic)
{
- struct ifnet *ifp;
+ if_t ifp;
int qidx;
struct queue_set *qs = nic->qs;
union nic_mbx mbx = {};
diff --git a/sys/dev/vnic/nicvf_queues.c b/sys/dev/vnic/nicvf_queues.c
--- a/sys/dev/vnic/nicvf_queues.c
+++ b/sys/dev/vnic/nicvf_queues.c
@@ -732,7 +732,7 @@
nicvf_cq_intr_handler(struct nicvf *nic, uint8_t cq_idx)
{
struct mbuf *mbuf;
- struct ifnet *ifp;
+ if_t ifp;
int processed_cqe, tx_done = 0;
#ifdef DEBUG
int work_done = 0;
@@ -831,7 +831,7 @@
while (!buf_ring_empty(cq->rx_br)) {
mbuf = buf_ring_dequeue_mc(cq->rx_br);
if (__predict_true(mbuf != NULL))
- (*ifp->if_input)(ifp, mbuf);
+ if_input(ifp, mbuf);
}
return (cmp_err);
@@ -987,7 +987,7 @@
nicvf_xmit_locked(struct snd_queue *sq)
{
struct nicvf *nic;
- struct ifnet *ifp;
+ if_t ifp;
struct mbuf *next;
int err;
@@ -1020,7 +1020,7 @@
{
struct snd_queue *sq = (struct snd_queue *)arg;
struct nicvf *nic;
- struct ifnet *ifp;
+ if_t ifp;
int err;
nic = sq->nic;
@@ -1296,7 +1296,7 @@
union nic_mbx mbx = {};
struct rcv_queue *rq;
struct rq_cfg rq_cfg;
- struct ifnet *ifp;
+ if_t ifp;
struct lro_ctrl *lro;
ifp = nic->ifp;
diff --git a/sys/dev/vnic/thunder_mdio.c b/sys/dev/vnic/thunder_mdio.c
--- a/sys/dev/vnic/thunder_mdio.c
+++ b/sys/dev/vnic/thunder_mdio.c
@@ -93,8 +93,8 @@
static int thunder_mdio_read(device_t, int, int);
static int thunder_mdio_write(device_t, int, int, int);
-static int thunder_ifmedia_change_stub(struct ifnet *);
-static void thunder_ifmedia_status_stub(struct ifnet *, struct ifmediareq *);
+static int thunder_ifmedia_change_stub(if_t );
+static void thunder_ifmedia_status_stub(if_t , struct ifmediareq *);
static int thunder_mdio_media_status(device_t, int, int *, int *, int *);
static int thunder_mdio_media_change(device_t, int, int, int, int);
@@ -351,14 +351,14 @@
}
static int
-thunder_ifmedia_change_stub(struct ifnet *ifp __unused)
+thunder_ifmedia_change_stub(if_t ifp __unused)
{
/* Will never be called by if_media */
return (0);
}
static void
-thunder_ifmedia_status_stub(struct ifnet *ifp __unused, struct ifmediareq
+thunder_ifmedia_status_stub(if_t ifp __unused, struct ifmediareq
*ifmr __unused)
{
/* Will never be called by if_media */
diff --git a/sys/dev/vnic/thunder_mdio_fdt.c b/sys/dev/vnic/thunder_mdio_fdt.c
--- a/sys/dev/vnic/thunder_mdio_fdt.c
+++ b/sys/dev/vnic/thunder_mdio_fdt.c
@@ -34,11 +34,14 @@
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/module.h>
+#include <sys/socket.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
#include <dev/fdt/simplebus.h>
+#include <net/if.h>
+
#include <machine/bus.h>
#include <machine/resource.h>
diff --git a/sys/dev/vnic/thunder_mdio_var.h b/sys/dev/vnic/thunder_mdio_var.h
--- a/sys/dev/vnic/thunder_mdio_var.h
+++ b/sys/dev/vnic/thunder_mdio_var.h
@@ -44,7 +44,7 @@
struct phy_desc {
device_t miibus; /* One miibus per LMAC */
- struct ifnet * ifp; /* Fake ifp to satisfy miibus */
+ if_t ifp; /* Fake ifp to satisfy miibus */
int lmacid; /* ID number of LMAC connected */
TAILQ_ENTRY(phy_desc) phy_desc_list;
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 2:35 PM (43 m, 13 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29033007
Default Alt Text
D37827.id114453.diff (5 KB)
Attached To
Mode
D37827: Mechanically convert vnic(4) to DrvAPI
Attached
Detach File
Event Timeline
Log In to Comment