Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vlan tagging doesn't work for me #315

Open
sv3n-mu3ll3r opened this issue Jul 2, 2021 · 0 comments
Open

Vlan tagging doesn't work for me #315

sv3n-mu3ll3r opened this issue Jul 2, 2021 · 0 comments

Comments

@sv3n-mu3ll3r
Copy link

Hello everybody,

I'm using MoonGen with Vmware and a Mellanox ConnectX-5 card. Untagged, I can send traffic though SR-IOV. But because I want other guests use the same card, I need to send the traffic tagged.

I added "buf:setVlan(3006)" to the code and hoped it would send traffic tagged with VlanID 3006. But it doesn't seem to be the case.

Do I miss anything?

Thanks a lot, sVen

while mg.running() do
-- fill packets and set their size
bufs:alloc(packetLen)
for i, buf in ipairs(bufs) do
buf:setVlan(3006)
local pkt = buf:getTcpPacket(ipv4)
--increment IP
if ipv4 then
pkt.ip4.src:set(minIP)
pkt.ip4.src:add(counter)
else
pkt.ip6.src:set(minIP)
pkt.ip6.src:add(counter)
end
counter = incAndWrap(counter, numIPs)

                    -- dump first 3 packets
                    if c < 1 then
                            buf:dump()
                            c = c + 1
                    end
            end
            --offload checksums to NIC
            bufs:offloadTcpChecksums(ipv4)
            queue:send(bufs)
            txStats:update()
    end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant