summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-10-07 20:23:33 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-10-07 20:23:33 +0000
commitee40940b6dd0101c46ccb7fce462a1f6cbddd7f7 (patch)
tree91ef2f551dede9ab3bdc0f8350fc818e7bdf84a3 /sys/net
parentc46ce783a795e76561b20beeadf0250f8707d92b (diff)
remove preliminary AOE (ata over ethernet) support. not finished after
many years and wide spread demand for support never materialized. time to pack it in.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_aoe.c59
-rw-r--r--sys/net/if_aoe.h113
-rw-r--r--sys/net/if_ethersubr.c11
3 files changed, 1 insertions, 182 deletions
diff --git a/sys/net/if_aoe.c b/sys/net/if_aoe.c
deleted file mode 100644
index 1c6f2431000..00000000000
--- a/sys/net/if_aoe.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* $OpenBSD: if_aoe.c,v 1.3 2011/07/04 03:18:01 tedu Exp $ */
-/*
- * Copyright (c) 2008 Ted Unangst <tedu@openbsd.org>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/workq.h>
-#include <sys/socket.h>
-#include <sys/mbuf.h>
-#include <net/if.h>
-#include <net/if_aoe.h>
-
-#ifdef AOE_DEBUG
-#define DPRINTF(x) printf x
-#else
-#define DPRINTF(x) /* nothing */
-#endif
-
-struct aoe_handler_head aoe_handlers = TAILQ_HEAD_INITIALIZER(aoe_handlers);
-
-void
-aoe_input(struct ifnet *ifp, struct mbuf *m)
-{
- struct aoe_packet *ap;
- struct aoe_handler *q = NULL;
-
- splassert(IPL_NET);
-
- ap = mtod(m, struct aoe_packet *);
- DPRINTF(("aoe packet %d %d\n", htons(ap->major), ap->minor));
-
- TAILQ_FOREACH(q, &aoe_handlers, next) {
- if (q->ifp == ifp) {
- if (ap->major == q->major && ap->minor == q->minor)
- break;
- }
- }
- if (!q) {
- DPRINTF(("no q\n"));
- m_freem(m);
- return;
- }
-
- if (workq_add_task(NULL, 0, q->fn, q, m) != 0)
- m_freem(m);
-}
diff --git a/sys/net/if_aoe.h b/sys/net/if_aoe.h
deleted file mode 100644
index be577ae74a9..00000000000
--- a/sys/net/if_aoe.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* $OpenBSD: if_aoe.h,v 1.3 2011/07/04 03:18:01 tedu Exp $ */
-/*
- * Copyright (c) 2007 Ted Unangst <tedu@openbsd.org>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-#include <sys/workq.h>
-#include <sys/timeout.h> /* for struct timeout */
-
-struct aoe_packet {
-#define AOE_F_ERROR (1 << 2)
-#define AOE_F_RESP (1 << 3)
-#if BYTE_ORDER == LITTLE_ENDIAN
- unsigned char flags : 4;
- unsigned char vers : 4;
-#else
- unsigned char vers : 4;
- unsigned char flags : 4;
-#endif
- unsigned char error;
- unsigned short major;
- unsigned char minor;
- unsigned char command;
- unsigned int tag;
- union {
- /* command packet */
- struct {
-#define AOE_AF_WRITE (1 << 0)
-#define AOE_AF_EXTENDED (1 << 6)
- unsigned char aflags;
- unsigned char feature;
- unsigned char sectorcnt;
-#define AOE_READ 0x20
-#define AOE_READ_EXT 0x24
-#define AOE_WRITE 0x30
-#define AOE_WRITE_EXT 0x34
- unsigned char cmd;
- unsigned char lba0;
- unsigned char lba1;
- unsigned char lba2;
-#define AOE_LBABIT 0x40
- unsigned char lba3;
- unsigned char lba4;
- unsigned char lba5;
- unsigned short reserved;
- unsigned char data[];
- } __packed;
- /* config packet */
- struct {
- unsigned short buffercnt;
- unsigned short firmwarevers;
- unsigned char configsectorcnt;
-#if BYTE_ORDER == LITTLE_ENDIAN
- unsigned char ccmd : 4;
- unsigned char serververs : 4;
-#else
- unsigned char serververs : 4;
- unsigned char ccmd : 4;
-#endif
- unsigned short configstringlen;
- unsigned char configstring[1024];
- } __packed;
- };
-} __packed;
-
-#define AOE_BLK2HDR(blk, ap) do { \
- ap->lba0 = blk; \
- ap->lba1 = blk >> 8; \
- ap->lba2 = blk >> 16; \
-} while (0)
-
-#define AOE_HDR2BLK(ap, blk) do { \
- blk = 0; \
- blk |= ap->lba0; \
- blk |= ap->lba1 << 8; \
- blk |= ap->lba2 << 16; \
-} while (0)
-
-
-#define AOE_CFGHDRLEN 32
-#define AOE_CMDHDRLEN 36
-
-struct aoe_req {
- void *v;
- int tag;
- int len;
- TAILQ_ENTRY(aoe_req) next;
- struct timeout to;
-};
-
-struct aoe_handler {
- TAILQ_ENTRY(aoe_handler) next;
- unsigned short major;
- unsigned char minor;
- struct ifnet *ifp;
- workq_fn fn;
- TAILQ_HEAD(, aoe_req) reqs;
-};
-
-extern TAILQ_HEAD(aoe_handler_head, aoe_handler) aoe_handlers;
-extern int aoe_waiting;
-
-void aoe_input(struct ifnet *, struct mbuf *);
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index e37066984d1..9682aca3484 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.174 2014/07/12 18:44:22 tedu Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.175 2014/10/07 20:23:32 tedu Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -131,10 +131,6 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>.
#include <net/if_trunk.h>
#endif
-#ifdef AOE
-#include <net/if_aoe.h>
-#endif /* AOE */
-
#ifdef INET6
#ifndef INET
#include <netinet/in.h>
@@ -692,11 +688,6 @@ decapsulate:
schednetisr(NETISR_PPPOE);
break;
#endif
-#ifdef AOE
- case ETHERTYPE_AOE:
- aoe_input(ifp, m);
- goto done;
-#endif /* AOE */
#ifdef MPLS
case ETHERTYPE_MPLS:
case ETHERTYPE_MPLS_MCAST: