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: <DM6PR11MB2780FAD51DA7C55ECCC5A835CA729@DM6PR11MB2780.namprd11.prod.outlook.com>
Date:   Sat, 11 Dec 2021 14:02:42 +0000
From:   "Ong, Boon Leong" <boon.leong.ong@...el.com>
To:     "Kanzenbach, Kurt" <kurt.kanzenbach@...utronix.de>,
        Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        "Jose Abreu" <joabreu@...opsys.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        "alexandre.torgue@...s.st.com" <alexandre.torgue@...s.st.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-stm32@...md-mailman.stormreply.com" 
        <linux-stm32@...md-mailman.stormreply.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: RE: [PATCH net-next 2/2] net: stmmac: add tc flower filter for
 EtherType matching

>[snip]
>
>> +	if (match.mask->n_proto) {
>> +		__be16 etype = ntohs(match.key->n_proto);
>
>n_proto is be16. The ntohs() call will produce an u16.
>
>Delta patch below.
>
>Thanks,
>Kurt
>
>diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
>b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
>index 35ff7c835018..d64e42308eb6 100644
>--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
>+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
>@@ -182,7 +182,7 @@ enum stmmac_rfs_type {
>
> struct stmmac_rfs_entry {
>        unsigned long cookie;
>-       __be16 etype;
>+       u16 etype;
>        int in_use;
>        int type;
>        int idx;
>diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
>b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
>index cb7400943bb0..afa918185cf7 100644
>--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
>+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
>@@ -759,7 +759,7 @@ static int tc_add_ethtype_flow(struct stmmac_priv
>*priv,
>        flow_rule_match_basic(rule, &match);
>
>        if (match.mask->n_proto) {
>-               __be16 etype = ntohs(match.key->n_proto);
>+               u16 etype = ntohs(match.key->n_proto);
>
>                if (match.mask->n_proto != ETHER_TYPE_FULL_MASK) {
>                        netdev_err(priv->dev, "Only full mask is supported for EthType
>filter");

Thanks for the suggestion. I will incorporate in v2 patch after we conclude
if the tc flower hw_tc interface used for specifying RxQ queue is agreeable
by community.  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ