ixl_txrx.c (75dfc66c1b2b44609e5a7c3e1d6a751be4922689) ixl_txrx.c (b4a7ce0690aedd9763b3b47ee7fcdb421f0434c7)
1/******************************************************************************
2
3 Copyright (c) 2013-2018, Intel Corporation
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8

--- 878 unchanged lines hidden (view full) ---

887 SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, entry->name,
888 CTLFLAG_RD, entry->stat,
889 entry->description);
890 entry++;
891 }
892}
893
894void
1/******************************************************************************
2
3 Copyright (c) 2013-2018, Intel Corporation
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8

--- 878 unchanged lines hidden (view full) ---

887 SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, entry->name,
888 CTLFLAG_RD, entry->stat,
889 entry->description);
890 entry++;
891 }
892}
893
894void
895ixl_add_queues_sysctls(device_t dev, struct ixl_vsi *vsi)
895ixl_vsi_add_queues_stats(struct ixl_vsi *vsi, struct sysctl_ctx_list *ctx)
896{
896{
897 struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev);
898 struct sysctl_oid_list *vsi_list, *queue_list;
899 struct sysctl_oid *queue_node;
897 struct sysctl_oid_list *vsi_list, *queue_list;
898 struct sysctl_oid *queue_node;
900 char queue_namebuf[32];
899 char queue_namebuf[IXL_QUEUE_NAME_LEN];
901
902 struct ixl_rx_queue *rx_que;
903 struct ixl_tx_queue *tx_que;
904 struct tx_ring *txr;
905 struct rx_ring *rxr;
906
907 vsi_list = SYSCTL_CHILDREN(vsi->vsi_node);
908
909 /* Queue statistics */
910 for (int q = 0; q < vsi->num_rx_queues; q++) {
911 bzero(queue_namebuf, sizeof(queue_namebuf));
900
901 struct ixl_rx_queue *rx_que;
902 struct ixl_tx_queue *tx_que;
903 struct tx_ring *txr;
904 struct rx_ring *rxr;
905
906 vsi_list = SYSCTL_CHILDREN(vsi->vsi_node);
907
908 /* Queue statistics */
909 for (int q = 0; q < vsi->num_rx_queues; q++) {
910 bzero(queue_namebuf, sizeof(queue_namebuf));
912 snprintf(queue_namebuf, QUEUE_NAME_LEN, "rxq%02d", q);
911 snprintf(queue_namebuf, sizeof(queue_namebuf), "rxq%02d", q);
913 queue_node = SYSCTL_ADD_NODE(ctx, vsi_list,
914 OID_AUTO, queue_namebuf, CTLFLAG_RD | CTLFLAG_MPSAFE,
915 NULL, "RX Queue #");
916 queue_list = SYSCTL_CHILDREN(queue_node);
917
918 rx_que = &(vsi->rx_queues[q]);
919 rxr = &(rx_que->rxr);
920

--- 11 unchanged lines hidden (view full) ---

932 CTLFLAG_RD, &(rxr->desc_errs),
933 "Queue Rx Descriptor Errors");
934 SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "itr",
935 CTLFLAG_RD, &(rxr->itr), 0,
936 "Queue Rx ITR Interval");
937 }
938 for (int q = 0; q < vsi->num_tx_queues; q++) {
939 bzero(queue_namebuf, sizeof(queue_namebuf));
912 queue_node = SYSCTL_ADD_NODE(ctx, vsi_list,
913 OID_AUTO, queue_namebuf, CTLFLAG_RD | CTLFLAG_MPSAFE,
914 NULL, "RX Queue #");
915 queue_list = SYSCTL_CHILDREN(queue_node);
916
917 rx_que = &(vsi->rx_queues[q]);
918 rxr = &(rx_que->rxr);
919

--- 11 unchanged lines hidden (view full) ---

931 CTLFLAG_RD, &(rxr->desc_errs),
932 "Queue Rx Descriptor Errors");
933 SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "itr",
934 CTLFLAG_RD, &(rxr->itr), 0,
935 "Queue Rx ITR Interval");
936 }
937 for (int q = 0; q < vsi->num_tx_queues; q++) {
938 bzero(queue_namebuf, sizeof(queue_namebuf));
940 snprintf(queue_namebuf, QUEUE_NAME_LEN, "txq%02d", q);
939 snprintf(queue_namebuf, sizeof(queue_namebuf), "txq%02d", q);
941 queue_node = SYSCTL_ADD_NODE(ctx, vsi_list,
942 OID_AUTO, queue_namebuf, CTLFLAG_RD | CTLFLAG_MPSAFE,
943 NULL, "TX Queue #");
944 queue_list = SYSCTL_CHILDREN(queue_node);
945
946 tx_que = &(vsi->tx_queues[q]);
947 txr = &(tx_que->txr);
948

--- 17 unchanged lines hidden ---
940 queue_node = SYSCTL_ADD_NODE(ctx, vsi_list,
941 OID_AUTO, queue_namebuf, CTLFLAG_RD | CTLFLAG_MPSAFE,
942 NULL, "TX Queue #");
943 queue_list = SYSCTL_CHILDREN(queue_node);
944
945 tx_que = &(vsi->tx_queues[q]);
946 txr = &(tx_que->txr);
947

--- 17 unchanged lines hidden ---