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: <ca8d1a59-eb28-5a10-f261-a1b97e4156fc@iogearbox.net>
Date: Mon, 9 Oct 2023 10:11:04 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: kuba@...nel.org, netdev@...r.kernel.org, bpf@...r.kernel.org,
 jhs@...atatu.com, victor@...atatu.com, martin.lau@...ux.dev, dxu@...uu.xyz
Subject: Re: [PATCH net-next 1/2] net, tc: Make tc-related drop reason more
 flexible

On 10/8/23 7:27 PM, Cong Wang wrote:
> On Fri, Oct 06, 2023 at 09:09:55PM +0200, Daniel Borkmann wrote:
>> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
>> index c7318c73cfd6..90774cb2ac03 100644
>> --- a/include/net/sch_generic.h
>> +++ b/include/net/sch_generic.h
>> @@ -324,7 +324,6 @@ struct Qdisc_ops {
>>   	struct module		*owner;
>>   };
>>   
>> -
>>   struct tcf_result {
>>   	union {
>>   		struct {
>> @@ -332,8 +331,8 @@ struct tcf_result {
>>   			u32		classid;
>>   		};
>>   		const struct tcf_proto *goto_tp;
>> -
>>   	};
>> +	enum skb_drop_reason		drop_reason;
>>   };
>>   
>>   struct tcf_chain;
>> @@ -667,6 +666,12 @@ static inline int tc_classid_to_hwtc(struct net_device *dev, u32 classid)
>>   	return (hwtc < netdev_get_num_tc(dev)) ? hwtc : -EINVAL;
>>   }
>>   
>> +static inline void tc_set_drop_reason(struct tcf_result *res,
>> +				      enum skb_drop_reason reason)
>> +{
>> +	res->drop_reason = reason;
>> +}
>> +
> 
> Since this helper is for TC filters and actions, include/net/pkt_cls.h
> is a better place for it?

Makes sense, will move it in a v2 (and also rename into tcf_set_drop_reason).

Thanks,
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ