Netdev List
 help / color / mirror / Atom feed
From: Randy Li <ayaka@soulik.info>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: Re: tun: need an ioctl() cmd to get multi_queue index?
Date: Wed, 10 Jul 2024 23:23:47 +0800	[thread overview]
Message-ID: <5ee3ae6c-db4e-4cdf-bdc9-f3baea26cb4e@soulik.info> (raw)
In-Reply-To: <20240710081821.63b6f6d1@hermes.local>

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.


      reply	other threads:[~2024-07-10 15:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ee3ae6c-db4e-4cdf-bdc9-f3baea26cb4e@soulik.info \
    --to=ayaka@soulik.info \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox