Skip to content

Commit

Permalink
Set Rx/TxFrameSize for af_packet interface (#847)
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
  • Loading branch information
glazychev-art authored Mar 23, 2023
1 parent a716071 commit 62f9f74
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/vppinit/vppinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,12 @@ func LinkToAfPacket(ctx context.Context, vppConn api.Connection, tunnelIP net.IP

func createAfPacket(ctx context.Context, vppConn api.Connection, link netlink.Link) (interface_types.InterfaceIndex, error) {
afPacketCreate := &af_packet.AfPacketCreateV3{
Mode: af_packet.AF_PACKET_API_MODE_ETHERNET,
HwAddr: types.ToVppMacAddress(&link.Attrs().HardwareAddr),
HostIfName: link.Attrs().Name,
Flags: af_packet.AF_PACKET_API_FLAG_VERSION_2,
Mode: af_packet.AF_PACKET_API_MODE_ETHERNET,
HwAddr: types.ToVppMacAddress(&link.Attrs().HardwareAddr),
HostIfName: link.Attrs().Name,
RxFrameSize: 10240,
TxFrameSize: 10240,
Flags: af_packet.AF_PACKET_API_FLAG_VERSION_2,
}
now := time.Now()
afPacketCreateRsp, err := af_packet.NewServiceClient(vppConn).AfPacketCreateV3(ctx, afPacketCreate)
Expand Down

0 comments on commit 62f9f74

Please sign in to comment.