return true;
}
-void __fix_address sk_skb_reason_drop(struct sock *sk, struct sk_buff *skb,
+void __fix_address sk_skb_reason_drop(const struct sock *sk,
+ struct sk_buff *skb,
enum skb_drop_reason reason);
static inline void
TRACE_EVENT(kfree_skb,
TP_PROTO(struct sk_buff *skb, void *location,
- enum skb_drop_reason reason, struct sock *rx_sk),
+ enum skb_drop_reason reason, const struct sock *rx_sk),
TP_ARGS(skb, location, reason, rx_sk),
TP_STRUCT__entry(
__field(void *, skbaddr)
__field(void *, location)
- __field(void *, rx_sk)
+ __field(const void *, rx_sk)
__field(unsigned short, protocol)
__field(enum skb_drop_reason, reason)
),
void (*kfree_skb_probe)(void *ignore, struct sk_buff *skb,
void *location,
enum skb_drop_reason reason,
- struct sock *rx_sk);
+ const struct sock *rx_sk);
void (*napi_poll_probe)(void *ignore, struct napi_struct *napi,
int work, int budget);
void (*work_item_func)(struct work_struct *work);
static void trace_kfree_skb_hit(void *ignore, struct sk_buff *skb,
void *location,
enum skb_drop_reason reason,
- struct sock *rx_sk)
+ const struct sock *rx_sk)
{
trace_drop_common(skb, location);
}
struct sk_buff *skb,
void *location,
enum skb_drop_reason reason,
- struct sock *rx_sk)
+ const struct sock *rx_sk)
{
ktime_t tstamp = ktime_get_real();
struct per_cpu_dm_data *data;
EXPORT_SYMBOL(__kfree_skb);
static __always_inline
-bool __sk_skb_reason_drop(struct sock *sk, struct sk_buff *skb,
+bool __sk_skb_reason_drop(const struct sock *sk, struct sk_buff *skb,
enum skb_drop_reason reason)
{
if (unlikely(!skb_unref(skb)))
* 'kfree_skb' tracepoint.
*/
void __fix_address
-sk_skb_reason_drop(struct sock *sk, struct sk_buff *skb, enum skb_drop_reason reason)
+sk_skb_reason_drop(const struct sock *sk, struct sk_buff *skb,
+ enum skb_drop_reason reason)
{
if (__sk_skb_reason_drop(sk, skb, reason))
__kfree_skb(skb);