Re: [PATCH BlueZ v2] btdev: Broadcast EXT_ADV packets every 200 ms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arkadiusz,

On Wed, Feb 12, 2025 at 1:10 PM Arkadiusz Bokowy
<arkadiusz.bokowy@xxxxxxxxx> wrote:
>
> > > No, it's not an optimization for my particular setup, but more
> > > generally for CPU load. I thought that it might be better not to run
> > > advertisement code too frequently. But I guess that lower values
> > > should also be OK, e.g. 100 ms or 50 ms. There is one "issue" with
> > > that, though.... Now, the advertisement packet will be sent one
> > > interval after the advertisement was enabled. If that's indeed an
> > > issue, it can be fixed by calling the callback function in the moment
> > > when the timer is armed.
> >
> > I'd keep the initial logic of sending the advertisement immediately
>
> I've fixed that in the v2 patch.

Ive sent a v3 with a couple of updates so it should now use the
advertisement interval rather than just assuming 200ms would cover all
intervals.

> > Btw, make sure you run the testers to confirm you are not breaking any
> > kernel testers.
>
> I've run the test-runner to verify everything (--auto). The result
> seems to be no worse than without my patch. What do I mean by that?
> The case is that I was not able to run the test-runner on the vanilla
> master branch with 100% success rate. There is always some failure
> with my "setup". However, when checking only the tools/mgmt-tester
> test, the success rate seems to be higher than without it (but it
> might be just a fluke). I run it like this: "tools/test-runner -k
> ~/linux/arch/x86/boot/bzImage -- tools/mgmt-tester". Anyway, I can see
> one test always failing - "Read Exp Feature - Success (Index None)" -
> it happens with and without my patch. Also, I've verified that the
> advertising broadcast code was executed (by adding some prints to that
> function).
>
> To conclude that, I'm afraid that I don't know how to run the test
> suite properly... So, my verification might miss something. I would
> advise you to verify that patch with your setup as well (if you can).

On v3 there actually seems to be some regression with the following test:

Ext Device Found - Advertising data - Zero padded - test passed
  Client set connectable: Success (0x00)
  Test setup condition complete, -1 left
  Client set connectable: Success (0x00)
  Test setup condition complete, -2 left
qqemu-system-x86_64: terminating on signal 2

So we will probably need to fix that before we can apply it, I suspect
we are getting more events than anticipated causing the steps to go
into negative which probably is why it hangs, anyway it should have
stopped when it reached the end.

> Regards,
> Arek



-- 
Luiz Augusto von Dentz





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux