Skip to content

Commit

Permalink
intel_avf: minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Oct 26, 2019
1 parent 88d2a56 commit f894983
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/apps/intel_avf/intel_avf.lua
Expand Up @@ -11,7 +11,7 @@ local macaddress = require("lib.macaddress")
local pci = require("lib.hardware.pci")
local register = require("lib.hardware.register")
local tophysical = core.memory.virtual_to_physical
local band = bit.band
local band, lshift, rshift = bit.band, bit.lshift, bit.rshift
local transmit, receive, empty = link.transmit, link.receive, link.empty
local counter = require("core.counter")

Expand Down Expand Up @@ -68,7 +68,7 @@ local rxdesc_t = ffi.typeof([[
uint64_t status_err_type_len;
uint64_t pad2;
uint64_t pad3;
} __attribute__((packet)) write;
} __attribute__((packed)) write;
}
]])
local rxdesc_ptr_t = ffi.typeof("$ *", rxdesc_t)
Expand Down Expand Up @@ -415,7 +415,7 @@ function Intel_avf:pull()
local pkts = 0
while band(self.rxdesc[self.rx_tail].write.status_err_type_len, 0x01) == 1 and pkts < engine.pull_npackets do
local p = self.rxqueue[self.rx_tail]
p.length = bit.rshift(self.rxdesc[self.rx_tail].write.status_err_type_len, 38)
p.length = rshift(self.rxdesc[self.rx_tail].write.status_err_type_len, 38)
transmit(lo, p)

local np = packet.allocate()
Expand Down

0 comments on commit f894983

Please sign in to comment.