Thread (14 messages) 14 messages, 3 authors, 2021-11-29

Re: [PATCH bpf-next 2/4] samples/bpf: xdpsock: add Dest and Src MAC setting for Tx-only operation

From: Jesper Dangaard Brouer <hidden>
Date: 2021-11-27 09:54:00
Also in: bpf


On 24/11/2021 10.18, Ong Boon Leong wrote:
To set Dest MAC address (-G|--tx-dmac) only:
  $ xdpsock -i eth0 -t -N -z -G aa:bb:cc:dd:ee:ff

To set Source MAC address (-H|--tx-smac) only:
  $ xdpsock -i eth0 -t -N -z -H 11:22:33:44:55:66

To set both Dest and Source MAC address:
  $ xdpsock -i eth0 -t -N -z -G aa:bb:cc:dd:ee:ff \
    -H 11:22:33:44:55:66

The default Dest and Source MAC address remain the same as before.

Signed-off-by: Ong Boon Leong<redacted>
---
  samples/bpf/xdpsock_user.c | 36 +++++++++++++++++++++++++++++++-----
  1 file changed, 31 insertions(+), 5 deletions(-)
Acked-by: Jesper Dangaard Brouer <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help