Re: [PATCHv7 bpf-next] samples/bpf: add xdp program on egress for xdp_redirect_map

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/15/21 7:24 AM, Hangbin Liu wrote:
This patch add a xdp program on egress to show that we can modify
the packet on egress. In this sample we will set the pkt's src
mac to egress's mac address. The xdp_prog will be attached when
-X option supplied.

Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxx>

This has a bunch of minor checkpatch issues, see also netdev/checkpatch	[0];
disregard the 'exceeds 80 columns' but there is a double newline and other
minor stuff that slipped in (usually good to catch before submission):

WARNING: Missing a blank line after declarations
#133: FILE: samples/bpf/xdp_redirect_map_kern.c:139:
+	unsigned char mac[6] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x1};
+	return xdp_redirect_map_egress(ctx, mac);

WARNING: Missing a blank line after declarations
#141: FILE: samples/bpf/xdp_redirect_map_kern.c:147:
+	unsigned char mac[6] = {0x0, 0x0, 0x0, 0x0, 0x1, 0x1};
+	return xdp_redirect_map_egress(ctx, mac);

ERROR: do not initialise statics to false
#164: FILE: samples/bpf/xdp_redirect_map_user.c:29:
+static bool xdp_devmap_attached = false;

CHECK: Please don't use multiple blank lines
#340: FILE: samples/bpf/xdp_redirect_map_user.c:285:
+
+

Please carry ACK forward, fix them up and resubmit, thanks!

  [0] https://patchwork.kernel.org/project/netdevbpf/patch/20210115062433.2624893-1-liuhangbin@xxxxxxxxx/



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux