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] [day] [month] [year] [list]
Message-ID: <8f93148e-2c9d-3c31-38b1-6d1ae2f0d434@oracle.com>
Date:   Sat, 26 Feb 2022 00:52:34 -0800
From:   Dongli Zhang <dongli.zhang@...cle.com>
To:     David Ahern <dsahern@...il.com>, netdev@...r.kernel.org,
        bpf@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
        rostedt@...dmis.org, mingo@...hat.com, ast@...nel.org,
        daniel@...earbox.net, andrii@...nel.org, imagedong@...cent.com,
        joao.m.martins@...cle.com, joe.jin@...cle.com, edumazet@...gle.com
Subject: Re: [PATCH net-next v3 2/4] net: tap: track dropped skb via
 kfree_skb_reason()



On 2/21/22 8:31 PM, Dongli Zhang wrote:
> Hi David,
> 
> On 2/21/22 7:24 PM, David Ahern wrote:
>> On 2/20/22 10:34 PM, Dongli Zhang wrote:
>>> The TAP can be used as vhost-net backend. E.g., the tap_handle_frame() is
>>> the interface to forward the skb from TAP to vhost-net/virtio-net.
>>>
>>> However, there are many "goto drop" in the TAP driver. Therefore, the
>>> kfree_skb_reason() is involved at each "goto drop" to help userspace
>>> ftrace/ebpf to track the reason for the loss of packets.
>>>
>>> The below reasons are introduced:
>>>
>>> - SKB_DROP_REASON_SKB_CSUM
>>> - SKB_DROP_REASON_SKB_COPY_DATA
>>> - SKB_DROP_REASON_SKB_GSO_SEG
>>> - SKB_DROP_REASON_DEV_HDR
>>> - SKB_DROP_REASON_FULL_RING
>>>
>>> Cc: Joao Martins <joao.m.martins@...cle.com>
>>> Cc: Joe Jin <joe.jin@...cle.com>
>>> Signed-off-by: Dongli Zhang <dongli.zhang@...cle.com>
>>> ---
>>> Changed since v1:
>>>   - revise the reason name
>>> Changed since v2:
>>>   - declare drop_reason as type "enum skb_drop_reason"
>>>   - handle the drop in skb_list_walk_safe() case
>>>
>>>  drivers/net/tap.c          | 35 +++++++++++++++++++++++++----------
>>>  include/linux/skbuff.h     |  9 +++++++++
>>>  include/trace/events/skb.h |  5 +++++
>>>  3 files changed, 39 insertions(+), 10 deletions(-)
>>>
>>
>> couple of places where the new reason should be in reverse xmas order;
>> logic wise:
>>
>> Reviewed-by: David Ahern <dsahern@...nel.org>
>>
> 
> I will re-order the reasons in the same patch and re-send with your Reviewed-by
> in the next version.
> 

I have sent out v4 and I finally decide to not re-order reasons for this patch
as this may makes trouble for backport.

I will not follow the reverse xmas order here, as all existing variables are not
declared in reverse xmas order.

Thank you very much!

Dongli Zhang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ