-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
nalloc = 16; /* first guess at max interfaces */
toobig = 0;
for (;;) {
- if (nalloc * sizeof(*ifr) > CFS_PAGE_SIZE) {
+ if (nalloc * sizeof(*ifr) > PAGE_CACHE_SIZE) {
toobig = 1;
- nalloc = CFS_PAGE_SIZE/sizeof(*ifr);
+ nalloc = PAGE_CACHE_SIZE/sizeof(*ifr);
CWARN("Too many interfaces: only enumerating first %d\n",
nalloc);
}
}
*fatal = !(rc == -EADDRNOTAVAIL || rc == -EADDRINUSE);
- CDEBUG(*fatal ? D_NETERROR : D_NET,
+ CDEBUG_LIMIT(*fatal ? D_NETERROR : D_NET,
"Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
HIPQUAD(local_ip), local_port, HIPQUAD(peer_ip), peer_port);
nalloc = 16; /* first guess at max interfaces */
toobig = 0;
for (;;) {
- if (nalloc * sizeof(*ifr) > CFS_PAGE_SIZE) {
+ if (nalloc * sizeof(*ifr) > PAGE_CACHE_SIZE) {
toobig = 1;
- nalloc = CFS_PAGE_SIZE/sizeof(*ifr);
+ nalloc = PAGE_CACHE_SIZE/sizeof(*ifr);
CWARN("Too many interfaces: only enumerating first %d\n",
nalloc);
}
if (rc != 0) {
CFS_NET_EX;
if (rc != EADDRNOTAVAIL && rc != EADDRINUSE)
- CDEBUG(D_NETERROR,
- "Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
+ CNETERR("Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
HIPQUAD(local_ip), local_port, HIPQUAD(peer_ip), peer_port);
goto out;
}
so->so_error = 0;
splx(s);
CFS_NET_EX;
- CDEBUG(D_NETERROR,
- "Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
+ CNETERR("Error %d connecting %u.%u.%u.%u/%d -> %u.%u.%u.%u/%d\n", rc,
HIPQUAD(local_ip), local_port, HIPQUAD(peer_ip), peer_port);
goto out;
}