lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y9qCRtdfcs9L5RrD@corigine.com>
Date:   Wed, 1 Feb 2023 16:16:22 +0100
From:   Simon Horman <simon.horman@...igine.com>
To:     Vladimir Oltean <vladimir.oltean@....com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Vinicius Costa Gomes <vinicius.gomes@...el.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Jacob Keller <jacob.e.keller@...el.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH v4 net-next 12/15] net/sched: taprio: pass mqprio queue
 configuration to ndo_setup_tc()

On Mon, Jan 30, 2023 at 07:31:42PM +0200, Vladimir Oltean wrote:
> The taprio offload does not currently pass the mqprio queue configuration
> down to the offloading device driver. So the driver cannot act upon the
> TXQ counts/offsets per TC, or upon the prio->tc map. It was probably
> assumed that the driver only wants to offload num_tc (see
> TC_MQPRIO_HW_OFFLOAD_TCS), which it can get from netdev_get_num_tc(),
> but there's clearly more to the mqprio configuration than that.
> 
> To remedy that, we need to actually reconstruct a struct
> tc_mqprio_qopt_offload to pass as part of the tc_taprio_qopt_offload.
> The problem is that taprio doesn't keep a persistent reference to the
> mqprio queue structure in its own struct taprio_sched, instead it just
> applies the contents of that to the netdev state (prio:tc map, per-TC
> TXQ counts and offsets, num_tc etc). Maybe it's easier to understand
> why, when we look at the size of struct tc_mqprio_qopt_offload: 352
> bytes on arm64. Keeping such a large structure would throw off the
> memory accesses in struct taprio_sched no matter where we put it.
> So we prefer to dynamically reconstruct the mqprio offload structure
> based on netdev information, rather than saving a copy of it.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

Reviewed-by: Simon Horman <simon.horman@...igine.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ