IOB: Remove private data. Not needed
This commit is contained in:
parent
c4ae0251bf
commit
33330bd686
|
@ -65,8 +65,8 @@
|
|||
****************************************************************************/
|
||||
|
||||
/* Represents one I/O buffer. A packet is contained by one or more I/O
|
||||
* buffers in a chain. Theio_pktlen and io_priv fields are only valid for
|
||||
* the I/O buffer at the head of the chain.
|
||||
* buffers in a chain. The io_pktlen is only valid for the I/O buffer at
|
||||
* the head of the chain.
|
||||
*/
|
||||
|
||||
struct iob_s
|
||||
|
@ -85,7 +85,6 @@ struct iob_s
|
|||
uint16_t io_offset; /* Data begins at this offset */
|
||||
#endif
|
||||
uint16_t io_pktlen; /* Total length of the packet */
|
||||
void *io_priv; /* User private data attached to the I/O buffer */
|
||||
|
||||
uint8_t io_data[CONFIG_IOB_BUFSIZE];
|
||||
};
|
||||
|
|
|
@ -96,7 +96,6 @@ FAR struct iob_s *iob_alloc(void)
|
|||
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 */
|
||||
iob->io_priv = NULL; /* User private data attached to the I/O buffer */
|
||||
return iob;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,10 +93,9 @@ int iob_clone(FAR struct iob_s *iob1, FAR struct iob_s *iob2)
|
|||
DEBUGASSERT(iob2->io_len == 0 && iob2->io_offset == 0 &&
|
||||
iob2->io_pktlen == 0 && iob2->io_flink == NULL);
|
||||
|
||||
/* Copy the header information */
|
||||
/* Copy the total packet size from the I/O buffer at the head of the chain */
|
||||
|
||||
iob2->io_pktlen = iob1->io_pktlen;
|
||||
iob2->io_priv = iob1->io_priv;
|
||||
|
||||
/* Handle special case where there are empty buffers at the head
|
||||
* the the list.
|
||||
|
|
|
@ -86,10 +86,7 @@ void iob_concat(FAR struct iob_s *iob1, FAR struct iob_s *iob2)
|
|||
|
||||
iob1->io_flink = iob2;
|
||||
|
||||
/* Combine the total packet size. flags, VLAN, tags, and private
|
||||
* data from iob2 are lost.
|
||||
*/
|
||||
/* Combine the total packet size */
|
||||
|
||||
iob1->io_pktlen += iob2->io_pktlen;
|
||||
iob2->io_priv = NULL;
|
||||
}
|
||||
|
|
|
@ -86,9 +86,6 @@ FAR struct iob_s *iob_free(FAR struct iob_s *iob)
|
|||
|
||||
if (next)
|
||||
{
|
||||
/* Just copy the flags and private information to the next entry. */
|
||||
|
||||
next->io_priv = iob->io_priv;
|
||||
|
||||
/* Copy and decrement the total packet length, being careful to
|
||||
* do nothing too crazy.
|
||||
|
|
|
@ -86,8 +86,7 @@ static void dump_chain(struct iob_s *iob)
|
|||
|
||||
while (iob)
|
||||
{
|
||||
printf("%d. len=%d, offset=%d, priv=%p\n",
|
||||
n, iob->io_len, iob->io_offset, iob->io_priv);
|
||||
printf("%d. len=%d, offset=%d\n", n, iob->io_len, iob->io_offset);
|
||||
|
||||
pktlen += iob->io_len;
|
||||
iob = iob->io_flink;
|
||||
|
|
Loading…
Reference in New Issue