You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/07/08 22:24:31 UTC

[GitHub] [mynewt-newtmgr] ccollins476ad opened a new pull request #168: Freeze filter for `image upload` chunk length calculation

ccollins476ad opened a new pull request #168:
URL: https://github.com/apache/mynewt-newtmgr/pull/168


   To determine the correct amount of image data to put in an image upload request, newtmgr repeatedly generates requests until it finds the optimal value.  Each of these requests must be identical (aside from the payload size) or else the comparison is invalid.  If a `sesn`'s filter uses different parameters each time it encodes a message (e.g., if it does encryption), that breaks this method of determining the correct chunk size.
           
   By freezing the filter, the same parameters get used for each subsequent message encoding.  This ensures the payload size won't change after we have settled on a chunk size.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-newtmgr] nkaje merged pull request #168: Freeze filter for `image upload` chunk length calculation

Posted by GitBox <gi...@apache.org>.
nkaje merged pull request #168:
URL: https://github.com/apache/mynewt-newtmgr/pull/168


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-newtmgr] nkaje commented on pull request #168: Freeze filter for `image upload` chunk length calculation

Posted by GitBox <gi...@apache.org>.
nkaje commented on pull request #168:
URL: https://github.com/apache/mynewt-newtmgr/pull/168#issuecomment-656931819


   LGTM


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-newtmgr] nkaje commented on pull request #168: Freeze filter for `image upload` chunk length calculation

Posted by GitBox <gi...@apache.org>.
nkaje commented on pull request #168:
URL: https://github.com/apache/mynewt-newtmgr/pull/168#issuecomment-658358523


   I think we need this as well to compile.
   --- begin ---
   --- a/nmxact/mgmt/transceiver.go
   +++ b/nmxact/mgmt/transceiver.go
   @@ -219,9 +219,9 @@ func (t *Transceiver) txRxOmpAsync(txCb TxFn, req *nmp.NmpMsg, mtu int,
    
           var b []byte
           if t.isTcp {
   -               b, err = omp.EncodeOmpTcp(t.txFilterCb, req)
   +               b, err = omp.EncodeOmpTcp(t.txFilter, req)
           } else {
   -               b, err = omp.EncodeOmpDgram(t.txFilterCb, req)
   +               b, err = omp.EncodeOmpDgram(t.txFilter, req)
           }
           if err != nil {
                   return err
   ----- end ----


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-newtmgr] nkaje edited a comment on pull request #168: Freeze filter for `image upload` chunk length calculation

Posted by GitBox <gi...@apache.org>.
nkaje edited a comment on pull request #168:
URL: https://github.com/apache/mynewt-newtmgr/pull/168#issuecomment-658358523


   I think we need this as well to compile.
   
   ```
   --- a/nmxact/mgmt/transceiver.go
   +++ b/nmxact/mgmt/transceiver.go
   @@ -219,9 +219,9 @@ func (t *Transceiver) txRxOmpAsync(txCb TxFn, req *nmp.NmpMsg, mtu int,
           var b []byte
           if t.isTcp {
   -               b, err = omp.EncodeOmpTcp(t.txFilterCb, req)
   +               b, err = omp.EncodeOmpTcp(t.txFilter, req)
           } else {
   -               b, err = omp.EncodeOmpDgram(t.txFilterCb, req)
   +               b, err = omp.EncodeOmpDgram(t.txFilter, req)
           }
           if err != nil {
                   return err
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org