Skip to content

Commit

Permalink
iptfs: impl: add state debug
Browse files Browse the repository at this point in the history
  • Loading branch information
choppsv1 committed Jul 17, 2023
1 parent 23061cf commit ef46024
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions net/xfrm/xfrm_iptfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ int xfrm_iptfs_init_state(struct xfrm_state *x)
if (!xtfs)
return -ENOMEM;

pr_devinf("init %p\n", xtfs);

xtfs->x = x;
xtfs->cfg.reorder_win_size = XFRM_IPTFS_DEFAULT_REORDER_WINDOW;
xtfs->cfg.max_queue_size = XFRM_IPTFS_DEFAULT_MAX_QUEUE_SIZE;
Expand All @@ -198,6 +200,9 @@ int xfrm_iptfs_init_state(struct xfrm_state *x)
void xfrm_iptfs_state_destroy(struct xfrm_state *x)
{
struct xfrm_iptfs_data *xtfs = x->tfs_data;

pr_devinf("destroy %p\n", xtfs);

if (IS_ERR_OR_NULL(xtfs))
return;

Expand All @@ -215,6 +220,8 @@ int xfrm_iptfs_user_init(struct net *net, struct xfrm_state *x,
struct xfrm_iptfs_data *xtfs = x->tfs_data;
struct xfrm_iptfs_config *xc;

pr_devinf("user_init %p\n", xtfs);

if (x->props.mode != XFRM_MODE_IPTFS)
return EINVAL;

Expand Down Expand Up @@ -265,6 +272,8 @@ int xfrm_iptfs_copy_to_user_state(struct xfrm_state *x, struct sk_buff *skb)
struct xfrm_iptfs_config *xc = &x->tfs_data->cfg;
int ret;

pr_devinf("copy state to user %p\n", x->tfs_data);

if (xc->dont_frag) {
if ((ret = nla_put_flag(skb, XFRMA_IPTFS_DONT_FRAG)))
return ret;
Expand Down Expand Up @@ -824,7 +833,7 @@ static int iptfs_input_ordered(struct gro_cells *gro_cells,
INIT_LIST_HEAD(&sublist);

/*
* Handle fragment at start of payload / reassembly.
* Handle fragment at start of payload, and/or waiting reassembly.
*/

blkoff = ntohs(ipth->block_offset);
Expand Down Expand Up @@ -1821,7 +1830,7 @@ static int iptfs_xfrm_output(struct sk_buff *skb, uint remaining)
skb->len, remaining);
err = xfrm_output(NULL, skb);
if (err < 0)
printk("XXX got xfrm_output error: %d", err);
pr_warn_ratelimited("xfrm_output error: %d", err);
return err;
}

Expand Down

0 comments on commit ef46024

Please sign in to comment.