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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 27 Oct 2017 20:28:16 -0700
From:   Michael Chan <michael.chan@...adcom.com>
To:     Jakub Kicinski <kubakici@...pl>
Cc:     David Miller <davem@...emloft.net>,
        Netdev <netdev@...r.kernel.org>,
        Sathya Perla <sathya.perla@...adcom.com>
Subject: Re: [PATCH net-next 11/14] bnxt_en: add support for Flower based
 vxlan encap/decap offload

On Fri, Oct 27, 2017 at 8:18 PM, Jakub Kicinski <kubakici@...pl> wrote:
> On Thu, 26 Oct 2017 11:51:29 -0400, Michael Chan wrote:
>> From: Sathya Perla <sathya.perla@...adcom.com>
>>
>> This patch adds IPv4 vxlan encap/decap action support to TC-flower
>> offload.
>>
>> For vxlan encap, the driver maintains a tunnel encap hash-table.
>> When a new flow with a tunnel encap action arrives, this table
>> is looked up; if an encap entry exists, it uses the already
>> programmed encap_record_handle as the tunnel_handle in the
>> hwrm_cfa_flow_alloc cmd. Else, a new encap node is added and the
>> L2 header fields are queried via a route lookup.
>> hwrm_cfa_encap_record_alloc cmd is used to create a new encap
>> record and the encap_record_handle is used as the tunnel_handle
>> while adding the flow.
>>
>> For vxlan decap, the driver maintains a tunnel decap hash-table.
>> When a new flow with a tunnel decap action arrives, this table
>> is looked up; if a decap entry exists, it uses the already
>> programmed decap_filter_handle as the tunnel_handle in the
>> hwrm_cfa_flow_alloc cmd. Else, a new decap node is added and
>> a decap_filter_handle is alloc'd via the hwrm_cfa_decap_filter_alloc
>> cmd. This handle is used as the tunnel_handle while adding the flow.
>>
>> The code to issue the HWRM FW cmds is introduced in a follow-up patch.
>>
>> Signed-off-by: Sathya Perla <sathya.perla@...adcom.com>
>> Signed-off-by: Michael Chan <michael.chan@...adcom.com>
>
> Hi!  I hit this randconfig build testing:
>
> ../drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c: In function ‘bnxt_tc_resolve_tunnel_hdrs’:
> ../drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:928:32: error: implicit declaration of function ‘vlan_dev_priv’ [-Werror=implicit-function-declaration]
>    struct vlan_dev_priv *vlan = vlan_dev_priv(dst_dev);
>                                 ^~~~~~~~~~~~~
> ../drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:928:32: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
> In file included from ../include/uapi/linux/stddef.h:1:0,
>                  from ../include/linux/stddef.h:4,
>                  from ../include/uapi/linux/posix_types.h:4,
>                  from ../include/uapi/linux/types.h:13,
>                  from ../include/linux/types.h:5,
>                  from ../include/linux/list.h:4,
>                  from ../include/linux/timer.h:4,
>                  from ../include/linux/netdevice.h:28,
>                  from ../drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:10:
> ../drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:930:11: error: dereferencing pointer to incomplete type ‘struct vlan_dev_priv’
>    if (vlan->real_dev != real_dst_dev) {
>            ^
> ../include/linux/compiler.h:156:30: note: in definition of macro ‘__trace_if’
>   if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
>                               ^~~~
> ../drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:930:3: note: in expansion of macro ‘if’
>    if (vlan->real_dev != real_dst_dev) {
>    ^~
> cc1: some warnings being treated as errors

Thanks for reporting this.  I think we need to use vlan_dev_real_dev()
API which will handle the case where CONFIG_VLAN_8021Q is not defined.

I will send a patch to fix this shortly.  Thanks again.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ