Skip to contentSkip to conversation

Question on ntb: Adding Skylake Xeon NTB support

DISCUSSION Nikita Shubin 2 participants 2 messages Jun 4, 2024 NTB driver core

lore
Share & tools
lore
#0 lore raw

Hello Dave!

I have a question about NTB_HWERR_MSIX_VECTOR32_BAD, i hope you can clarify a bit:

We are moving "link status down by one" indeed:

```
intel_ntb_intvec_write addr=0xef idx=31 value=0x1f size=1
intel_ntb_intvec_write addr=0xf0 idx=32 value=0x20 size=1
...
intel_ntb_intvec_write addr=0xf0 idx=32 value=0x1f size=1
```

So basically Link now shares interrupt with DB 31, however doesn't this make 31 DB unusable, as we are clearing it with 0x180000000 in gen3_poll_link() ?

May be we should avoid using it by providing correct db_valid_mask ?

Some thing like:

```
if (ndev->hwerr_flags & NTB_HWERR_MSIX_VECTOR32_BAD)
    ndev->db_valid_mask &= ~ndev->db_link_mask;
```

in gen3_init_ntb() ?

maintainer
#1 lore raw
Quoted 20 lines · Nikita Shubin

Hello Dave!

I have a question about NTB_HWERR_MSIX_VECTOR32_BAD, i hope you can clarify a bit:

We are moving "link status down by one" indeed:

```
intel_ntb_intvec_write addr=0xef idx=31 value=0x1f size=1
intel_ntb_intvec_write addr=0xf0 idx=32 value=0x20 size=1
...
intel_ntb_intvec_write addr=0xf0 idx=32 value=0x1f size=1
```

So basically Link now shares interrupt with DB 31, however doesn't this make 31 DB unusable, as we are clearing it with 0x180000000 in gen3_poll_link() ?

May be we should avoid using it by providing correct db_valid_mask ?

Quoted 8 lines

Some thing like:

```
if (ndev->hwerr_flags & NTB_HWERR_MSIX_VECTOR32_BAD)
    ndev->db_valid_mask &= ~ndev->db_link_mask;
```

in gen3_init_ntb() ?

Yes. That sounds reasonable. Patch welcome :)