Date: Tue, 20 Oct 2015 19:20:33 +0000 (UTC) From: "Conrad E. Meyer" <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289650 - head/sys/dev/ntb/if_ntb Message-ID: <201510201920.t9KJKXlT037846@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Tue Oct 20 19:20:33 2015 New Revision: 289650 URL: https://svnweb.freebsd.org/changeset/base/289650 Log: if_ntb: Correct over-long lines, use qmin() Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:24 2015 (r289649) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:33 2015 (r289650) @@ -673,8 +673,8 @@ ntb_transport_init_queue(struct ntb_tran qp->rx_info = (void *)((char *)qp->tx_mw + tx_size); /* Due to house-keeping, there must be at least 2 buffs */ - qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), - tx_size / 2); + qp->tx_max_frame = qmin(tx_size / 2, + transport_mtu + sizeof(struct ntb_payload_header)); qp->tx_max_entry = tx_size / qp->tx_max_frame; callout_init(&qp->link_work, 0); @@ -1356,8 +1356,8 @@ ntb_transport_setup_qp_mw(struct ntb_tra qp->remote_rx_info = (void*)((char *)qp->rx_buff + rx_size); /* Due to house-keeping, there must be at least 2 buffs */ - qp->rx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), - rx_size / 2); + qp->rx_max_frame = qmin(rx_size / 2, + transport_mtu + sizeof(struct ntb_payload_header)); qp->rx_max_entry = rx_size / qp->rx_max_frame; qp->rx_index = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510201920.t9KJKXlT037846>