"'At that time I will carry out against Eli everything I spoke against his family - from beginning to end. For I told him that I would judge his family forever of the sin he knew about; his sons blasphemed God, and he failed to restrain them. Therefore I swore to the house of Eli, "The guilt of Eli's house will never be atoned for by sacrifice and offering."'" NIV translation
The Lord continues to speak to Samuel and tells him what He had already told Eli. We see that Eli's sons had committed the "unpardonable sin" which is blasphemy of God. We might wonder why God was revealing this to a young man, especially one that probably loved Eli as he had grown up with him. It is probably so that he could explain what happened to the rest of the nation of Israel. God was going to make an example of the house of Eli and needed someone to explain the why and how.
"Samuel lay down until morning and then opened the doors of the house of the Lord. He was afraid to tell Eli the vision, but Eli called him and said, 'Samuel, my son.' Samuel answered, 'Here I am.' 'What was it he said to you?' Eli asked. 'Do not hide it from me. May God deal with you, be it ever so severely, if you hide from me anything he told you.'" NIV translation
We are reminded that God did not tell Samuel to share what he had said with Eli. Nevertheless, Eli demanded that Samuel tell him what the Lord had said. We see that he did not want to tell him and are reminded that that is a trait that was in most of the prophets that God used. A real prophet does not get joy or comfort out of sharing bad news with people. On the contrary, it usually produces deep sadness in them.
"So Samuel told him everything, hiding nothing from him. Then Eli said, 'He is the Lord; let him do what is good in his eyes.'" NIV translation
Eli accepted the rebuke of the Lord and realized that God was justified in doing so.
"The Lord was with Samuel as he grew up, and he let none of Samuel's words fall to the ground. And all Israel from Dan to Beersheba recognized that Samuel was attested as a prophet of the Lord. The Lord continues to appear at Shiloh, and there he revealed himself to Samuel through his word." NIV translation
The Lord continues to talk to Samuel and he was known as a true prophet of God. There are many so-called prophets today but, as we see here, to be a real prophet the words must come to pass.