Jason Xing wrote: > From: Jason Xing <kernelxing@xxxxxxxxxxx> > > Willem suggested that we use a static key to control. The advantage > is that we will not affect the existing applications at all if we > don't load BPF program. > > In this patch, except the static key, I also add one logic that is > used to test if the socket has enabled its tsflags in order to > support bpf logic to allow both cases to happen at the same time. These two features are unrelated, should probably be separate patches. > Or else, the skb carring related timestamp flag doesn't know which > way of printing is desirable. > > One thing important is this patch allows print from both applications > and bpf program at the same time. Now we have three kinds of print: > 1) only BPF program prints > 2) only application program prints > 3) both can print without side effect > > Signed-off-by: Jason Xing <kernelxing@xxxxxxxxxxx>