Re: svn commit: r335338 - in head/sys: amd64/conf conf dev/ixl modules modules/ixl modules/ixlv

2018-06-18 Thread Matthew Macy
OK. I've taken it out of NOTES until such time.
-M

On Mon, Jun 18, 2018 at 7:38 PM, Eric Joyner  wrote:
> It probably won't result in anything usable. I need to remove ixlvc.c from
> the build since the VF driver as a whole doesn't work atm.
>
> - Eric
>
> On Mon, Jun 18, 2018 at 7:05 PM Matthew Macy  wrote:
>>
>> This breaks universe / tinderbox on AMD64. You appear to have
>> committed parts of a patch to ixlvc.c.  I'm not quite clear on what
>> happened here and if just removing the '+' will produce something
>> usable.
>>
>>
>>
>> void
>> ixlv_configure_queues(struct ixlv_sc *sc)
>> {
>> device_tdev = sc->dev;
>> struct ixl_vsi*vsi = >vsi;
>> +if_softc_ctx_tscctx = iflib_get_softc_ctx(vsi->ctx);
>> +struct ixl_tx_queue*tx_que = vsi->tx_queues;
>> +struct ixl_rx_queue*rx_que = vsi->rx_queues;
>> struct tx_ring*txr;
>> struct rx_ring*rxr;
>> intlen, pairs;
>>
>> struct virtchnl_vsi_queue_config_info *vqci;
>> struct virtchnl_queue_pair_info *vqpi;
>>
>> +/* XXX: Linux PF driver wants matching ids in each tx/rx struct,
>> so both TX/RX
>> + * queues of a pair need to be configured */
>> +pairs = max(vsi->num_tx_queues, vsi->num_rx_queues);
>> len = sizeof(struct virtchnl_vsi_queue_config_info) +
>>(sizeof(struct virtchnl_queue_pair_info) * pairs);
>> vqci = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO);
>> if (!vqci) {
>> device_printf(dev, "%s: unable to allocate memory\n", __func__);
>> ixl_vc_schedule_retry(>vc_mgr);
>> return;
>> }
>> vqci->vsi_id = sc->vsi_res->vsi_id;
>> vqci->num_queue_pairs = pairs;
>> vqpi = vqci->qpair;
>> /* Size check is not needed here - HW max is 16 queue pairs, and we
>>  * can fit info for 31 of them into the AQ buffer before it overflows.
>>  */
>> +for (int i = 0; i < pairs; i++, tx_que++, rx_que++, vqpi++) {
>> +txr = _que->txr;
>> +rxr = _que->rxr;
>> +
>> vqpi->txq.vsi_id = vqci->vsi_id;
>> vqpi->txq.queue_id = i;
>> +vqpi->txq.ring_len = scctx->isc_ntxd[0];
>> +vqpi->txq.dma_ring_addr = txr->tx_paddr;
>>
>> On Mon, Jun 18, 2018 at 1:12 PM, Eric Joyner  wrote:
>> > Author: erj
>> > Date: Mon Jun 18 20:12:54 2018
>> > New Revision: 335338
>> > URL: https://svnweb.freebsd.org/changeset/base/335338
>> >
>> > Log:
>> >   ixl(4): Update to use iflib
>> >
>> >   Update the driver to use iflib in order to bring performance,
>> >   maintainability, and (hopefully) stability benefits to the driver.
>> >
>> >   The driver currently isn't completely ported; features that are
>> > missing:
>> >
>> >   - VF driver (ixlv)
>> >   - SR-IOV host support
>> >   - RDMA support
>> >
>> >   The plan is to have these re-added to the driver before the next
>> > FreeBSD release.
>> >
>> >   Reviewed by:  gallatin@
>> >   Contributions by: gallatin@, mmacy@, krzysztof.gala...@intel.com
>> >   Tested by:jeffrey.e.pie...@intel.com
>> >   MFC after:1 month
>> >   Sponsored by: Intel Corporation
>> >   Differential Revision:https://reviews.freebsd.org/D15577
>> >
>> > Added:
>> >   head/sys/dev/ixl/ixl_debug.h   (contents, props changed)
>> > Modified:
>> >   head/sys/amd64/conf/GENERIC
>> >   head/sys/conf/files.amd64
>> >   head/sys/dev/ixl/i40e_osdep.c
>> >   head/sys/dev/ixl/if_ixl.c
>> >   head/sys/dev/ixl/if_ixlv.c
>> >   head/sys/dev/ixl/ixl.h
>> >   head/sys/dev/ixl/ixl_pf.h
>> >   head/sys/dev/ixl/ixl_pf_i2c.c
>> >   head/sys/dev/ixl/ixl_pf_iov.c
>> >   head/sys/dev/ixl/ixl_pf_main.c
>> >   head/sys/dev/ixl/ixl_pf_qmgr.c
>> >   head/sys/dev/ixl/ixl_txrx.c
>> >   head/sys/dev/ixl/ixlv.h
>> >   head/sys/dev/ixl/ixlvc.c
>> >   head/sys/modules/Makefile
>> >   head/sys/modules/ixl/Makefile
>> >   head/sys/modules/ixlv/Makefile
>> >
>> > Modified: head/sys/amd64/conf/GENERIC
>> >
>> > ==
>> > --- head/sys/amd64/conf/GENERIC Mon Jun 18 19:53:11 2018
>> > (r335337)
>> > +++ head/sys/amd64/conf/GENERIC Mon Jun 18 20:12:54 2018
>> > (r335338)
>> > @@ -240,8 +240,8 @@ device  em  # Intel
>> > PRO/1000 Gigabit Ethernet Family
>> >  device ix  # Intel PRO/10GbE PCIE PF
>> > Ethernet
>> >  device ixv # Intel PRO/10GbE PCIE VF
>> > Ethernet
>> >  device ixl # Intel XL710 40Gbe PCIE
>> > Ethernet
>> > -optionsIXL_IW  # Enable iWARP Client
>> > Interface in ixl(4)
>> > -device ixlv# Intel XL710 40Gbe VF PCIE
>> > Ethernet
>> > +#options   IXL_IW  # Enable iWARP Client
>> > Interface in ixl(4)
>> > +#deviceixlv# Intel XL710 40Gbe VF
>> > PCIE Ethernet
>> >  device le  # AMD Am7900 LANCE and Am79C9xx
>> > PCnet
>> > 

Re: svn commit: r335338 - in head/sys: amd64/conf conf dev/ixl modules modules/ixl modules/ixlv

2018-06-18 Thread Eric Joyner
It probably won't result in anything usable. I need to remove ixlvc.c from
the build since the VF driver as a whole doesn't work atm.

- Eric

On Mon, Jun 18, 2018 at 7:05 PM Matthew Macy  wrote:

> This breaks universe / tinderbox on AMD64. You appear to have
> committed parts of a patch to ixlvc.c.  I'm not quite clear on what
> happened here and if just removing the '+' will produce something
> usable.
>
>
>
> void
> ixlv_configure_queues(struct ixlv_sc *sc)
> {
> device_tdev = sc->dev;
> struct ixl_vsi*vsi = >vsi;
> +if_softc_ctx_tscctx = iflib_get_softc_ctx(vsi->ctx);
> +struct ixl_tx_queue*tx_que = vsi->tx_queues;
> +struct ixl_rx_queue*rx_que = vsi->rx_queues;
> struct tx_ring*txr;
> struct rx_ring*rxr;
> intlen, pairs;
>
> struct virtchnl_vsi_queue_config_info *vqci;
> struct virtchnl_queue_pair_info *vqpi;
>
> +/* XXX: Linux PF driver wants matching ids in each tx/rx struct,
> so both TX/RX
> + * queues of a pair need to be configured */
> +pairs = max(vsi->num_tx_queues, vsi->num_rx_queues);
> len = sizeof(struct virtchnl_vsi_queue_config_info) +
>(sizeof(struct virtchnl_queue_pair_info) * pairs);
> vqci = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO);
> if (!vqci) {
> device_printf(dev, "%s: unable to allocate memory\n", __func__);
> ixl_vc_schedule_retry(>vc_mgr);
> return;
> }
> vqci->vsi_id = sc->vsi_res->vsi_id;
> vqci->num_queue_pairs = pairs;
> vqpi = vqci->qpair;
> /* Size check is not needed here - HW max is 16 queue pairs, and we
>  * can fit info for 31 of them into the AQ buffer before it overflows.
>  */
> +for (int i = 0; i < pairs; i++, tx_que++, rx_que++, vqpi++) {
> +txr = _que->txr;
> +rxr = _que->rxr;
> +
> vqpi->txq.vsi_id = vqci->vsi_id;
> vqpi->txq.queue_id = i;
> +vqpi->txq.ring_len = scctx->isc_ntxd[0];
> +vqpi->txq.dma_ring_addr = txr->tx_paddr;
>
> On Mon, Jun 18, 2018 at 1:12 PM, Eric Joyner  wrote:
> > Author: erj
> > Date: Mon Jun 18 20:12:54 2018
> > New Revision: 335338
> > URL: https://svnweb.freebsd.org/changeset/base/335338
> >
> > Log:
> >   ixl(4): Update to use iflib
> >
> >   Update the driver to use iflib in order to bring performance,
> >   maintainability, and (hopefully) stability benefits to the driver.
> >
> >   The driver currently isn't completely ported; features that are
> missing:
> >
> >   - VF driver (ixlv)
> >   - SR-IOV host support
> >   - RDMA support
> >
> >   The plan is to have these re-added to the driver before the next
> FreeBSD release.
> >
> >   Reviewed by:  gallatin@
> >   Contributions by: gallatin@, mmacy@, krzysztof.gala...@intel.com
> >   Tested by:jeffrey.e.pie...@intel.com
> >   MFC after:1 month
> >   Sponsored by: Intel Corporation
> >   Differential Revision:https://reviews.freebsd.org/D15577
> >
> > Added:
> >   head/sys/dev/ixl/ixl_debug.h   (contents, props changed)
> > Modified:
> >   head/sys/amd64/conf/GENERIC
> >   head/sys/conf/files.amd64
> >   head/sys/dev/ixl/i40e_osdep.c
> >   head/sys/dev/ixl/if_ixl.c
> >   head/sys/dev/ixl/if_ixlv.c
> >   head/sys/dev/ixl/ixl.h
> >   head/sys/dev/ixl/ixl_pf.h
> >   head/sys/dev/ixl/ixl_pf_i2c.c
> >   head/sys/dev/ixl/ixl_pf_iov.c
> >   head/sys/dev/ixl/ixl_pf_main.c
> >   head/sys/dev/ixl/ixl_pf_qmgr.c
> >   head/sys/dev/ixl/ixl_txrx.c
> >   head/sys/dev/ixl/ixlv.h
> >   head/sys/dev/ixl/ixlvc.c
> >   head/sys/modules/Makefile
> >   head/sys/modules/ixl/Makefile
> >   head/sys/modules/ixlv/Makefile
> >
> > Modified: head/sys/amd64/conf/GENERIC
> >
> ==
> > --- head/sys/amd64/conf/GENERIC Mon Jun 18 19:53:11 2018(r335337)
> > +++ head/sys/amd64/conf/GENERIC Mon Jun 18 20:12:54 2018(r335338)
> > @@ -240,8 +240,8 @@ device  em  # Intel
> PRO/1000 Gigabit Ethernet Family
> >  device ix  # Intel PRO/10GbE PCIE PF
> Ethernet
> >  device ixv # Intel PRO/10GbE PCIE VF
> Ethernet
> >  device ixl # Intel XL710 40Gbe PCIE Ethernet
> > -optionsIXL_IW  # Enable iWARP Client
> Interface in ixl(4)
> > -device ixlv# Intel XL710 40Gbe VF PCIE
> Ethernet
> > +#options   IXL_IW  # Enable iWARP Client
> Interface in ixl(4)
> > +#deviceixlv# Intel XL710 40Gbe VF
> PCIE Ethernet
> >  device le  # AMD Am7900 LANCE and Am79C9xx
> PCnet
> >  device ti  # Alteon Networks Tigon I/II
> gigabit Ethernet
> >  device txp # 3Com 3cR990 (``Typhoon'')
> >
> > Modified: head/sys/conf/files.amd64
> >
> 

Re: svn commit: r335338 - in head/sys: amd64/conf conf dev/ixl modules modules/ixl modules/ixlv

2018-06-18 Thread Matthew Macy
This breaks universe / tinderbox on AMD64. You appear to have
committed parts of a patch to ixlvc.c.  I'm not quite clear on what
happened here and if just removing the '+' will produce something
usable.



void
ixlv_configure_queues(struct ixlv_sc *sc)
{
device_tdev = sc->dev;
struct ixl_vsi*vsi = >vsi;
+if_softc_ctx_tscctx = iflib_get_softc_ctx(vsi->ctx);
+struct ixl_tx_queue*tx_que = vsi->tx_queues;
+struct ixl_rx_queue*rx_que = vsi->rx_queues;
struct tx_ring*txr;
struct rx_ring*rxr;
intlen, pairs;

struct virtchnl_vsi_queue_config_info *vqci;
struct virtchnl_queue_pair_info *vqpi;

+/* XXX: Linux PF driver wants matching ids in each tx/rx struct,
so both TX/RX
+ * queues of a pair need to be configured */
+pairs = max(vsi->num_tx_queues, vsi->num_rx_queues);
len = sizeof(struct virtchnl_vsi_queue_config_info) +
   (sizeof(struct virtchnl_queue_pair_info) * pairs);
vqci = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO);
if (!vqci) {
device_printf(dev, "%s: unable to allocate memory\n", __func__);
ixl_vc_schedule_retry(>vc_mgr);
return;
}
vqci->vsi_id = sc->vsi_res->vsi_id;
vqci->num_queue_pairs = pairs;
vqpi = vqci->qpair;
/* Size check is not needed here - HW max is 16 queue pairs, and we
 * can fit info for 31 of them into the AQ buffer before it overflows.
 */
+for (int i = 0; i < pairs; i++, tx_que++, rx_que++, vqpi++) {
+txr = _que->txr;
+rxr = _que->rxr;
+
vqpi->txq.vsi_id = vqci->vsi_id;
vqpi->txq.queue_id = i;
+vqpi->txq.ring_len = scctx->isc_ntxd[0];
+vqpi->txq.dma_ring_addr = txr->tx_paddr;

On Mon, Jun 18, 2018 at 1:12 PM, Eric Joyner  wrote:
> Author: erj
> Date: Mon Jun 18 20:12:54 2018
> New Revision: 335338
> URL: https://svnweb.freebsd.org/changeset/base/335338
>
> Log:
>   ixl(4): Update to use iflib
>
>   Update the driver to use iflib in order to bring performance,
>   maintainability, and (hopefully) stability benefits to the driver.
>
>   The driver currently isn't completely ported; features that are missing:
>
>   - VF driver (ixlv)
>   - SR-IOV host support
>   - RDMA support
>
>   The plan is to have these re-added to the driver before the next FreeBSD 
> release.
>
>   Reviewed by:  gallatin@
>   Contributions by: gallatin@, mmacy@, krzysztof.gala...@intel.com
>   Tested by:jeffrey.e.pie...@intel.com
>   MFC after:1 month
>   Sponsored by: Intel Corporation
>   Differential Revision:https://reviews.freebsd.org/D15577
>
> Added:
>   head/sys/dev/ixl/ixl_debug.h   (contents, props changed)
> Modified:
>   head/sys/amd64/conf/GENERIC
>   head/sys/conf/files.amd64
>   head/sys/dev/ixl/i40e_osdep.c
>   head/sys/dev/ixl/if_ixl.c
>   head/sys/dev/ixl/if_ixlv.c
>   head/sys/dev/ixl/ixl.h
>   head/sys/dev/ixl/ixl_pf.h
>   head/sys/dev/ixl/ixl_pf_i2c.c
>   head/sys/dev/ixl/ixl_pf_iov.c
>   head/sys/dev/ixl/ixl_pf_main.c
>   head/sys/dev/ixl/ixl_pf_qmgr.c
>   head/sys/dev/ixl/ixl_txrx.c
>   head/sys/dev/ixl/ixlv.h
>   head/sys/dev/ixl/ixlvc.c
>   head/sys/modules/Makefile
>   head/sys/modules/ixl/Makefile
>   head/sys/modules/ixlv/Makefile
>
> Modified: head/sys/amd64/conf/GENERIC
> ==
> --- head/sys/amd64/conf/GENERIC Mon Jun 18 19:53:11 2018(r335337)
> +++ head/sys/amd64/conf/GENERIC Mon Jun 18 20:12:54 2018(r335338)
> @@ -240,8 +240,8 @@ device  em  # Intel 
> PRO/1000 Gigabit Ethernet Family
>  device ix  # Intel PRO/10GbE PCIE PF Ethernet
>  device ixv # Intel PRO/10GbE PCIE VF Ethernet
>  device ixl # Intel XL710 40Gbe PCIE Ethernet
> -optionsIXL_IW  # Enable iWARP Client 
> Interface in ixl(4)
> -device ixlv# Intel XL710 40Gbe VF PCIE Ethernet
> +#options   IXL_IW  # Enable iWARP Client 
> Interface in ixl(4)
> +#deviceixlv# Intel XL710 40Gbe VF PCIE 
> Ethernet
>  device le  # AMD Am7900 LANCE and Am79C9xx PCnet
>  device ti  # Alteon Networks Tigon I/II gigabit 
> Ethernet
>  device txp # 3Com 3cR990 (``Typhoon'')
>
> Modified: head/sys/conf/files.amd64
> ==
> --- head/sys/conf/files.amd64   Mon Jun 18 19:53:11 2018(r335337)
> +++ head/sys/conf/files.amd64   Mon Jun 18 20:12:54 2018(r335338)
> @@ -270,10 +270,10 @@ dev/ixl/ixl_pf_iov.c  optionalixl 
> pci  pci_iov \
> compile-with "${NORMAL_C} -I$S/dev/ixl"
>  dev/ixl/ixl_pf_i2c.c   optionalixl pci \
> compile-with "${NORMAL_C}