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: <ZSLmkPxB9mHBT52v@pop-os.localdomain>
Date: Sun, 8 Oct 2023 10:27:44 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Daniel Borkmann <daniel@...earbox.net>
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 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?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ