aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-07-01 05:31:36 -0400
committerDavid S. Miller <davem@davemloft.net>2013-07-02 03:08:03 -0400
commite02010adeeb21ef56d6b9b68c785ed1ecc832aee (patch)
tree10cbdd8be0755ec7d27299b7043ddd28e921747d /net
parent15627e847e4356ebdd49e7c3f10a671819995be6 (diff)
net: sctp: get rid of SCTP_DBG_TSNS entirely
After having reworked the debugging framework, Neil and Vlad agreed to get rid of the leftover SCTP_DBG_TSNS code for a couple of reasons: We can use systemtap scripts to investigate these things, we now have pr_debug() helpers that make life easier, and if we really need anything else besides those tools, we will be forced to come up with something better than we have there. Therefore, get rid of this ifdef debugging code entirely for now. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> CC: Vlad Yasevich <vyasevich@gmail.com> CC: Neil Horman <nhorman@tuxdriver.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/Kconfig9
-rw-r--r--net/sctp/outqueue.c105
2 files changed, 0 insertions, 114 deletions
diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig
index d80bf1aebaed..71c1a598d9bc 100644
--- a/net/sctp/Kconfig
+++ b/net/sctp/Kconfig
@@ -49,15 +49,6 @@ config NET_SCTPPROBE
49 To compile this code as a module, choose M here: the 49 To compile this code as a module, choose M here: the
50 module will be called sctp_probe. 50 module will be called sctp_probe.
51 51
52config SCTP_DBG_TSNS
53 bool "SCTP: Debug transactions"
54 help
55 If you say Y, this will enable transaction debugging, visible
56 from the kernel's dynamic debugging framework.
57
58 If unsure, say N. However, if you are running into problems, use
59 this option to gather outqueue trace information.
60
61config SCTP_DBG_OBJCNT 52config SCTP_DBG_OBJCNT
62 bool "SCTP: Debug object counts" 53 bool "SCTP: Debug object counts"
63 depends on PROC_FS 54 depends on PROC_FS
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 511b3b35d609..cb80a8e060b7 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -1335,21 +1335,6 @@ static void sctp_check_transmitted(struct sctp_outq *q,
1335 int bytes_acked = 0; 1335 int bytes_acked = 0;
1336 int migrate_bytes = 0; 1336 int migrate_bytes = 0;
1337 1337
1338 /* These state variables are for coherent debug output. --xguo */
1339
1340#ifdef CONFIG_SCTP_DBG_TSNS
1341 __u32 dbg_ack_tsn = 0; /* An ACKed TSN range starts here... */
1342 __u32 dbg_last_ack_tsn = 0; /* ...and finishes here. */
1343 __u32 dbg_kept_tsn = 0; /* An un-ACKed range starts here... */
1344 __u32 dbg_last_kept_tsn = 0; /* ...and finishes here. */
1345
1346 /* 0 : The last TSN was ACKed.
1347 * 1 : The last TSN was NOT ACKed (i.e. KEPT).
1348 * -1: We need to initialize.
1349 */
1350 int dbg_prt_state = -1;
1351#endif /* CONFIG_SCTP_DBG_TSNS */
1352
1353 sack_ctsn = ntohl(sack->cum_tsn_ack); 1338 sack_ctsn = ntohl(sack->cum_tsn_ack);
1354 1339
1355 INIT_LIST_HEAD(&tlist); 1340 INIT_LIST_HEAD(&tlist);
@@ -1471,49 +1456,6 @@ static void sctp_check_transmitted(struct sctp_outq *q,
1471 */ 1456 */
1472 list_add_tail(lchunk, &tlist); 1457 list_add_tail(lchunk, &tlist);
1473 } 1458 }
1474
1475#ifdef CONFIG_SCTP_DBG_TSNS
1476 switch (dbg_prt_state) {
1477 case 0: /* last TSN was ACKed */
1478 if (dbg_last_ack_tsn + 1 == tsn) {
1479 /* This TSN belongs to the
1480 * current ACK range.
1481 */
1482 break;
1483 }
1484
1485 if (dbg_last_ack_tsn != dbg_ack_tsn) {
1486 /* Display the end of the
1487 * current range.
1488 */
1489 pr_cont("-%08x", dbg_last_ack_tsn);
1490 }
1491
1492 /* Start a new range. */
1493 pr_cont(",%08x", tsn);
1494 dbg_ack_tsn = tsn;
1495 break;
1496
1497 case 1: /* The last TSN was NOT ACKed. */
1498 if (dbg_last_kept_tsn != dbg_kept_tsn) {
1499 /* Display the end of current range. */
1500 pr_cont("-%08x", dbg_last_kept_tsn);
1501 }
1502
1503 pr_cont("\n");
1504 /* FALL THROUGH... */
1505 default:
1506 /* This is the first-ever TSN we examined. */
1507 /* Start a new range of ACK-ed TSNs. */
1508 pr_debug("ACKed: %08x", tsn);
1509
1510 dbg_prt_state = 0;
1511 dbg_ack_tsn = tsn;
1512 }
1513
1514 dbg_last_ack_tsn = tsn;
1515#endif /* CONFIG_SCTP_DBG_TSNS */
1516
1517 } else { 1459 } else {
1518 if (tchunk->tsn_gap_acked) { 1460 if (tchunk->tsn_gap_acked) {
1519 pr_debug("%s: receiver reneged on data TSN:0x%x\n", 1461 pr_debug("%s: receiver reneged on data TSN:0x%x\n",
@@ -1537,56 +1479,9 @@ static void sctp_check_transmitted(struct sctp_outq *q,
1537 } 1479 }
1538 1480
1539 list_add_tail(lchunk, &tlist); 1481 list_add_tail(lchunk, &tlist);
1540
1541#ifdef CONFIG_SCTP_DBG_TSNS
1542 /* See the above comments on ACK-ed TSNs. */
1543 switch (dbg_prt_state) {
1544 case 1:
1545 if (dbg_last_kept_tsn + 1 == tsn)
1546 break;
1547
1548 if (dbg_last_kept_tsn != dbg_kept_tsn)
1549 pr_cont("-%08x", dbg_last_kept_tsn);
1550
1551 pr_cont(",%08x", tsn);
1552 dbg_kept_tsn = tsn;
1553 break;
1554
1555 case 0:
1556 if (dbg_last_ack_tsn != dbg_ack_tsn)
1557 pr_cont("-%08x", dbg_last_ack_tsn);
1558
1559 pr_cont("\n");
1560 /* FALL THROUGH... */
1561 default:
1562 pr_debug("KEPT: %08x", tsn);
1563
1564 dbg_prt_state = 1;
1565 dbg_kept_tsn = tsn;
1566 }
1567
1568 dbg_last_kept_tsn = tsn;
1569#endif /* CONFIG_SCTP_DBG_TSNS */
1570 } 1482 }
1571 } 1483 }
1572 1484
1573#ifdef CONFIG_SCTP_DBG_TSNS
1574 /* Finish off the last range, displaying its ending TSN. */
1575 switch (dbg_prt_state) {
1576 case 0:
1577 if (dbg_last_ack_tsn != dbg_ack_tsn)
1578 pr_cont("-%08x\n", dbg_last_ack_tsn);
1579 else
1580 pr_cont("\n");
1581 break;
1582 case 1:
1583 if (dbg_last_kept_tsn != dbg_kept_tsn)
1584 pr_cont("-%08x\n", dbg_last_kept_tsn);
1585 else
1586 pr_cont("\n");
1587 break;
1588 }
1589#endif /* CONFIG_SCTP_DBG_TSNS */
1590 if (transport) { 1485 if (transport) {
1591 if (bytes_acked) { 1486 if (bytes_acked) {
1592 struct sctp_association *asoc = transport->asoc; 1487 struct sctp_association *asoc = transport->asoc;