IOB: remove flags

This commit is contained in:
Gregory Nutt 2014-06-09 13:54:47 -06:00
parent 55f9e5b465
commit 60306a16d7
6 changed files with 3 additions and 12 deletions

View File

@ -50,10 +50,6 @@
* Pre-processor Definitions
****************************************************************************/
/* IOB flags */
#define IOBFLAGS_MCAST (1 << 0) /* Multicast packet */
/* IOB helpers */
#define IOB_DATA(p) (&(p)->io_data[(p)->io_offset])
@ -69,8 +65,8 @@
****************************************************************************/
/* Represents one I/O buffer. A packet is contained by one or more I/O
* buffers in a chain. The io_flags, io_pktlen, io_vtag and io_priv
* fields are only valid for the I/O buffer at the head of the chain.
* buffers in a chain. Theio_pktlen and io_priv fields are only valid for
* the I/O buffer at the head of the chain.
*/
struct iob_s
@ -81,7 +77,6 @@ struct iob_s
/* Payload */
uint8_t io_flags; /* Flags associated with the I/O buffer */
#if CONFIG_IOB_BUFSIZE < 256
uint8_t io_len; /* Length of the data in the entry */
uint8_t io_offset; /* Data begins at this offset */

View File

@ -93,7 +93,6 @@ FAR struct iob_s *iob_alloc(void)
/* Put the I/O buffer in a known state */
iob->io_flink = NULL; /* Not in a chain */
iob->io_flags = 0; /* Flags associated with the I/O buffer */
iob->io_len = 0; /* Length of the data in the entry */
iob->io_offset = 0; /* Offset to the beginning of data */
iob->io_pktlen = 0; /* Total length of the packet */

View File

@ -95,7 +95,6 @@ int iob_clone(FAR struct iob_s *iob1, FAR struct iob_s *iob2)
/* Copy the header information */
iob2->io_flags = iob1->io_flags;
iob2->io_pktlen = iob1->io_pktlen;
iob2->io_priv = iob1->io_priv;

View File

@ -91,6 +91,5 @@ void iob_concat(FAR struct iob_s *iob1, FAR struct iob_s *iob2)
*/
iob1->io_pktlen += iob2->io_pktlen;
iob2->io_flags = 0;
iob2->io_priv = NULL;
}

View File

@ -88,7 +88,6 @@ FAR struct iob_s *iob_free(FAR struct iob_s *iob)
{
/* Just copy the flags and private information to the next entry. */
next->io_flags = iob->io_flags;
next->io_priv = iob->io_priv;
/* Copy and decrement the total packet length, being careful to

View File

@ -79,7 +79,7 @@ static void dump_chain(struct iob_s *iob)
int n;
printf("=========================================================\n");
printf("pktlen: %d flags: %02x\n", iob->io_pktlen, iob->io_flags);
printf("pktlen: %d\n", iob->io_pktlen);
n = 0;
pktlen = 0;