From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Mike Marciniszyn
<mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Cc: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 04/24] IB/qib: add thresholds to VendorPortCounters PMA operation
Date: Tue, 28 Dec 2010 14:24:13 -0500 [thread overview]
Message-ID: <4D1A395D.6040103@dev.mellanox.co.il> (raw)
In-Reply-To: <20101228152711.19960.52491.stgit-hIFRcJ1SNwcXGO8/Qfapyjg/wwJxntczYPYVAmT7z5s@public.gmane.org>
On 12/28/2010 10:27 AM, Mike Marciniszyn wrote:
> This adds thresholds to be specified in the VendorPortCounters PMA
> operation.
>
> Signed-off-by: Mike Marciniszyn<mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/infiniband/hw/qib/qib_mad.c | 87 +++++++++++++++++++++++------------
> 1 files changed, 57 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c
> index 94b0d1f..9794020 100644
> --- a/drivers/infiniband/hw/qib/qib_mad.c
> +++ b/drivers/infiniband/hw/qib/qib_mad.c
> @@ -1135,10 +1135,10 @@ static int pma_get_classportinfo(struct ib_perf *pmp,
> p->class_version = 1;
> p->cap_mask = IB_PMA_CLASS_CAP_EXT_WIDTH;
> /*
> - * Set the most significant bit of CM2 to indicate support for
> + * Set the most significant two bits of CM2 to indicate support for
> * congestion statistics
> */
Where in the IBA spec do these bits come from ? What are they ?
> - p->reserved[0] = dd->psxmitwait_supported<< 7;
> + p->reserved[0] = (dd->psxmitwait_supported * 3)<< 6;
It looks weird to me to set an IBA reserved field. Should the structure
be updated to contain the real field name ?
-- Hal
> /*
> * Expected response time is 4.096 usec. * 2^18 == 1.073741824 sec.
> */
> @@ -1709,8 +1709,14 @@ static int pma_set_portcounters(struct ib_perf *pmp,
> }
>
> static int pma_set_portcounters_cong(struct ib_perf *pmp,
> - struct ib_device *ibdev, u8 port)
> + struct ib_device *ibdev, u8 port,
> + struct ib_perf *pmp_in)
> {
> + /* Congestion PMA packets start at offset 24 not 64 */
> + struct ib_pma_portcounters_cong *p_out =
> + (struct ib_pma_portcounters_cong *)pmp->reserved;
> + struct ib_pma_portcounters_cong *p_in =
> + (struct ib_pma_portcounters_cong *)pmp_in->reserved;
> struct qib_ibport *ibp = to_iport(ibdev, port);
> struct qib_pportdata *ppd = ppd_from_ibp(ibp);
> struct qib_devdata *dd = dd_from_ppd(ppd);
> @@ -1724,36 +1730,56 @@ static int pma_set_portcounters_cong(struct ib_perf *pmp,
> ret = pma_get_portcounters_cong(pmp, ibdev, port);
>
> if (counter_select& IB_PMA_SEL_CONG_XMIT) {
> - spin_lock_irqsave(&ppd->ibport_data.lock, flags);
> - ppd->cong_stats.counter = 0;
> - dd->f_set_cntr_sample(ppd, QIB_CONG_TIMER_PSINTERVAL,
> - 0x0);
> - spin_unlock_irqrestore(&ppd->ibport_data.lock, flags);
> + if (p_out->port_xmit_wait> p_in->port_xmit_wait) {
> + spin_lock_irqsave(&ppd->ibport_data.lock, flags);
> + ppd->cong_stats.counter = 0;
> + dd->f_set_cntr_sample(ppd, QIB_CONG_TIMER_PSINTERVAL,
> + 0x0);
> + spin_unlock_irqrestore(&ppd->ibport_data.lock, flags);
> + }
> }
> if (counter_select& IB_PMA_SEL_CONG_PORT_DATA) {
> - ibp->z_port_xmit_data = cntrs.port_xmit_data;
> - ibp->z_port_rcv_data = cntrs.port_rcv_data;
> - ibp->z_port_xmit_packets = cntrs.port_xmit_packets;
> - ibp->z_port_rcv_packets = cntrs.port_rcv_packets;
> + if (p_out->port_xmit_data> p_in->port_xmit_data)
> + ibp->z_port_xmit_data = cntrs.port_xmit_data;
> + if (p_out->port_rcv_data> p_in->port_rcv_data)
> + ibp->z_port_rcv_data = cntrs.port_rcv_data;
> + if (p_out->port_xmit_packets> p_in->port_xmit_packets)
> + ibp->z_port_xmit_packets = cntrs.port_xmit_packets;
> + if (p_out->port_rcv_packets> p_in->port_rcv_packets)
> + ibp->z_port_rcv_packets = cntrs.port_rcv_packets;
> }
> if (counter_select& IB_PMA_SEL_CONG_ALL) {
> - ibp->z_symbol_error_counter =
> - cntrs.symbol_error_counter;
> - ibp->z_link_error_recovery_counter =
> - cntrs.link_error_recovery_counter;
> - ibp->z_link_downed_counter =
> - cntrs.link_downed_counter;
> - ibp->z_port_rcv_errors = cntrs.port_rcv_errors;
> - ibp->z_port_rcv_remphys_errors =
> - cntrs.port_rcv_remphys_errors;
> - ibp->z_port_xmit_discards =
> - cntrs.port_xmit_discards;
> - ibp->z_local_link_integrity_errors =
> - cntrs.local_link_integrity_errors;
> - ibp->z_excessive_buffer_overrun_errors =
> - cntrs.excessive_buffer_overrun_errors;
> - ibp->n_vl15_dropped = 0;
> - ibp->z_vl15_dropped = cntrs.vl15_dropped;
> + if (p_out->symbol_error_counter> p_in->symbol_error_counter)
> + ibp->z_symbol_error_counter =
> + cntrs.symbol_error_counter;
> + if (p_out->link_error_recovery_counter>
> + p_in->link_error_recovery_counter)
> + ibp->z_link_error_recovery_counter =
> + cntrs.link_error_recovery_counter;
> + if (p_out->link_downed_counter> p_in->link_downed_counter)
> + ibp->z_link_downed_counter =
> + cntrs.link_downed_counter;
> + if (p_out->port_rcv_errors> p_in->port_rcv_errors)
> + ibp->z_port_rcv_errors = cntrs.port_rcv_errors;
> + if (p_out->port_rcv_remphys_errors>
> + p_in->port_rcv_remphys_errors)
> + ibp->z_port_rcv_remphys_errors =
> + cntrs.port_rcv_remphys_errors;
> + if (p_out->port_xmit_discards> p_in->port_xmit_discards)
> + ibp->z_port_xmit_discards =
> + cntrs.port_xmit_discards;
> + if ((p_out->lli_ebor_errors& 0xf0)>
> + (p_in->lli_ebor_errors& 0xf0))
> + ibp->z_local_link_integrity_errors =
> + cntrs.local_link_integrity_errors;
> + if ((p_out->lli_ebor_errors& 0x0f)>
> + (p_in->lli_ebor_errors& 0x0f))
> + ibp->z_excessive_buffer_overrun_errors =
> + cntrs.excessive_buffer_overrun_errors;
> + if (p_out->vl15_dropped> p_in->vl15_dropped) {
> + ibp->n_vl15_dropped = 0;
> + ibp->z_vl15_dropped = cntrs.vl15_dropped;
> + }
> }
>
> return ret;
> @@ -2004,7 +2030,8 @@ static int process_perf(struct ib_device *ibdev, u8 port,
> ret = pma_set_portcounters_ext(pmp, ibdev, port);
> goto bail;
> case IB_PMA_PORT_COUNTERS_CONG:
> - ret = pma_set_portcounters_cong(pmp, ibdev, port);
> + ret = pma_set_portcounters_cong(pmp, ibdev, port,
> + (struct ib_perf *)in_mad);
> goto bail;
> default:
> pmp->status |= IB_SMP_UNSUP_METH_ATTR;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-12-28 19:24 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-28 15:26 [PATCH 0/24] various fixes for QIB driver Mike Marciniszyn
[not found] ` <20101228152648.19960.84006.stgit-hIFRcJ1SNwcXGO8/Qfapyjg/wwJxntczYPYVAmT7z5s@public.gmane.org>
2010-12-28 15:26 ` [PATCH 01/24] IB/qib: remove IB latency turnoff Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 02/24] IB/qib: add receive header queue size module parameters Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 03/24] IB/qib: add support for the new QME7362 card Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 04/24] IB/qib: add thresholds to VendorPortCounters PMA operation Mike Marciniszyn
[not found] ` <20101228152711.19960.52491.stgit-hIFRcJ1SNwcXGO8/Qfapyjg/wwJxntczYPYVAmT7z5s@public.gmane.org>
2010-12-28 19:24 ` Hal Rosenstock [this message]
[not found] ` <4D1A395D.6040103-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-01-05 17:58 ` Roland Dreier
2010-12-28 15:27 ` [PATCH 05/24] IB/qib: generate completion callback on errors Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 06/24] IB/qib: set port physical state even if other fields are invalid Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 07/24] IB/qib: UD send with immediate Rx completion has wrong size Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 08/24] IB/qib: Handle transitions from ACTIVE_DEFERRED to ACTIVE better Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 09/24] IB/qib: Multi Florida HCA Hosts panic on reboot Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 10/24] IB/qib: fix context allocation with multiple HCAs Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 11/24] IB/qib: clear WAIT_SEND flags when setting QP to error state Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 12/24] IB/qib: New SERDES init routine and improvements to SI quality Mike Marciniszyn
2010-12-28 15:27 ` [PATCH 13/24] IB/qib: Reset packet list after freeing Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 14/24] IB/qib: Add a few new SERDES tunings Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 15/24] IB/qib: Avoid duplicate writes to the rcv head register Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 16/24] IB/qib: interrupt mitigation fix Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 17/24] IB/qib: change rcv queue/qpn selection Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 18/24] IB/qib: adding fix missing from earlier patch Mike Marciniszyn
[not found] ` <20101228152824.19960.40529.stgit-hIFRcJ1SNwcXGO8/Qfapyjg/wwJxntczYPYVAmT7z5s@public.gmane.org>
2011-01-04 19:00 ` Roland Dreier
2010-12-28 15:28 ` [PATCH 19/24] IB/qib: change qpn increment Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 20/24] IB/qib: RDMA lkey/rkey validation is inefficient for large MRs Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 21/24] IB/qib: Issue pre-emptive NAKs on eager buffer overflow Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 22/24] IB/qib: Un-necessary delayed completions on RC connection Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 23/24] IB/qib: Add a delay to allow SERDES to initialize Mike Marciniszyn
2010-12-28 15:28 ` [PATCH 24/24] IB/qib: Improve SERDES tunning on QMH boards Mike Marciniszyn
[not found] ` <20101228152855.19960.96651.stgit-hIFRcJ1SNwcXGO8/Qfapyjg/wwJxntczYPYVAmT7z5s@public.gmane.org>
2011-01-04 18:55 ` Roland Dreier
[not found] ` <adalj30ijnc.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-04 18:59 ` Mike Marciniszyn
2011-01-04 18:59 ` [PATCH 0/24] various fixes for QIB driver Roland Dreier
[not found] ` <adahbdoijgn.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-04 19:02 ` Mike Marciniszyn
2011-01-05 18:07 ` Roland Dreier
[not found] ` <adahbdnfcm5.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-05 18:20 ` Mike Marciniszyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D1A395D.6040103@dev.mellanox.co.il \
--to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox