• Sanjay R Mehta's avatar
    ntb: point to right memory window index · ae89339b
    Sanjay R Mehta authored
    second parameter of ntb_peer_mw_get_addr is pointing to wrong memory
    window index by passing "peer gidx" instead of "local gidx".
    
    For ex, "local gidx" value is '0' and "peer gidx" value is '1', then
    
    on peer side ntb_mw_set_trans() api is used as below with gidx pointing to
    local side gidx which is '0', so memroy window '0' is chosen and XLAT '0'
    will be programmed by peer side.
    
        ntb_mw_set_trans(perf->ntb, peer->pidx, peer->gidx, peer->inbuf_xlat,
                        peer->inbuf_size);
    
    Now, on local side ntb_peer_mw_get_addr() is been used as below with gidx
    pointing to "peer gidx" which is '1', so pointing to memory window '1'
    instead of memory window '0'.
    
        ntb_peer_mw_get_addr(perf->ntb,  peer->gidx, &phys_addr,
                            &peer->outbuf_size);
    
    So this patch pass "local gidx" as parameter to ntb_peer_mw_get_addr().
    Signed-off-by: default avatarSanjay R Mehta <sanju.mehta@amd.com>
    Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
    ae89339b
ntb_perf.c 37.1 KB