All of lore.kernel.org
 help / color / mirror / Atom feed
* tun: need an ioctl() cmd to get multi_queue index?
@ 2024-07-10  9:40 ayaka
  2024-07-10 15:18 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: ayaka @ 2024-07-10  9:40 UTC (permalink / raw)
  To: netdev

Hello All

I have read some example that filter packet with tc qdisc. It could a very useful feature for dispatcher in a VPN program.
But I didn’t find an ioctl() to fetch the queue index, which I believe is the queue number used in tc qdisc.
There is an ioctl() which set the ifindex which would affect the queue_index storing in the same union. But I don’t think there is an ioctl() to fetch it.

If I was right, could I add a new ioctl() cmd for that?

Sincerely
Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tun: need an ioctl() cmd to get multi_queue index?
  2024-07-10  9:40 tun: need an ioctl() cmd to get multi_queue index? ayaka
@ 2024-07-10 15:18 ` Stephen Hemminger
  2024-07-10 15:23   ` Randy Li
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2024-07-10 15:18 UTC (permalink / raw)
  To: ayaka; +Cc: netdev

On Wed, 10 Jul 2024 17:40:46 +0800
ayaka <ayaka@soulik.info> wrote:

> Hello All
> 
> I have read some example that filter packet with tc qdisc. It could a very useful feature for dispatcher in a VPN program.
> But I didn’t find an ioctl() to fetch the queue index, which I believe is the queue number used in tc qdisc.
> There is an ioctl() which set the ifindex which would affect the queue_index storing in the same union. But I don’t think there is an ioctl() to fetch it.
> 
> If I was right, could I add a new ioctl() cmd for that?
> 
> Sincerely
> Randy

In the case of TUN, each queue is handled by a different file descriptor.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tun: need an ioctl() cmd to get multi_queue index?
  2024-07-10 15:18 ` Stephen Hemminger
@ 2024-07-10 15:23   ` Randy Li
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Li @ 2024-07-10 15:23 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

Hello Stephen

On 2024/7/10 23:18, Stephen Hemminger wrote:
> On Wed, 10 Jul 2024 17:40:46 +0800
> ayaka <ayaka@soulik.info> wrote:
>
>> Hello All
>>
>> I have read some example that filter packet with tc qdisc. It could a very useful feature for dispatcher in a VPN program.
>> But I didn’t find an ioctl() to fetch the queue index, which I believe is the queue number used in tc qdisc.
>> There is an ioctl() which set the ifindex which would affect the queue_index storing in the same union. But I don’t think there is an ioctl() to fetch it.
>>
>> If I was right, could I add a new ioctl() cmd for that?
>>
>> Sincerely
>> Randy
> In the case of TUN, each queue is handled by a different file descriptor.

Yes, I know of that. But I think the argument that queue_mapping 
requires in tc is the index not the file descriptor.

Although I am not sure whether the filter would work as I expected, I 
would apply the filter in the reading from tun/tap side, which is the 
socket data passes through the tun device.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-10 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10  9:40 tun: need an ioctl() cmd to get multi_queue index? ayaka
2024-07-10 15:18 ` Stephen Hemminger
2024-07-10 15:23   ` Randy Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.