Hello Cédric,

On 26/07/03 11:17AM, Cédric Le Goater wrote:
> On 7/3/26 10:59, Aditya Gupta wrote:
> > <...snip...>
> > +    def test_linux_remote_interrupts(self):
> > +        self.require_accelerator("tcg")
> > +        self.set_machine('powernv')
> > +
> > +        # Have below setup in this test:
> > +        # 1. e1000e attached to pcie.6, which is from 7th PHB, belonging 
> > to 2nd
> > +        #    socket (chip 1), in a powernv boot with default 6 PHBs per 
> > socket
> > +        # 2. CPU on 2nd socket (chip 1) disabled
> > +        # 3. RX IRQ's affinity to chip 2, and TX IRQ's affinity to chip 3
> > +        #
> > +        # Then ping is done, to generate interrupts from e1000e which 
> > should go
> > +        # to IRQ server on the remote sockets
> > +        self.vm.add_args('-smp', '4,sockets=4,cores=1,threads=1')
> > +        self.vm.add_args('-netdev', 'user,id=net0')
> > +        self.vm.add_args('-device', 'e1000e,netdev=net0,bus=pcie.6')
> 
> 
> 2 sockets are enough.
> 
>     # grep -E  "eth0|nvme" /proc/interrupts
>      76:         12          0  PNV-PCI-MSI 268959744 Edge      nvme0q0
>      77:         62          0  PNV-PCI-MSI 268959745 Edge      nvme0q1
>      78:          0         67  PNV-PCI-MSI 268959746 Edge      nvme0q2
>      79:          0         34  PNV-PCI-MSI 2416443392 Edge      eth0-rx-0
>      80:          0         20  PNV-PCI-MSI 2416443393 Edge      eth0-tx-0
>      81:          0          4  PNV-PCI-MSI 2416443394 Edge      eth0
>     # echo 0 > /sys/devices/system/cpu/cpu1/online
>     # grep -E  "eth0|nvme" /proc/interrupts
>      76:         12  PNV-PCI-MSI 268959744 Edge      nvme0q0
>      77:         62  PNV-PCI-MSI 268959745 Edge      nvme0q1
>      78:          0  PNV-PCI-MSI 268959746 Edge      nvme0q2
>      79:         10  PNV-PCI-MSI 2416443392 Edge      eth0-rx-0
>      80:          0  PNV-PCI-MSI 2416443393 Edge      eth0-tx-0
>      81:          0  PNV-PCI-MSI 2416443394 Edge      eth0
> 
> A non-zero count on eth0-rx is good enough.
> 
>     # ping -W2 -c5 10.0.2.2
>     PING 10.0.2.2 (10.0.2.2): 56 data bytes
>     64 bytes from 10.0.2.2: seq=0 ttl=255 time=7.339 ms
>     64 bytes from 10.0.2.2: seq=1 ttl=255 time=0.673 ms
>     64 bytes from 10.0.2.2: seq=2 ttl=255 time=0.405 ms
>     64 bytes from 10.0.2.2: seq=3 ttl=255 time=0.369 ms
>     64 bytes from 10.0.2.2: seq=4 ttl=255 time=0.516 ms
>     --- 10.0.2.2 ping statistics ---
>     5 packets transmitted, 5 packets received, 0% packet loss
>     # grep -E  "eth0|nvme" /proc/interrupts
>      76:         12  PNV-PCI-MSI 268959744 Edge      nvme0q0
>      77:         62  PNV-PCI-MSI 268959745 Edge      nvme0q1
>      78:          0  PNV-PCI-MSI 268959746 Edge      nvme0q2
>      79:         34  PNV-PCI-MSI 2416443392 Edge      eth0-rx-0
>      80:         10  PNV-PCI-MSI 2416443393 Edge      eth0-tx-0
>      81:          0  PNV-PCI-MSI 2416443394 Edge      eth0
> That's even better I agree.
> 
> 
> Reviewed-by: Cédric Le Goater <[email protected]>

Thanks for the review and the suggestion.

About using 4 sockets, I used it so the receive and transmit interrupts both go
to different sockets, so more sockets are involved, which I assumed may help
catch some rare cases ? Also, with 4 sockets, affinity setting also gets tested,
which won't happen in 2 sockets as we don't need to set affinity in that case.

I will send a v5 with 2 sockets if you still think otherwise. What do you say ?

Thanks,
- Aditya G

> 
> Thanks,
> 
> C.
> 
> 

Reply via email to