Re: Bug in m_split() ?

2002-04-11 Thread Maksim Yevmenkin

 Hello Jeffrey,
 
  Please try out this patch instead.
 
  Index: uipc_mbuf.c
  ===
  RCS file: /home/cvs/src/sys/kern/uipc_mbuf.c,v
  retrieving revision 1.90
  diff -u -6 -r1.90 uipc_mbuf.c
  --- uipc_mbuf.c 5 Feb 2002 02:00:53 -   1.90
  +++ uipc_mbuf.c 11 Apr 2002 22:31:32 -
  @@ -585,14 +585,16 @@
 /* m can't be the lead packet */
 MH_ALIGN(n, 0);
 n-m_next = m_split(m, len, wait);
 if (n-m_next == NULL) {
 (void) m_free(n);
 return (NULL);
  -   } else
  +   } else {
  +   n-m_len = 0;
  return (n);
  +   }
  } else
  MH_ALIGN(n, remain);
 } else if (remain == 0) {
 n = m-m_next;
 m-m_next = NULL;
 return (n);
 
 it does _exactly_ the same thing as patch i sent. the idea is
 to set n-m_len to zero. in this particular part of the code
 n is not modified. only n-m_next. so i do not see any 
 difference except your patch is 4 lines :)
 
 --- uipc_mbuf.c.origMon Apr  8 14:40:23 2002
 +++ uipc_mbuf.c Mon Apr  8 14:40:43 2002
 @@ -584,6 +584,7 @@
 if (remain  MHLEN) {
 /* m can't be the lead packet */
 MH_ALIGN(n, 0);
 +   n-m_len = 0;
 n-m_next = m_split(m, len, wait);
 if (n-m_next == NULL) {
 (void) m_free(n);
 
 
 thanks,
 max

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Bug in m_split() ?

2002-04-11 Thread Terry Lambert

Maksim Yevmenkin wrote:
  it does _exactly_ the same thing as patch i sent. the idea is
  to set n-m_len to zero. in this particular part of the code
  n is not modified. only n-m_next. so i do not see any
  difference except your patch is 4 lines :)

Yours is less efficient.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Bug in m_split() ?

2002-04-10 Thread Maksim Yevmenkin

System Administrator wrote:
 
 Your message
 
   To:  [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Subject: Bug in m_split() ?
   Sent:Wed, 10 Apr 2002 09:23:16 -0700
 
 did not reach the following recipient(s):
 
 [EMAIL PROTECTED] on Wed, 10 Apr 2002 09:23:21 -0700
 The e-mail system was unable to deliver the message, but did not
 report a specific reason.  Check the address and try again.  If it still
 fails, contact your system administrator.
  riffraff.plig.net #5.0.0 X-Postfix; unknown user:
 freebsd-current
 [EMAIL PROTECTED] on Wed, 10 Apr 2002 09:23:21 -0700
 The e-mail system was unable to deliver the message, but did not
 report a specific reason.  Check the address and try again.  If it still
 fails, contact your system administrator.
  riffraff.plig.net #5.0.0 X-Postfix; unknown user:
 freebsd-hackers
 
   
 Reporting-MTA: dns; ex-sj-5.digisle.com
 
 Final-Recipient: RFC822; [EMAIL PROTECTED]
 Action: failed
 Status: 5.0.0
 X-Supplementary-Info:  riffraff.plig.net #5.0.0 X-Postfix; unknown user: 
freebsd-current
 X-Display-Name: [EMAIL PROTECTED]
 
 Final-Recipient: RFC822; [EMAIL PROTECTED]
 Action: failed
 Status: 5.0.0
 X-Supplementary-Info:  riffraff.plig.net #5.0.0 X-Postfix; unknown user: 
freebsd-hackers
 X-Display-Name: [EMAIL PROTECTED]
Hackers,

i'm sorry for the wide distribution, but can anyone, please,
review the following patch to m_split() or at least comment
on it. i have attached another example that shows my problem.

--- uipc_mbuf.c.origMon Apr  8 14:40:23 2002
+++ uipc_mbuf.c Mon Apr  8 14:40:43 2002
@@ -584,6 +584,7 @@
if (remain  MHLEN) {
/* m can't be the lead packet */
MH_ALIGN(n, 0);
+   n-m_len = 0;
n-m_next = m_split(m, len, wait);
if (n-m_next == NULL) {
(void) m_free(n);

thanks,
max


ng_cow.c.gz
Description: GNU Zip compressed data