------- Comment From <email address hidden> 2022-03-16 13:19 EDT------- (In reply to comment #9) > Thx for the list of commits. > > Looks like LP#1929060 "[22.04 FEAT] smc: Add User-defined EID (Enterprise > ID) Support - kernel" is a prereq - if not worked based on that, I run into > EID issues already starting with 42042dbbc2eb. > > Applying the patches based on LP#1929060 I get further down, but still run > into conflicts, this time with 8799e310fb3f ("net/smc: add v2 support to the > work request layer"). > > $ git cherry-pick -s -e -x 8799e310fb3f > Auto-merging net/smc/smc_wr.h > Auto-merging net/smc/smc_wr.c > CONFLICT (content): Merge conflict in net/smc/smc_wr.c > Auto-merging net/smc/smc_ib.c > Auto-merging net/smc/smc_core.h > Auto-merging net/smc/smc_core.c > error: could not apply 8799e310fb3f... net/smc: add v2 support to the work > request layer > hint: after resolving the conflicts, mark the corrected paths > hint: with 'git add <paths>' or 'git rm <paths>' > hint: and commit the result with 'git commit' > fheimes@T570:~/ubuntu-jammy-master-next/jammy-lp1929035$ git status > On branch master-next > Your branch is ahead of 'origin/master-next' by 9 commits. > (use "git push" to publish your local commits) > > You are currently cherry-picking commit 8799e310fb3f. > (fix conflicts and run "git cherry-pick --continue") > (use "git cherry-pick --skip" to skip this patch) > (use "git cherry-pick --abort" to cancel the cherry-pick operation) > > Changes to be committed: > modified: net/smc/smc_core.c > modified: net/smc/smc_core.h > modified: net/smc/smc_ib.c > modified: net/smc/smc_wr.h > > Unmerged paths: > (use "git add <file>..." to mark resolution) > both modified: net/smc/smc_wr.c > $ > > $ git diff > diff --cc net/smc/smc_wr.c > index 59ca1a2d5c65,22d7324969cd..000000000000 > --- a/net/smc/smc_wr.c > +++ b/net/smc/smc_wr.c > @@@ -96,20 -101,47 +96,59 @@@ static inline void smc_wr_tx_process_cq > } > > pnd_snd_idx = smc_wr_tx_find_pending_index(link, wc->wr_id); > - if (pnd_snd_idx == link->wr_tx_cnt) > - return; > - link->wr_tx_pends[pnd_snd_idx].wc_status = wc->status; > - if (link->wr_tx_pends[pnd_snd_idx].compl_requested) > - complete(&link->wr_tx_compl[pnd_snd_idx]); > - memcpy(&pnd_snd, &link->wr_tx_pends[pnd_snd_idx], sizeof(pnd_snd)); > - /* clear the full struct smc_wr_tx_pend including .priv */ > - memset(&link->wr_tx_pends[pnd_snd_idx], 0, > - sizeof(link->wr_tx_pends[pnd_snd_idx])); > - memset(&link->wr_tx_bufs[pnd_snd_idx], 0, > - sizeof(link->wr_tx_bufs[pnd_snd_idx])); > - if (!test_and_clear_bit(pnd_snd_idx, link->wr_tx_mask)) > - return; > + if (pnd_snd_idx == link->wr_tx_cnt) { > + if (link->lgr->smc_version != SMC_V2 || > + link->wr_tx_v2_pend->wr_id != wc->wr_id) > + return; > + link->wr_tx_v2_pend->wc_status = wc->status; > + memcpy(&pnd_snd, link->wr_tx_v2_pend, sizeof(pnd_snd)); > + /* clear the full struct smc_wr_tx_pend including .priv */ > + memset(link->wr_tx_v2_pend, 0, > + sizeof(*link->wr_tx_v2_pend)); > + memset(link->lgr->wr_tx_buf_v2, 0, > + sizeof(*link->lgr->wr_tx_buf_v2)); > + } else { > + link->wr_tx_pends[pnd_snd_idx].wc_status = wc->status; > + if (link->wr_tx_pends[pnd_snd_idx].compl_requested) > + complete(&link->wr_tx_compl[pnd_snd_idx]); > + memcpy(&pnd_snd, &link->wr_tx_pends[pnd_snd_idx], > + sizeof(pnd_snd)); > + /* clear the full struct smc_wr_tx_pend including .priv */ > + memset(&link->wr_tx_pends[pnd_snd_idx], 0, > + sizeof(link->wr_tx_pends[pnd_snd_idx])); > + memset(&link->wr_tx_bufs[pnd_snd_idx], 0, > + sizeof(link->wr_tx_bufs[pnd_snd_idx])); > + if (!test_and_clear_bit(pnd_snd_idx, link->wr_tx_mask)) > + return; > + } > + > if (wc->status) { > ++<<<<<<< HEAD > ++||||||| parent of 8799e310fb3f... net/smc: add v2 support to the work > request layer > ++ for_each_set_bit(i, link->wr_tx_mask, link->wr_tx_cnt) { > ++ /* clear full struct smc_wr_tx_pend including .priv > */ > ++ memset(&link->wr_tx_pends[i], 0, > ++ sizeof(link->wr_tx_pends[i])); > ++ memset(&link->wr_tx_bufs[i], 0, > ++ sizeof(link->wr_tx_bufs[i])); > ++ clear_bit(i, link->wr_tx_mask); > ++ } > ++======= > + for_each_set_bit(i, link->wr_tx_mask, link->wr_tx_cnt) { > + /* clear full struct smc_wr_tx_pend including .priv > */ > + memset(&link->wr_tx_pends[i], 0, > + sizeof(link->wr_tx_pends[i])); > + memset(&link->wr_tx_bufs[i], 0, > + sizeof(link->wr_tx_bufs[i])); > + clear_bit(i, link->wr_tx_mask); > + } > + if (link->lgr->smc_version == SMC_V2) { > + memset(link->wr_tx_v2_pend, 0, > + sizeof(*link->wr_tx_v2_pend)); > + memset(link->lgr->wr_tx_buf_v2, 0, > + sizeof(*link->lgr->wr_tx_buf_v2)); > + } > ++>>>>>>> 8799e310fb3f... net/smc: add v2 support to the work request layer > /* terminate link */ > smcr_link_down_cond_sched(link); > } > > I can start fixing this and converting the cherry-pick into a backport, > but I hope thee is a cleaner solution, e.g. a missing pre-req or so?
That is ok, no pre-req. Additionally, pls don't just cherry-pick the certain patches mentioned above. All of the smc related patches till the date 2021-10-28 on the list (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/net/smc?h=v5.16) should be taken for U22.04
------- Comment From <email address hidden> 2022-03-16 13:19 EDT------- T570:~/ ubuntu- jammy-master- next/jammy- lp1929035$ git status master- next' by 9 commits. 22d7324969cd. .000000000000 tx_process_ cq tx_find_ pending_ index(link, wc->wr_id); tx_pends[ pnd_snd_ idx].wc_ status = wc->status; wr_tx_pends[ pnd_snd_ idx].compl_ requested) &link-> wr_tx_compl[ pnd_snd_ idx]); wr_tx_pends[ pnd_snd_ idx], sizeof(pnd_snd)); &link-> wr_tx_pends[ pnd_snd_ idx], 0, link->wr_ tx_pends[ pnd_snd_ idx])); &link-> wr_tx_bufs[ pnd_snd_ idx], 0, link->wr_ tx_bufs[ pnd_snd_ idx])); and_clear_ bit(pnd_ snd_idx, link->wr_tx_mask)) lgr->smc_ version != SMC_V2 || tx_v2_pend- >wr_id != wc->wr_id) tx_v2_pend- >wc_status = wc->status; tx_v2_pend, sizeof(pnd_snd)); link->wr_ tx_v2_pend, 0, *link-> wr_tx_v2_ pend)); link->lgr- >wr_tx_ buf_v2, 0, *link-> lgr->wr_ tx_buf_ v2)); tx_pends[ pnd_snd_ idx].wc_ status = wc->status; wr_tx_pends[ pnd_snd_ idx].compl_ requested) &link-> wr_tx_compl[ pnd_snd_ idx]); wr_tx_pends[ pnd_snd_ idx], &link-> wr_tx_pends[ pnd_snd_ idx], 0, link->wr_ tx_pends[ pnd_snd_ idx])); &link-> wr_tx_bufs[ pnd_snd_ idx], 0, link->wr_ tx_bufs[ pnd_snd_ idx])); and_clear_ bit(pnd_ snd_idx, link->wr_tx_mask)) &link-> wr_tx_pends[ i], 0, link->wr_ tx_pends[ i])); &link-> wr_tx_bufs[ i], 0, link->wr_ tx_bufs[ i])); &link-> wr_tx_pends[ i], 0, link->wr_ tx_pends[ i])); &link-> wr_tx_bufs[ i], 0, link->wr_ tx_bufs[ i])); lgr->smc_ version == SMC_V2) { link->wr_ tx_v2_pend, 0, *link-> wr_tx_v2_ pend)); link->lgr- >wr_tx_ buf_v2, 0, *link-> lgr->wr_ tx_buf_ v2)); down_cond_ sched(link) ;
(In reply to comment #9)
> Thx for the list of commits.
>
> Looks like LP#1929060 "[22.04 FEAT] smc: Add User-defined EID (Enterprise
> ID) Support - kernel" is a prereq - if not worked based on that, I run into
> EID issues already starting with 42042dbbc2eb.
>
> Applying the patches based on LP#1929060 I get further down, but still run
> into conflicts, this time with 8799e310fb3f ("net/smc: add v2 support to the
> work request layer").
>
> $ git cherry-pick -s -e -x 8799e310fb3f
> Auto-merging net/smc/smc_wr.h
> Auto-merging net/smc/smc_wr.c
> CONFLICT (content): Merge conflict in net/smc/smc_wr.c
> Auto-merging net/smc/smc_ib.c
> Auto-merging net/smc/smc_core.h
> Auto-merging net/smc/smc_core.c
> error: could not apply 8799e310fb3f... net/smc: add v2 support to the work
> request layer
> hint: after resolving the conflicts, mark the corrected paths
> hint: with 'git add <paths>' or 'git rm <paths>'
> hint: and commit the result with 'git commit'
> fheimes@
> On branch master-next
> Your branch is ahead of 'origin/
> (use "git push" to publish your local commits)
>
> You are currently cherry-picking commit 8799e310fb3f.
> (fix conflicts and run "git cherry-pick --continue")
> (use "git cherry-pick --skip" to skip this patch)
> (use "git cherry-pick --abort" to cancel the cherry-pick operation)
>
> Changes to be committed:
> modified: net/smc/smc_core.c
> modified: net/smc/smc_core.h
> modified: net/smc/smc_ib.c
> modified: net/smc/smc_wr.h
>
> Unmerged paths:
> (use "git add <file>..." to mark resolution)
> both modified: net/smc/smc_wr.c
> $
>
> $ git diff
> diff --cc net/smc/smc_wr.c
> index 59ca1a2d5c65,
> --- a/net/smc/smc_wr.c
> +++ b/net/smc/smc_wr.c
> @@@ -96,20 -101,47 +96,59 @@@ static inline void smc_wr_
> }
>
> pnd_snd_idx = smc_wr_
> - if (pnd_snd_idx == link->wr_tx_cnt)
> - return;
> - link->wr_
> - if (link->
> - complete(
> - memcpy(&pnd_snd, &link->
> - /* clear the full struct smc_wr_tx_pend including .priv */
> - memset(
> - sizeof(
> - memset(
> - sizeof(
> - if (!test_
> - return;
> + if (pnd_snd_idx == link->wr_tx_cnt) {
> + if (link->
> + link->wr_
> + return;
> + link->wr_
> + memcpy(&pnd_snd, link->wr_
> + /* clear the full struct smc_wr_tx_pend including .priv */
> + memset(
> + sizeof(
> + memset(
> + sizeof(
> + } else {
> + link->wr_
> + if (link->
> + complete(
> + memcpy(&pnd_snd, &link->
> + sizeof(pnd_snd));
> + /* clear the full struct smc_wr_tx_pend including .priv */
> + memset(
> + sizeof(
> + memset(
> + sizeof(
> + if (!test_
> + return;
> + }
> +
> if (wc->status) {
> ++<<<<<<< HEAD
> ++||||||| parent of 8799e310fb3f... net/smc: add v2 support to the work
> request layer
> ++ for_each_set_bit(i, link->wr_tx_mask, link->wr_tx_cnt) {
> ++ /* clear full struct smc_wr_tx_pend including .priv
> */
> ++ memset(
> ++ sizeof(
> ++ memset(
> ++ sizeof(
> ++ clear_bit(i, link->wr_tx_mask);
> ++ }
> ++=======
> + for_each_set_bit(i, link->wr_tx_mask, link->wr_tx_cnt) {
> + /* clear full struct smc_wr_tx_pend including .priv
> */
> + memset(
> + sizeof(
> + memset(
> + sizeof(
> + clear_bit(i, link->wr_tx_mask);
> + }
> + if (link->
> + memset(
> + sizeof(
> + memset(
> + sizeof(
> + }
> ++>>>>>>> 8799e310fb3f... net/smc: add v2 support to the work request layer
> /* terminate link */
> smcr_link_
> }
>
> I can start fixing this and converting the cherry-pick into a backport,
> but I hope thee is a cleaner solution, e.g. a missing pre-req or so?
That is ok, no pre-req. /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ log/net/ smc?h=v5. 16) should be taken for U22.04
Additionally, pls don't just cherry-pick the certain patches mentioned above. All of the smc related patches till the date 2021-10-28 on the list (https:/