[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] e1000: NetClientInfo.receive_iov implemented
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] e1000: NetClientInfo.receive_iov implemented |
Date: |
Tue, 10 Sep 2013 10:31:56 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Sep 09, 2013 at 02:51:42PM +0200, Vincenzo Maffione wrote:
Just two small style comments:
> @@ -834,11 +837,14 @@ e1000_receive(NetClientState *nc, const uint8_t *buf,
> size_t size)
> unsigned int n, rdt;
> uint32_t rdh_start;
> uint16_t vlan_special = 0;
> - uint8_t vlan_status = 0, vlan_offset = 0;
> + uint8_t vlan_status = 0;
> uint8_t min_buf[MIN_BUF_SIZE];
> size_t desc_offset;
> size_t desc_size;
> size_t total_size;
> + size_t size = iov_size(iov, iovcnt), iov_ofs = 0;
Please keep these initializers on separate lines (not a hard rule, but I
find it clearer especially when calling functions):
size_t size = iov_size(iov, iovcnt);
size_t iov_ofs = 0;
> + struct iovec iv;
This iovec is for min_buf[]. I suggest moving it below the min_buf[]
declaration and renaming it to make its purpose clearer:
struct iovec min_iovec;
Stefan