Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1672784

New NTB API Issue

From Logan Gunthorpe <logang@deltatee.com>
Newsgroups linux.kernel
Subject New NTB API Issue
Date 2017-06-22 18:20 +0200
Message-ID <tVcZQ-77P-5@gated-at.bofh.it> (permalink)
References <tSJIB-7cs-3@gated-at.bofh.it> <tUb9M-7kQ-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hey Guys,

I've run into some subtle issues with the new API:

It has to do with splitting mw_get_range into mw_get_align and
peer_mw_get_addr.

The original mw_get_range returned the size of the /local/ memory
window's size, address and alignment requirements. The ntb clients then
take the local size and transmit it via spads to the peer which would
use it in setting up the memory window. However, it made the assumption
that the alignment restrictions were symmetric on both hosts seeing they
were not sent across the link.

The new API makes a sensible change for this in that mw_get_align
appears to be intended to return the alignment restrictions (and now
size) of the peer. This helps a bit for the Switchtec driver but appears
to be a semantic change that wasn't really reflected in the changes to
the other NTB code. So, I see a couple of issues:

1) With our hardware, we can't actually know anything about the peer's
memory windows until the peer has finished its setup (ie. the link is
up). However, all the clients call the function during probe, before the
link is ready. There's really no good reason for this, so I think we
should change the clients so that mw_get_align is called only when the
link is up.

2) The changes to the Intel and AMD driver for mw_get_align sets
*max_size to the local pci resource size. (Thus making the assumption
that the local is the same as the peer, which is wrong). max_size isn't
actually used for anything so it's not _really_ an issue, but I do think
it's confusing and incorrect. I'd suggest we remove max_size until
something actually needs it, or at least set it to zero in cases where
the hardware doesn't support returning the size of the peer's memory
window (ie. in the Intel and AMD drivers).

Thoughts?

Logan

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

New NTB API Issue Logan Gunthorpe <logang@deltatee.com> - 2017-06-22 18:20 +0200
  Re: New NTB API Issue Logan Gunthorpe <logang@deltatee.com> - 2017-06-22 20:50 +0200
    RE: New NTB API Issue "Allen Hubbe" <Allen.Hubbe@dell.com> - 2017-06-23 00:20 +0200
      Re: New NTB API Issue Logan Gunthorpe <logang@deltatee.com> - 2017-06-23 00:20 +0200
        RE: New NTB API Issue "Allen Hubbe" <Allen.Hubbe@dell.com> - 2017-06-23 00:50 +0200
          Re: New NTB API Issue Logan Gunthorpe <logang@deltatee.com> - 2017-06-23 00:50 +0200
            RE: New NTB API Issue "Allen Hubbe" <Allen.Hubbe@dell.com> - 2017-06-23 15:20 +0200
              Re: New NTB API Issue Logan Gunthorpe <logang@deltatee.com> - 2017-06-23 19:00 +0200
                RE: New NTB API Issue "Allen Hubbe" <Allen.Hubbe@dell.com> - 2017-06-23 21:10 +0200
                Re: New NTB API Issue Logan Gunthorpe <logang@deltatee.com> - 2017-06-23 22:40 +0200
                RE: New NTB API Issue "Allen Hubbe" <Allen.Hubbe@dell.com> - 2017-06-24 00:10 +0200
                Re: New NTB API Issue Logan Gunthorpe <logang@deltatee.com> - 2017-06-24 01:10 +0200
                Re: New NTB API Issue Serge Semin <fancer.lancer@gmail.com> - 2017-06-23 23:50 +0200
                Re: New NTB API Issue Logan Gunthorpe <logang@deltatee.com> - 2017-06-24 00:10 +0200
                RE: New NTB API Issue "Allen Hubbe" <Allen.Hubbe@dell.com> - 2017-06-24 00:10 +0200
  RE: New NTB API Issue "Allen Hubbe" <Allen.Hubbe@dell.com> - 2017-06-22 20:50 +0200

csiph-web